On 01/22/10 15:17, petteri larjos wrote:
I did tried official builds 3.0, 3.1.1 and pre released 3.2. All builds are
throwing. I also made a small test program and compiled my function with it
as normal executable. Test program works without any problems. Problem rises
when I compile my OOo function as shared library. When I load my shared
library and call my OOo function it throws randomly. I can't understand
why?. My shared library worked very well in ubuntu 8.04. Could there be some
uncompatible libraries or what?
I build my library with command:
gcc -c -O -fpic -I. -I./inc -I./inc/examples
-I/opt/openoffice.org/basis3.2/sdk/include -I./inc -DUNX -DGCC -DLINUX
-DCPPU_ENV=gcc3 -DGXX_INCLUDE_PATH=/usr/include/c++/4.4 -o libooo.o
libooo.cc
g++ -shared '-Wl,-rpath,$ORIGIN' -L"./lib"
-L"/opt/openoffice.org/basis3.2/sdk/lib" -L"/opt/openoffice.org/ure/lib" -o
libooo.so libooo.o -luno_cppuhelpergcc3 -luno_cppu -luno_salhelpergcc3
-luno_sal -lc -lstdc++ -lm -lboost_filesystem
Any ideas?
Could it be that there are multiple instances of stdc++/gcc_s libraries
in the process (from both /opt/openoffice.org/ure/lib and from the
system)? That could explain that exception handling does not work
reliably (so an IOException that should be caught in a try-block would
erroneously escape it)---it would not explain the sleep(1) fix, though.
The easiest way to check this would be to temporarily move
/opt/openoffice.org/ure/lib/libgcc_s.so.1 and
/opt/openoffice.org/ure/lib/libstdc+++.so.6 out of the way.
Also, where do you place libooo.so? Is the executable calling into
libooo.so also built against the OOo SDK? How does it access libooo.so
(via dlopen, or is it directly linked against it)? Do you use any
LD_LIBRARY_PATH when calling the executable? What is the output of
calling ldd on the executable and on libooo.so, resp.?
-Stephan
PS, Jürgen: I saw that /opt/openoffice.org/basis3.2/sdk/lib has links
to ../../../ure/lib for sal, salhelper, etc., but not for stlport. Is
that deliberate?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]