Archived

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

Freeze runtime error

Hi,

I'm just trying out Freeze in my service and I'm getting the following error at runtime
09/29/09 14:43:08.793 CIceBoxServer2: error: ServiceManager: unable to load entry point `RngSvcI:create': /opt/ice/services/libRngSvcI.so: undefined symbol: _ZN11IceInternal6upCastEPN6Freeze10Connection.

Am I missing some shared libraries?

Thanks
Budyanto

Comments

  • xdm
    xdm La Coruña, Spain
    Hi Budyanto,

    You only need to link with Freeze library to use Freeze

    If this not solve your issue, could you give us some more info? your compiler, Ice version , operating systems, and the command line use to link your service

    Regards,
    José
  • Here's the info.

    Compiler: gcc version 4.1.2 20080704
    Ice version: 3.3.1-1
    OS: CentOS 5
    Command line used to link: g++ -shared -lFreeze objs/Rng.o objs/rng.o objs/RngI.o objs/RngSvcI.o -o dist/libRngSvcI.so

    Thanks
    Budyanto
  • xdm
    xdm La Coruña, Spain
    Hi Budyanto,

    You need to compile code with -fPIC see our demos as example of gcc options used to build the application
    c++ -c -I. -I../../../include  -ftemplate-depth-128 -Wall -D_REENTRANT -I/usr/include/nptl -fPIC -g  HelloServiceI.cpp
    rm -f libHelloService.so
    c++ -shared -Wl,--enable-new-dtags -Wl,-rpath,/opt/Ice-3.4b/lib -rdynamic  -ftemplate-depth-128 -Wall -D_REENTRANT -I/usr/include/nptl -fPIC -g  -L../../../lib  -o libHelloService.so -Wl,-h,libHelloService.so   Hello.o HelloI.o HelloServiceI.o -lIceBox  -lIce -lIceUtil -lFreeze -lpthread -lrt
    
    

    I have tested this with cpp/demo/IceBox/hello of the Ice distribution modified to create a Freeze env and connection on service start and it works

    Hope this help,
    José
  • That is it!

    I had the -fPIC flag on the compile but not on the link. Thanks again.

    Budyanto