Galmes Pierre-Andre wrote:
Hello,

Since last tests of compiling, I changed my distribution to a Fedora Core 4. Fedora now includes gcc4 by default... But they also provide compatibility packages which should allow avoiding compatibility problems.

But, for now, I am not able to compile the c++ examples from the SDK (for example, OpenOffice.org2.0_SDK/examples/cpp/counter).

Here is the error :

$ g++ -shared -Wl,-rpath,$ORIGIN [...] -L"/opt/openoffice.org1.9.113/program" [...]
-luno_cppuhelperGCC -luno_cppu -luno_sal -lstlport_gcc

/usr/bin/ld: cannot find -luno_cppuhelperGCC
collect2: ld returned 1 exit status

After some investigation, I noticed that the problem comes from the fact that the "GCC" from "-luno_cppuhelperGCC" should have been changed to something like "-luno_cppuhelpergcc3".

I think the problem comes from the file OpenOffice.org2.0_SDK/settings/settings.mk which should change the GCC in gcc3.

The following lines are involved :

Lines 247 and following :

ifeq "$(shell echo $(GCC_VERSION) | cut -c 1)" "3"
COMID=gcc3
CPPU_ENV=gcc3
else
COMID=GCC
CPPU_ENV=gcc2
endif

Line 502 : CPPUHELPERLIB=-luno_cppuhelper$(COMID)

Maybe there is something to be done for gcc4.

Yes, looks like the SDK is not yet ready for GCC 4. Note that there are no successful builds of OOo or SDK on GCC 4 yet, so what you are doing is "experimental." Anyway, please file an issue that the above will have to be adapted for GCC 4, so that it is not forgotten. (It seems that GCC 4 is compatible enough with recent GCC 3 versions, so that we can continue with a single "gcc3" for both versions.)

After, I tryed to hard code the line :
CPPUHELPERLIB=-luno_cppuhelpergcc3

I compiled, but then I suppose there are linkage problems between the two versions. Here is the error :

$ make countermain.run
cd /tmp/oooSdk_build//OpenOffice.org2.0_SDK/LINUXexample.out/bin && countermain terminate called after throwing an instance of 'com::sun::star::registry::CannotRegisterImplementationException'
/bin/sh: line 1:  8377 Abandon                 countermain

This most probably is due to the old libgcc_s.so.1 included in (Sun-builds) of OOo (are you using a Sun-built OOo?). Try replacing <ooo>/program/libgcc_s.so.1 (watch out---that might be a symbolic link to libgcc_s.so.1.1) with the one that comes with your GCC 4 (probably found under /lib on your system).

-Stephan

So what would be the easyest way to have something working ?

- Install a gcc3 rpm.
- Recompile a gcc3 version for fedora ?
- nything else ?

Regards,
Pierre-André Galmes

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to