Issue 68869 - CUI tools should not link against X11
Summary: CUI tools should not link against X11
Status: CONFIRMED
Alias: None
Product: porting
Classification: Code
Component: MacOSX (show other issues)
Version: 680m182
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: DevTools
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-22 18:38 UTC by nospam4obr
Modified: 2017-05-20 11:31 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description nospam4obr 2006-08-22 18:38:47 UTC
solenv/inc/unxmacx.mk contain -lX11 in STDLIBCUIST definition, which it should not since these are 
command line tools.
Comment 1 pavel 2006-08-22 20:59:40 UTC
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.
Comment 2 maho.nakata 2006-09-11 01:33:42 UTC
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'
Comment 3 maho.nakata 2006-09-11 01:36:37 UTC
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

....
Comment 4 nospam4obr 2006-09-12 06:58:00 UTC
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).
Comment 5 pavel 2006-09-18 13:01:03 UTC
I'll investigate further.
Comment 6 pavel 2006-09-28 07:25:53 UTC
The patch is correct, no such build issue here.

Included in pj59 now.
Comment 7 pavel 2006-10-04 19:16:31 UTC
maho: can you please verify again?
Comment 8 maho.nakata 2006-10-10 02:31:05 UTC
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.
Comment 9 maho.nakata 2006-10-10 02:38:53 UTC
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.
Comment 10 pavel 2006-10-11 08:16:54 UTC
OK, interesting issue :-)
Comment 11 pavel 2006-10-11 19:43:44 UTC
maho: Did it really helped?

You used ccache g++-3.3 in the first case and g++ in the second case...
Comment 12 maho.nakata 2006-10-12 01:56:19 UTC
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
Comment 13 pavel 2006-10-12 08:50:47 UTC
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
Comment 14 pavel 2006-10-19 09:27:04 UTC
I have removed this issue from pj59 to now slow down its integration.
Comment 15 pavel 2006-10-23 18:12:54 UTC
maho: please test and return it back to me for cwsing or you can cws process it
yourself then :-)
Comment 16 moxfox 2006-11-16 07:50:18 UTC
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?
Comment 17 moxfox 2007-05-24 20:46:49 UTC
What is the status of this issue?
Comment 18 Marcus 2017-05-20 11:31:04 UTC
Reset assigne to the default "issues@openoffice.apache.org".