Apache OpenOffice (AOO) Bugzilla – Issue 68869
CUI tools should not link against X11
Last modified: 2017-05-20 11:31:04 UTC
solenv/inc/unxmacx.mk contain -lX11 in STDLIBCUIST definition, which it should not since these are command line tools.
Looks like we should run sed '/LIBCUI/ s#-lX11 ##' unxmacx.mk before the build. Maho: can you please verify in classic build if it does not break? It would take my machine for three days which I can't afford.
I applied following patch to OOD680_m3 and build failed like: --- solenv/inc/unxmacx.mk Thu Jul 6 07:04:13 2006 +++ solenv/inc/unxmacx.mk Mon Sep 11 09:11:01 2006 @@ -200,9 +200,9 @@ STDSLOCUI= STDLIBGUIST=-lm -STDLIBCUIST=-lX11 -lpthread CPPRUNTIME -lm +STDLIBCUIST=-lpthread CPPRUNTIME -lm STDLIBGUIMT=-lpthread CPPRUNTIME -lm -STDLIBCUIMT=-lX11 CPPRUNTIME -lm +STDLIBCUIMT=CPPRUNTIME -lm STDSHLGUIMT=-lX11 -lXext -lpthread CPPRUNTIME -lm STDSHLCUIMT=-lpthread CPPRUNTIME -lm Making: ../unxmacxp.pro/bin/hidc unx ccache g++-3.3 -Wl,-multiply_defined,suppress -Wl -bind_at_load -L../unxmacxp.pro/lib -L/Volumes/OpenOffice.org/Panther/2.0/work/OOD680_m3/solver/680/unxmacxp.pro/lib -L/usr/lib -L/usr/X11R6/lib -o ../unxmacxp.pro/bin/hidc -lstdc++ -lm -filelist ../unxmacxp.pro/misc/hidc.list ld: Undefined symbols: operator delete(void*) operator new(unsigned long) dmake: Error code 1, while making '../unxmacxp.pro/bin/hidc' '---* tg_merge.mk *---' ERROR: Error 65280 occurred while making /Volumes/OpenOffice.org/Panther/2.0/work/OOD680_m3/soltools/HIDCompiler dmake: Error code 1, while making 'build_instsetoo_native'
BTW: vanilla build of OOD680_m3 doesn't fail: ccache g++-3.3 -Wl,-multiply_defined,suppress -Wl -bind_at_load -L../unxmacxp.pro/lib -L/Volumes/OpenOffice.org/Panther/2.0/work/OOD680_m3/solver/680/unxmacxp.pro/lib -L/usr/lib -L/usr/X11R6/lib -o ../unxmacxp.pro/bin/hidc -lX11 -lstdc++ -lm -filelist ../unxmacxp.pro/misc/hidc.list -rwxr-xr-x 1 maho unknown 77104 6 Sep 07:44 ../unxmacxp.pro/bin/hidc ------------- /Volumes/OpenOffice.org/Panther/2.0/work/OOD680_m3/soltools/checkdll ------------------------------ Making: ../unxmacxp.pro/misc/checkdll.dpc dmake subdmake=true -f makefile.mk product="full" depend=t ALLDPC Making : Dependencies ....
maho: thanks for running this test drive - even though I am surprised about the results (operators new and delete are clearly not exposed by libX11). We need to investigate what's wrong with the patch above (even though I can't see anything obvious).
I'll investigate further.
The patch is correct, no such build issue here. Included in pj59 now.
maho: can you please verify again?
pjanik: SRC680_m186+MacOSX 10.4 Making: ../unxmacxi.pro/bin/hidc unx ccache g++-4.0 -Wl,-multiply_defined,suppress -Wl -bind_at_load -L../unxmacxi.pro/lib -L/Users/maho/work/OOo/work/SRC680_m186/solver/680/unxmacxi.pro/lib -L/usr/lib -L/usr/X11R6/lib -o ../unxmacxi.pro/bin/hidc -lstdc++ -lm -filelist ../unxmacxi.pro/misc/hidc.list -rwxr-xr-x 1 maho maho 37620 Oct 10 10:27 ../unxmacxi.pro/bin/hidc no errors however, SRC680_m186+gcc-3.3+MacOSX 10.3 ccache g++-3.3 -Wl,-multiply_defined,suppress -Wl -bind_at_load -L../unxmacxp.pro/lib -L/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/lib -L/usr/lib -L/usr/X11R6/lib -o ../unxmacxp.pro/bin/hidc -lstdc++ -lm -filelist ../unxmacxp.pro/misc/hidc.list ld: Undefined symbols: operator delete(void*) operator new(unsigned long) dmake: Error code 1, while making '../unxmacxp.pro/bin/hidc' I cleared cache used by ccache.
pjanik: it seems that if we link against stlport_gcc % diff -u soltools/HIDCompiler/makefile.mk.~1.6.~ soltools/HIDCompiler/makefile.mk --- soltools/HIDCompiler/makefile.mk.~1.6.~ Tue Jun 20 14:05:15 2006 +++ soltools/HIDCompiler/makefile.mk Tue Oct 10 10:33:04 2006 @@ -39,7 +39,7 @@ TARGET=hidc TARGETTYPE=CUI LIBTARGET=no -NO_DEFAULT_STL=TRUE +#NO_DEFAULT_STL=TRUE INCPRE=$(MISC) # --- Settings ----------------------------------------------------- ) .... g++ -Wl,-multiply_defined,suppress -Wl -bind_at_load -L../unxmacxp.pro/lib -L/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/lib -L/usr/lib -L/usr/X11R6/lib -o ../unxmacxp.pro/bin/hidc -dylib_file @executable_path/libstlport_gcc.dylib:/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/lib/libstlport_gcc.dylib -lstdc++ -lm -lstlport_gcc -filelist ../unxmacxp.pro/misc/hidc.list -rwxr-xr-x 1 maho unknown 77104 10 10 10:34 ../unxmacxp.pro/bin/hidc .... no error occured.
OK, interesting issue :-)
maho: Did it really helped? You used ccache g++-3.3 in the first case and g++ in the second case...
pjanik: sorry for confusing. without a patch to soltools/HIDCompiler/makefile.mk, ########################################################### Making: ../unxmacxp.pro/bin/hidc unx g++-3.3 -Wl,-multiply_defined,suppress -Wl -bind_at_load -L../unxmacxp.pro/lib -L/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/lib -L/usr/lib -L/usr/X11R6/lib -o ../unxmacxp.pro/bin/hidc -lstdc++ -lm -filelist ../unxmacxp.pro/misc/hidc.list ld: Undefined symbols: operator delete(void*) operator new(unsigned long) dmake: Error code 1, while making '../unxmacxp.pro/bin/hidc' '---* tg_merge.mk *---' ERROR: Error 65280 occurred while making /Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/soltools/HIDCompiler ########################################## with a patch, Making: ../unxmacxp.pro/bin/hidc unx g++-3.3 -Wl,-multiply_defined,suppress -Wl -bind_at_load -L../unxmacxp.pro/lib -L/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/lib -L/usr/lib -L/usr/X11R6/lib -o ../unxmacxp.pro/bin/hidc -dylib_file @executable_path/libstlport_gcc.dylib:/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/lib/libstlport_gcc.dylib -lstdc++ -lm -lstlport_gcc -filelist ../unxmacxp.pro/misc/hidc.list -rwxr-xr-x 1 maho unknown 77104 12 10 09:49 ../unxmacxp.pro/bin/hidc ------------- /Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/soltools/checkdll ------------------------------ Making: ../unxmacxp.pro/obj/checkdll.obj gcc-3.3 -fsigned-char -fmessage-length=0 -malign-natural -c -O2 -fno-strict-aliasing -I. -I../unxmacxp.pro/inc/checkdll -I../inc -I../inc/pch -I../inc -I../unx/inc -I../unxmacxp.pro/inc -I. -I/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/incdont_use_stl -I/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/inc/external -I/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/inc -I/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solenv/unxmacxp/inc -I/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solenv/inc -I/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/res -I/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/incdont_use_stl -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/Volumes/OpenOffice.org/Panther/2.0/work/SRC680_m186/solver/680/unxmacxp.pro/inc/offuh -I. -I../res -I. -pipe -fsigned-char -malign-natural -fPIC -fno-common -DMACOSX -DUNX -DVCL -DGCC -DC300 -DPOWERPC -DCVER=C300 -DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY -DPOWERPC -DPPC -DSTLPORT_VERSION=400 -D_USE_NAMESPACE=1 -DX_LOCALE -DNO_AUDIO -D__DMAKE -DUNIX -DCPPU_ENV=gcc3 -DGXX_INCLUDE_PATH=/usr/include/gcc/darwin/3.3/c++ -DSUPD=680 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DEXCEPTIONS_OFF -DCUI -DSOLAR_JAVA -DSRC680=SRC680 -DBUILD_OS_APPLEOSX -DBUILD_OS_MAJOR=10 -DBUILD_OS_MINOR=3 -DBUILD_OS_REV=9 -DMULTITHREAD -o ../unxmacxp.pro/obj/checkdll.o checkdll.c
Looks like we have to comment out the line NO_DEFAULT_STL=TRUE for Panther. Can you please test this? I can't test on Mac OS X right now. .IF "$(OS)" != "MACOSX" || "$(BUILD_OS_MINOR)" != "3" NO_DEFAULT_STL=TRUE .ENDIF
I have removed this issue from pj59 to now slow down its integration.
maho: please test and return it back to me for cwsing or you can cws process it yourself then :-)
As discussed in http://wiki.services.openoffice.org/wiki/Log_Mac_meeting_10th_November_2006 Since this is not going to get in OOo 2.1, and OOo 2.2 is planned to be based on Tiger/gcc4, couldn't we just integrate the current patch, if it works on Tiger?
What is the status of this issue?
Reset assigne to the default "issues@openoffice.apache.org".