Using ice 3.6 with Robocomp instead of ice 3.5 gives errors

lovemehtalovemehta Love MehtaOrganization: RobocompProject: Robocomp uses ice as its communication middlewareMember

So I want to update robocomp to use ice 3.6 instead of ice 3.5 as we want to add javascript support in robocomp. These are the steps i followed -
This is what I did -
1. Installed fresh Ubuntu 16.04 on VirtualBox

-----------Here I take the first snapshot of the system in case there is a problem and we have to revert back.--------------

2. Installed Zeroc Ice 3.6 from https://zeroc.com/distributions/ice using the following commands :
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 5E6DA83306132997
    sudo apt-add-repository "deb http://zeroc.com/download/apt/ubuntu$(lsb_release -rs) stable main"
    sudo apt-get update
    sudo apt-get install zeroc-ice-all-runtime zeroc-ice-all-dev
3. Also installed nodejs and npm.
    sudo apt-get install nodejs
    sudo apt install npm
    sudo apt-get install nodejs-legacy
4. Installed JavaScript Distribution of Ice using npm -
    npm install ice
    npm install slice2js
    npm install gulp-ice-builder

No errors detected till now.
Now we are done with ice instalation, we install Robocomp now.

-----------Here I take another snapshot of the system with ice completely installed.-------------------------------------------

5. We follow the instruction given on github page here - https://github.com/robocomp/robocomp/blob/master/README.md

    Only one change in the process is there. While installing the dependencies I removed the 'zeroc-ice35' from the command as I already have installed the ice 3.6 distribution.
6. I get the errors as given in the attached picture. 

Tagged:

Best Answer

  • bernardbernard Jupiter, FLBernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Accepted Answer

    Welcome to the forums!

    This error suggests that you're compiling your code with --std=c++11 (or similar) but you're not linking with the Ice ++11 libraries that contain the corresponding symbols (more on this below). If that's not the problem, please attach the complete build log.

    Ice 3.6 on Linux provides two sets of libraries: "default" libraries like libIce.so.36, built with no --std, and ++11 libraries such a libIce++11.so.36 built with --std=c++11. See https://doc.zeroc.com/display/Ice36/Using+the+Linux+Binary+Distributions#UsingtheLinuxBinaryDistributions-C++ for more information.

    As per the info box on this page, you should be able to link with the default C++98 libraries, but apparently this does not work for you, and we'd like to understand why. Were you building with optimizations (like inlining) disabled?

    We provide these 2 sets of libraries for two reasons:

    • the ++11 libraries contain additional C++11-only functionality exposed through inline functions
    • we were concerned about ABI compatibility of the standard library between ++11 and non ++11 compiled-objects (see https://gcc.gnu.org/wiki/Cxx11AbiCompatibility); this is no longer an issue with recent version of GCC

    In 3.6, the Ice header files expose the additional C++11 functions automatically when you compile with --std=c++11 or similar:
    https://github.com/zeroc-ice/ice/blob/3.6/cpp/include/IceUtil/Config.h#L109

    We changed this again for Ice 3.7:
    https://doc.zeroc.com/display/Ice37/Upgrading+your+Application+from+Ice+3.6#UpgradingyourApplicationfromIce3.6-lib/c++11and++11LibrariesonLinux

    We no longer expose different or additional functions based on your --std setting. It's now explicit: if you compile with -DICE_CPP11_MAPPING you get the new Ice C++11 mapping and must link with the ++11 libraries, otherwise you use the C++98 mapping and link with the default (C++98) libraries.

    Best regards,
    Bernard

Answers

  • bernardbernard Jupiter, FLBernard NormierOrganization: ZeroC, Inc.Project: IceAdministrators, ZeroC Staff ZeroC Staff
    Accepted Answer

    Welcome to the forums!

    This error suggests that you're compiling your code with --std=c++11 (or similar) but you're not linking with the Ice ++11 libraries that contain the corresponding symbols (more on this below). If that's not the problem, please attach the complete build log.

    Ice 3.6 on Linux provides two sets of libraries: "default" libraries like libIce.so.36, built with no --std, and ++11 libraries such a libIce++11.so.36 built with --std=c++11. See https://doc.zeroc.com/display/Ice36/Using+the+Linux+Binary+Distributions#UsingtheLinuxBinaryDistributions-C++ for more information.

    As per the info box on this page, you should be able to link with the default C++98 libraries, but apparently this does not work for you, and we'd like to understand why. Were you building with optimizations (like inlining) disabled?

    We provide these 2 sets of libraries for two reasons:

    • the ++11 libraries contain additional C++11-only functionality exposed through inline functions
    • we were concerned about ABI compatibility of the standard library between ++11 and non ++11 compiled-objects (see https://gcc.gnu.org/wiki/Cxx11AbiCompatibility); this is no longer an issue with recent version of GCC

    In 3.6, the Ice header files expose the additional C++11 functions automatically when you compile with --std=c++11 or similar:
    https://github.com/zeroc-ice/ice/blob/3.6/cpp/include/IceUtil/Config.h#L109

    We changed this again for Ice 3.7:
    https://doc.zeroc.com/display/Ice37/Upgrading+your+Application+from+Ice+3.6#UpgradingyourApplicationfromIce3.6-lib/c++11and++11LibrariesonLinux

    We no longer expose different or additional functions based on your --std setting. It's now explicit: if you compile with -DICE_CPP11_MAPPING you get the new Ice C++11 mapping and must link with the ++11 libraries, otherwise you use the C++98 mapping and link with the default (C++98) libraries.

    Best regards,
    Bernard

Sign In or Register to comment.