1. Forum moved (you can use login and pass from old forum)
  2. Many discussions moved to the bugtracker

Having trouble building on Ubuntu 14.04.3.

Discussion in 'Coding' started by jgatkinsn, Nov 22, 2015.

  1. jgatkinsn

    jgatkinsn Member Programmer

    Joined:
    Nov 22, 2015
    Messages:
    10
    Likes Received:
    8
    Best Answers:
    0
    Hi,

    I thought I would look around the code as of 11/22/15 tip, so I start following the instructions. I've gotten through all the cmake and dependencies just fine. When I try to build OpenApoc in the build directory, I get the following error:

    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:28:14: error: ?class tinyxml2::XMLElement? has no member named ?QueryBoolText?
    if (node->QueryBoolText(&def.fixed) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:28:53: error: ?tinyxml2::XMLError? has not been declared
    if (node->QueryBoolText(&def.fixed) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:36:14: error: ?class tinyxml2::XMLElement? has no member named ?QueryIntText?
    if (node->QueryIntText(&def.buildCost) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:36:56: error: ?tinyxml2::XMLError? has not been declared
    if (node->QueryIntText(&def.buildCost) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:44:14: error: ?class tinyxml2::XMLElement? has no member named ?QueryIntText?
    if (node->QueryIntText(&def.buildTime) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:44:56: error: ?tinyxml2::XMLError? has not been declared
    if (node->QueryIntText(&def.buildTime) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:52:14: error: ?class tinyxml2::XMLElement? has no member named ?QueryIntText?
    if (node->QueryIntText(&def.weeklyCost) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:52:57: error: ?tinyxml2::XMLError? has not been declared
    if (node->QueryIntText(&def.weeklyCost) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:81:14: error: ?class tinyxml2::XMLElement? has no member named ?QueryIntText?
    if (node->QueryIntText(&def.capacityAmount) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:81:61: error: ?tinyxml2::XMLError? has not been declared
    if (node->QueryIntText(&def.capacityAmount) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:93:14: error: ?class tinyxml2::XMLElement? has no member named ?QueryIntText?
    if (node->QueryIntText(&def.size) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    /home/jgatkinsn/git/OpenApoc/game/rules/facilitydef_rules.cpp:93:51: error: ?tinyxml2::XMLError? has not been declared
    if (node->QueryIntText(&def.size) != tinyxml2::XMLError::XML_SUCCESS)
    ^
    As far as I can tell, I have installed the "libtinyxml2-dev" package before this successfully, so I'm a little stumped.

    Got any ideas?

    Thanks
     
  2. kkmic

    kkmic Undefined

    Joined:
    Jul 17, 2014
    Messages:
    61
    Likes Received:
    2
    Best Answers:
    0
    Have you followed the building instructions closely?

    If you had, please try again with a fresh clone, in case you might have missed something.
     
  3. JonnyH

    JonnyH Well-Known Member Official Developer Administrator

    Joined:
    Jul 17, 2014
    Messages:
    185
    Likes Received:
    39
    Best Answers:
    0
    Hmm, that looks like a different tinyxml2 version - any chance you can list the exact package version of tinyxml2-dev?

    Maybe they changed some of the errors (in a non-compatible way) at some point...
     
  4. jgatkinsn

    jgatkinsn Member Programmer

    Joined:
    Nov 22, 2015
    Messages:
    10
    Likes Received:
    8
    Best Answers:
    0
    libtinyxml2-dev_0~git20120518.1.a2ae54e-1_amd64.deb

    Not sure why it's installing that one. I'm wondering if I built someone else on this machine that required a different version of tinyxml2. I'll have to look through all my apt repos to find the culprit.

    --- posts merged - Solarius Scorch ---

    I looked in the apt-cache and that package still pointed to one of the standard trusty tahr repos.

    After apt-cache, I saw this:
    libtinyxml2.6.2 | 2.6.2-2 | http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
    libtinyxml2-dev | 2.1.0-1~ubuntu14.04.1 | http://us.archive.ubuntu.com/ubuntu/ trusty-backports/universe amd64 Packages
    libtinyxml2-dev | 0~git20120518.1.a2ae54e-1 | http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
    libtinyxml2.6.2-dbg | 2.6.2-2 | http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
    libtinyxml2-2 | 2.1.0-1~ubuntu14.04.1 | http://us.archive.ubuntu.com/ubuntu/ trusty-backports/universe amd64 Packages
    libtinyxml2-0.0.0 | 0~git20120518.1.a2ae54e-1 | http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages


    I told it to install the libtinyxml2-dev | 2.1.0-1~ubuntu14.04.1 | version (sudo apt-get install libtinyxml2-dev=2.1.0-1~ubuntu14.04.1) which it did.

    I did a make clean, then rebuilt. Success!
     
  5. JonnyH

    JonnyH Well-Known Member Official Developer Administrator

    Joined:
    Jul 17, 2014
    Messages:
    185
    Likes Received:
    39
    Best Answers:
    0
    Running a pre-release git version sounds like a bad idea generally, but ubuntu isn't known for doing the 'sane' thing :)

    No idea where they got 2.6.2 from though, as the latest version from upstream on the 2 branch is 2.2 (which is what my distro has)...

    I also notice they released a '3.0' version of tinyxml, but haven't tested that at all (so it probably won't work)

    EDIT:
    It looks like the git version "git20120518" is quite a bit older than the 2.1.0 (tagged April 2014) so I guess this is ubuntu's package manager getting versions wrong, if it thinks the git version is 'newer' than 2.1.0?
     
  6. jgatkinsn

    jgatkinsn Member Programmer

    Joined:
    Nov 22, 2015
    Messages:
    10
    Likes Received:
    8
    Best Answers:
    0
    Looks like it, just don't know why it's acting weird on my system. Thanks for the help.

    --- posts merged - Solarius Scorch ---

    FYI, I noticed this happened again on another workstation running Ubuntu 14.04.3.
     
  7. pmprog

    pmprog Well-Known Member Official Developer Administrator

    Joined:
    Jul 8, 2014
    Messages:
    175
    Likes Received:
    12
    Best Answers:
    0
    Running Mint 17, i remember I had to build and install the "dependancy" version of tinyxml2 rather than the repo libs because of versioning issues.
     

Share This Page