Stephan Bergmann wrote:
On 08/29/08 14:36, Pierre Doyon wrote:
Hi Stephan,
On 08/28/08 18:32, Pierre Doyon wrote:
Hi,
The undefined symbols come from the following warnings
ld: warning can't open dynamic library:
@loader_path/libuno_sal.dylib.3 referenced from:
/Users/pdoyon/OpenOffice.org3.0_SDK/macosx/lib/libuno_cppuhelpergcc3.dylib
(checking for undefined symbols may be affected) (No such file or
directory, errno = 2)
ld: warning can't open dynamic library:
@loader_path/libuno_salhelpergcc3.dylib.3 referenced from:
/Users/pdoyon/OpenOffice.org3.0_SDK/macosx/lib/libuno_cppuhelpergcc3.dylib
(checking for undefined symbols may be affected) (No such file or
directory, errno = 2)
ld: warning can't open dynamic library:
@loader_path/libuno_cppu.dylib.3 referenced from:
/Users/pdoyon/OpenOffice.org3.0_SDK/macosx/lib/libuno_cppuhelpergcc3.dylib
(checking for undefined symbols may be affected) (No such file or
directory, errno = 2)
ld: Undefined symbols:
Can you quote the complete gcc command line that outputs the above ld
errors?
-Stephan
Here is the complete gcc command:
gcc -malign-natural -c -O -fPIC -fno-common -I.
-I/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/inc
-I/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/inc/examples
-I../../../../include
-I/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/inc/CppComponentSample
-DUNX -DGCC -DMACOSX -DCPPU_ENV=gcc3
-DGXX_INCLUDE_PATH=/usr/include/c++/4.0.0
-o/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/slo/CppComponentSample/service1_impl.o
service1_impl.cxx
mkdir -p
/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/slo/CppComponentSample
gcc -malign-natural -c -O -fPIC -fno-common -I.
-I/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/inc
-I/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/inc/examples
-I../../../../include
-I/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/inc/CppComponentSample
-DUNX -DGCC -DMACOSX -DCPPU_ENV=gcc3
-DGXX_INCLUDE_PATH=/usr/include/c++/4.0.0
-o/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/slo/CppComponentSample/service2_impl.o
service2_impl.cxx
Here is the g++ command:
g++ -dynamiclib -single_module -Wl,-multiply_defined,suppress
-Wl,-exported_symbols_list
/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/misc/CppComponentSample/CppComponent.uno.map
-L/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/lib
-L/Users/pdoyon/OpenOffice.org3.0_SDK/macosx/lib
-L"/Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib"
-o
/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/lib/CppComponent.uno.dylib
/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/slo/CppComponentSample/service1_impl.o
/Users/pdoyon/OpenOffice.org3.0_SDK/MACOSXexample.out/slo/CppComponentSample/service2_impl.o
\
-luno_cppuhelpergcc3 -luno_cppu -luno_sal
-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppuhelpergcc3.dylib.3:/Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libuno_cppuhelpergcc3.dylib
-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppu.dylib.3:/Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libuno_cppu.dylib
-Wl,-dylib_file,@__________________________________________________URELIB/libuno_sal.dylib.3:/Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libuno_sal.dylib
-Wl,-dylib_file,@loader_path/libuno_sal.dylib.3:/Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libuno_sal.dylib
and similar for libuno_salhelpergcc3.dylib.3 and libuno_cppu.dylib.3 are
missing from the above g++ command line.
You link against
@__________________________________________________URELIB/libuno_cppuhelpergcc3.dylib.3,
which really is
/Applications/OpenOffice.org.app/Contents/basis-link/ure-link/lib/libuno_cppu.dylib
(the -Wl,dylib_file,@... already present), which has a dependency on
@loader_path/libuno_sal.dylib.3, which ld wants to resolve, and it
appears that ld does not figure out the correct value for "@loader_path"
itself (although it probably could) and you must instead also tell it
explicitly (via the additional -Wl,-dylib_file,@loader... that is
missing) where to look. Also see
solenv/bin/macosx-dylib-link-list.pl:1.3 which computes the necessary
-Wl,-dylib_file arguments in OOo builds.
Pierre can you please test this? It seems that we have to improve the
SDK env here. Maybe it is PPC specific because it works for me on Intel.
Thanks
Juergen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]