slice2js fails

in Help Center
Hello,
when i execute the slice y get this error and I don0t know how to solve it:
$ slice2js Printer.ice
slice2js: symbol lookup error: slice2js: undefined symbol: _ZNK5Slice9Container17hasOnlyClassDeclsEv
Does anyone hot to fix it??
Thanks so much
Ivan
when i execute the slice y get this error and I don0t know how to solve it:
$ slice2js Printer.ice
slice2js: symbol lookup error: slice2js: undefined symbol: _ZNK5Slice9Container17hasOnlyClassDeclsEv
Does anyone hot to fix it??
Thanks so much
Ivan
0
Comments
We need more information in order to provide any help. Are you using the Ice for JavaScript preview release, or Ice 3.6beta? Which OS are you running?
Regards,
Mark
I am using Ubuntu 14.04 and Ice for JavaScript preview release.
Regards,
Ivan
The slice2js executable depends on two shared libraries: libIceUtil.so and libSlice.so. It's possible that other versions of these libraries are already present on your machine and slice2js is attempting to use these instead of the ones included with the Ice for JavaScript distribution.
Run ldd slice2js and examine the output carefully to see the path names it's using for libIceUtil and libSlice. You may need to set LD_LIBRARY_PATH to force slice2js to find the correct libraries.
Regards,
Mark
This is what I get if I run ldd slice2js (I have to run it in the installation path because in other place I got "ldd: ./slice2js: Does not exist the file or directory"):
I configured the .bashrc:
# ICE JS lines
export ICE_JS_HOME=/opt/IceJS-0.1.0
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${ICE_JS_HOME}/lib
export PATH=${PATH}:${ICE_JS_HOME}/bin
export CPLUS_INCLUDE_PATH=${ICE_JS_HOME}/include
#ICE 3.5 lines
export ICE_HOME=/opt/Ice-3.5.1
export LD_LIBRARY_PATH=${ICE_HOME}/lib:${LD_LIBRARY_PATH}
export PATH=${ICE_HOME}/bin:${PATH}
Thanks so much!
Ivan
The problem is that the two library directories (/opt/Ice-3.5.1/lib and /opt/IceJS-0.1.0/lib) contain incompatible libraries, so having both in your LD_LIBRARY_PATH is probably not a good idea.
There are a couple of ways you could fix this. First, you could create a shell script that runs slice2js with the correct LD_LIBRARY_PATH. Another possibility is to download Ice 3.6beta and use that instead. The beta is quite stable already and you can use it to replace both IceJS 0.1.0 and Ice 3.5.1.
Regards,
Mark
Thanks for your help!!
Ivan