Archived

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

How to make ZeroC Ice for Linux from source

Hello,

Another adventure getting going.

First, I cooked up some examples in the Windows C# .NET realm of things to start proving it out and works great.

Now making the transition into Linux, Ubuntu 10.04 LTS (x86) for development purposes, ultimately cross compiled to Linux ARM. Need a little help with the Linux x86 leg of the journey.

I extract the source and now I just run sudo make from the command prompt, possibly also sudo make installer? However, I'm getting some errors.

Possibly I am missing a tool in the tool chain? The Unix/Linux part is a bit rusty to me still.

Thank you...

Regards,

MichaelAttachment not found.

Comments

  • benoit
    benoit Rennes, France
    Hi

    You're missing the mcpp third-party library, see the "Third-party libraries" section in the cpp/INSTALL.LINUX file from your Ice source distribution for the list of required 3rd party libraries.

    You can download the third-party sources (with patches) from our download page. You will find instructions in the README file of the third-party source distribution for how to build each package. Note that you don't need to build all the third-parties included in the distribution. On Linux, you typically only need to build mcpp and possibly BerkeleyDB. Other 3rd parties are usually available from your distribution software repository.

    Cheers,
    Benoit.
  • I got past the mcpp issue. I was on a more recent version, installed and/or built it, not that is should matter. But it seems it did, so I downgraded to the one for ZeroC Ice.

    Now have a different set of issues: probably needs the DB? What files do I need for it? Just the DB downloads?
    Attachment not found.
    Thank you...
  • xdm
    xdm La Coruña, Spain
    Hi,

    You need to install bzip2, openssl and db dev packages, you could use the ones from ubuntu or build the ones in the Ice third party sources.

    The ubuntu packages you need to install are: libbz2-dev, libdb4.8++-dev and libssl-dev

    Note that there are also Ice 3.4 Ubuntu packages, note those packages are not maintained by ZeroC

    You can install then with "sudo apt-get install zeroc-ice34"
  • Thank you. I picked up the libdb4.8 dependency, and now I am building. Couple of warnings along the way, but seems to be building nonetheless.
  • Finishing the topic off, the only other question I have, this builds in-situ where the Ice-$(ICE_VERSION) is located? Or make install places it in globally accessible parts of the Linux OS?
  • Okay, installed on Ubuntu Linux 10.04 LTS, it's in my /opt/Ice-3.4.2, and I can see the bin files. However, now it's telling me when I run slice2cpp, that it's not installed and that I should install: sudo apt-get install ice33-translators. But I don't want to because I've got it built.
  • Bearing in mind I am a Linux sophomore, I've been around it a bit, know enough to be dangerous, getting more proficient with it...

    If I just type slice2cpp for instance, I get:
    The program 'slice2cpp' is currently not installed. You can install it by typing: sudo apt-get install ice33-translators

    However, when I qualify its full path, it seems to work:
    /opt/Ice-3.4.2/bin/slice2cpp

    That's with the requisite paths in my /etc/environment.

    At a loss as to why I get different behavior, or do I need to configure scripts for each of the executables now?
  • xdm
    xdm La Coruña, Spain
    The changes made to "/etc/environment" are not automatically applied to you current environment, logging out and back in would apply the changes. That isn't related to Ice is just how Linux/Ubuntu works.

    The install directory is defined in cpp/config/Make.rules, look at the prefix definition at the beginning of the file.

    Regards,
    Jose
  • Okay. I log out and log back in, and now LD_LIBRARY_PATH has completely vanished.

    When I run slice2cpp I get the following error.
    slice2cpp: error while loading shared libraries: libSlice.so.34: cannot open shared object file: No such file or directory
    

    I've got the following in my .profile:
    if [ -d "/opt/Ice-3.4.2/lib" ] ; then
        LD_LIBRARY_PATH="/opt/Ice-3.4.2/lib:$LD_LIBRARY_PATH"
        export LD_LIBRARY_PATH
    fi
    

    And I've even got this in my environment:
    LD_LIBRARY_PATH="/opt/Ice-3.4.2/lib"
    export LD_LIBRARY_PATH
    
  • xdm
    xdm La Coruña, Spain
    The correct way to that in Ubuntu is:

    1) Create a file /etc/ld.so.conf.d/ice.conf.
    sudo nano /etc/ld.so.conf.d/ice.conf
    
    2) Add the path of the lib directory to the file, and save it.
    /opt/Ice-3.4.2/lib
    
    3) Run ldconfig as root to apply the changes.
    sudo ldconfig
    

    The reason is that LD_LIBRARY_PATH is a protected environment variable and you cannot set it in the .profile, see https://help.ubuntu.com/community/EnvironmentVariables#File-location_related_variables
  • That did the trick, thank you.