Archived

This forum has been archived. Please start a new discussion on GitHub.

Build from sources on Ubuntu 13.04

Hi guys,

I'm currently trying to build ICE from sources on Ubuntu 13.04 to work with C++11 support.
Unfortunately, there are several errors while buildung the third party dependencies (berkeley and mcpp, whereby I installed mcpp via apt-get and I'm not sure if this problem will hold on).

Building Berkeley DB stops with an error when I execute the configure script. configure: error: C compiler cannot create executables

The config.log (had to name it config.txt, otherwise it was declared as invalid file) is attached.

The (from my point of view) important lines are 190 and the following ones. There is neither a -V nor a -qversion flag for gcc. Really don't know what's going on here. Any help would be appreciated!

build-essential, binutil and several other packages, which are necessary - according to Google - are installed. If you have any idea how to avoid that problem (or how to enable C++11 support on existing build) please let me know.

Regards,
Philipp

Comments

  • benoit
    benoit Rennes, France
    Hi,

    It looks like gcc and g++ aren't installed on your system, try to install them with "apt-get install gcc" and "apt-get install g++".

    Cheers,
    Benoit.
  • Hi Benoit,

    thanks for your feedback but they are both installed.

    Regards,
    Bergi
  • benoit
    benoit Rennes, France
    From your config.log:
    configure:5278: gcc-4.7 --version >&5
    ../dist/configure: line 5280: gcc-4.7: command not found
    

    Is the gcc-4.7 command installed? For some reasons the configure script can't find it.

    Cheers,
    Benoit.
  • Hi again,

    thanks for your feedback, gcc-4.7 was actually not installed, but the origin of the problem was gcc-4.8. I don't know why, but configure scripts don't like gcc-4.8. After linking gcc-4.7 to gcc command, I was able to build all the third party libs. Currently I'm building ICE (who knows if there will be problems as well).

    Regards,
    Philipp

    PS: same problem btw for g++. g++-4.8 did not work, 4.7 works perfectly.
  • Build walked through without any error, but make test fails for test 47:

    tests with regular server.
    starting server... ok
    starting client... ok
    testing metrics admin facet checkedCast... ok
    testing group by none...ok
    testing group by id...ok
    testing connection metrics... ok
    testing connection establishment metrics... ok
    testing endpoint lookup metrics... ok
    testing dispatch metrics... ok
    testing invocation metrics... ok
    testing metrics view enable/disable...ok
    testing instrumentation observer delegate... failed!
    AllTests.cpp:1077: assertion `obsv->endpointLookupObserver->getFailedCount() > 0' failed
    unexpected exit status: expected: 0, got -6

    I installed ICE anyway and mapped slice2cpp to my new build ressources, but it looks like the C++11 support is not enabled corretly (or the failed test is the reason?).
    After compiling the simple Hello World example with -std=c++11 flag, the following error occurs:

    Server:
    -! 03/12/14 15:03:18.215 warning: dispatch exception: ../../include/IceUtil/Mutex.h:303: IceUtil::ThreadSyscallException:
    syscall exception: Invalid argument
    identity: SimplePrinter
    facet:
    operation: printString
    remote host: ::ffff:127.0.0.1 remote port: 50102

    Client:
    Outgoing.cpp:493: Ice::UnknownException:
    unknown exception:
    ../../include/IceUtil/Mutex.h:303: IceUtil::ThreadSyscallException:
    syscall exception: Invalid argument

    I'm pretty sure this is about C++11, but with enabled support it should work :/

    Regards,
    Philipp
  • benoit
    benoit Rennes, France
    Hi,

    What did you change in the Ice build system to compile Ice with -std=c++11?

    I tried with a clean Ubuntu 13.04 installation with gcc 4.7 installed. I was able to compile Ice with C++11 support by changing line 41 in Ice-3.5.1/cpp/config/Make.rules.Linux to:
    CPPFLAGS += -std=c++11
    

    Then, I compiled Ice with "make CPP11=yes".

    It passed the tests and the hello demo works fine.

    Cheers,
    Benoit.
  • Hi,

    I guess there were some misplaced links/depenndencies on my system since I installed Ice via apt-get at first. So I did a fresh new system installation and now it works fine with the right flags.
    Thank you for your advices!

    Cheers,
    Philipp