Im using linux 8.04 right at the moment.
I've just got OCC installed without any error messages yesterday, which i think its a successful installtion?
and when i was trying to run one of the examples, i can successfully make it. but when i was trying to run it, the following error messages poped up:
./makebottle: error while loading shared libraries: libTKernel.so.0: cannot open shared object file: No such file or directory
and heres my Makefile, don't know if it helps
The last two lines under OCC_INCLUDES and OCC_INCLUDES_OLD were added by me because that where libTKernel.so.0 is located (used command locate libTKernel), but the same error message was given.
Anyone who would be kind enough to tell me what is wrong with my OCC?
It seems that you do not have all the necessary environment variables set. They can be defined through the script under your OpenCASCADE's root directory (it's called "env.ksh" - or something like that).
But you can also try the following:
After typing the command above, try to run your example again.
Hope it helps.
Thanks a lot for replying, i'll try to recompile and see what happens.
I got a few warning messages during compilation, not sure if it affects anythying:
checking X11/extensions/transovl.h usability... no
checking X11/extensions/transovl.h presence... no
checking for X11/extensions/transovl.h... no
checking X11/extensions/readdisplay.h usability... no
checking X11/extensions/readdisplay.h presence... no
checking for X11/extensions/readdisplay.h... no
checking X11/extensions/multibuf.h usability... no
checking X11/extensions/multibuf.h presence... yes
configure: WARNING: X11/extensions/multibuf.h: present but cannot be compiled
configure: WARNING: X11/extensions/multibuf.h: check for missing prerequisite headers?
configure: WARNING: X11/extensions/multibuf.h: see the Autoconf documentation
configure: WARNING: X11/extensions/multibuf.h: section "Present But Cannot Be Compiled"
configure: WARNING: X11/extensions/multibuf.h: proceeding with the preprocessor's result
configure: WARNING: X11/extensions/multibuf.h: in the future, the compiler will take precedence
and when the makefile was created, warning messages came up again, almost everyline for the makefile section. Im just pasting the first several lines as follows:
configure: creating ./config.status
config.status: creating Makefile
config.status: creating adm/make/Makefile
config.status: WARNING: adm/make/Makefile.in seems to ignore the --datarootdir setting
config.status: creating adm/make/TKernel/Makefile
config.status: WARNING: adm/make/TKernel/Makefile.in seems to ignore the --datarootdir setting
config.status: creating adm/make/TKMath/Makefile
config.status: WARNING: adm/make/TKMath/Makefile.in seems to ignore the --datarootdir setting
config.status: creating adm/make/TKAdvTools/Makefile
config.status: WARNING: adm/make/TKAdvTools/Makefile.in seems to ignore the --datarootdir setting
etc, don't know if those two things actually affects the installation.
and one thing, by the way, does the compilation/installation differ for a 64-bit machine?
Yes, it is different for 64-bit Machines. For 32-bit machines you do not need to compile anything, since the shared objects are already there for you.
In order to learn how to compile for 64-bit you should look to the documentation (OpenCASCADE6.2.0/doc/whnjs.htm => Click at Welcome / Building Modules / Building on 64-bit platforms).
You can also try to check the options of the script $CASROOT/configure, like this: cd $CASROOT && ./configure --help
I'm quite sure there's more information on the forum already, but if you still have problems, please post your doubts again.
Hmm...I've just tried and it doesn't work,
Heres my env.ksh, don't konw if it helps
This will solve your original problem as it simply couldn't locate the opencascade shared objects on your library path. No need to recompile anything.
I really hope this helps.
Thank you very much , i'll give a try. thanks
Sorry to bother again. i know this is a dummie question, but where do you put the "export LD_LIBRARY_PATH=/opt/OpenCASCADE6.3.0/ros/lib" as thats where my libraries were installed.
By the way, i have the following messages shown in terminal when doing make install for occ:
Libraries have been installed in:
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following:
-add LIBDIR to the 'LD_LIBRARY_PATH' enviroment variable during execution
-add LIBDIR to the 'LD_RUN_PATH' enviroment variable during linking
-use the '-Wl, --rpath -Wl, LIBDIR' linker flag
-have your system adminstrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for mroe information, such as the ld(1) and ld.so(8) manual pages.
Will any of the above solve my problem?
cuz i've changed the open cascade directory in the third line in env.ksh and tried to type "export LD_LIBRARY_PATH=/opt/OpenCASCADE6.3.0/ros/lib" in terminal but the same error message is still presented.
Anything i've done wrong?
Thank you, Kent
Sorry, my mistake. it just worked, but i have to manually type:
everytime im trying to run the ./
is there any other ways which i dont have to do this, cuz my mate didn't have any of this stuff.
and also, I have Segmentation fault when im running the first example.
The second example gives me error:
terminate called after throwing an instance of 'Aspect_GraphicDeviceDefinitionError'
You have not defined CSF_GraphicShr or CASROOT, aborting...Aborted
Thank you, Kent
In fact, the line "export LD_LIBRARY_PATH=..." is a command that should be executed at a console. I'm not sure if this is really the best option, but you can edit the file:
~/.bashrc ( the "~/" => will give the path to your home dir.)
.. with your prefered text editor and add the following line to the end of this file:
`CSF_GraphicShr' is another environment variable that should be defined, as you can see at the Manual. If you do the same thing with the other variables (as explained on previous post), the example must work.
Good luck! ;-)
Thanks for this thread, it has helped me finally compile sample code from samples/qt/Tutorial. With this project what worked for me was:
1. edit custom.sh (comes with the sample) to put the CASROOT and QTDIR paths (I have /usr/local/occt-6.6.0 and /usr/local/Trolltech/Qt-4.8.5)
2. export LD_LIBRARY_PATH=/usr/local/occt-6.6.0/lib (on command line, or could put in custom.sh)
3. source make.sh
I had been doing in order #3 then #2, and manually add -L/usr/local/occt-6.6.0/lib to LFLAGS in the Makefile generated by qmake, and then make. But doing #2 first causes those steps to happen automatically and seems to resolve some resources in executing as well.