discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems building GNUstep-base on Darwin x86 using gcc 4.0 (experime


From: Lars Sonchocky-Helldorf
Subject: Re: Problems building GNUstep-base on Darwin x86 using gcc 4.0 (experimental)
Date: Tue, 19 Oct 2004 04:05:05 +0200


Am Samstag, 16.10.04 um 03:19 Uhr schrieb Andrew Pinski:


On Oct 15, 2004, at 9:15 PM, Lars Sonchocky-Helldorf wrote:

/usr/bin/ld: for architecture i386
/usr/bin/ld: warning undefined symbols:
___objc_exec_class
_objc_get_class
_objc_msg_lookup
... all other objc symbols


Make sure that CFLAGS contains -fgnu-runtime and so does the link line.

Adding -fgnu-runtime to CFLAGS doesn't help the cause. As long as gcc just compiles .m or .c files, -fgnu-runtime is provided by gnustep-make anyway, while when using gcc for linking the .o files -fgnu-runtime is still missing (configured like: ./configure --disable-do CC='/opt/local/bin/gcc' CFLAGS='-fgnu-runtime' LDFLAGS='-L/opt/local/lib -lobjc-gnu -lgcc')

So I tried something else, this time I configured with:

./configure --disable-do CC='/opt/local/bin/gcc' LDFLAGS='-fgnu-runtime'

which choked libtool in turn:

/usr/bin/libtool -noall_load -read_only_relocs warning -flat_namespace -undefined warning -single_module -dynamic -current_version 1.10.0 -install_name libgnustep-base.dylib.1.10 -o shared_obj/libgnustep-base.dylib.1.10.0 shared_obj/GSCompatibility.o
.
.
.
shared_obj/NSNumber12.o Additions/shared_obj/subproject.o -L./shared_obj -L/opt/local/GNUstep/System/Library/Libraries/ -ldl -lz -lxml2 -lz -liconv -lm -fgnu-runtime ; (cd ./shared_obj; rm -f libgnustep-base.dylib; if [ "libgnustep-base.dylib.1.10" != "libgnustep-base.dylib.1.10.0" ]; then rm -f libgnustep-base.dylib.1.10; ln -s libgnustep-base.dylib.1.10.0 libgnustep-base.dylib.1.10; fi; ln -s libgnustep-base.dylib.1.10.0 libgnustep-base.dylib)
/usr/bin/libtool: unknown option character `f' in: -fgnu-runtime
Usage: /usr/bin/libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT] Usage: /usr/bin/libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
Making all in SSL...
Making all for bundle SSL...
cd .; \
/opt/local/GNUstep/System/Library/Makefiles/mkinstalldirs ./shared_obj; \
rm -f obj; \
ln -s ./shared_obj obj
/opt/local/GNUstep/System/Library/Makefiles/mkinstalldirs SSL.bundle/.
/opt/local/bin/gcc GSSSLHandle.m -c \
-MMD -MP -DGNUSTEP_INSTALL_PREFIX=/opt/local/GNUstep/System -DGNUSTEP_LOCAL_ROOT=/opt/local/GNUstep/Local -DGNUSTEP_NETWORK_ROOT=/opt/local/GNUstep/Local -DGNUSTEP_TARGET_DIR=\".\" -DGNUSTEP_TARGET_CPU=\"ix86\" -DGNUSTEP_TARGET_OS=\"darwin7\" -DLIBRARY_COMBO=\"gnu-gnu-gnu\" -Wall -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_RUNTIME=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-common -DGSWARN -DGSDIAGNOSE -O2 -fno-strict-aliasing -fgnu-runtime -fconstant-string-class=NSConstantString -I./. -I../Source/. -I../Headers/Additions -I../Headers -I. -I/usr/include/libxml2 \
       -o shared_obj/GSSSLHandle.o
/usr/bin/ld -bundle -flat_namespace -undefined suppress /usr/lib/bundle1.o \
        -o ./SSL.bundle/./SSL \
        ./shared_obj/GSSSLHandle.o \
-L../Source/./shared_obj -L./shared_obj -L/opt/local/GNUstep/System/Library/Libraries/ -lssl -lcrypto -lgnustep-base -lobjc
/usr/bin/ld: can't locate file for: -lgnustep-base
make[2]: *** [SSL.bundle/./SSL] Error 1
make[1]: *** [SSL.all.bundle.variables] Error 2
make: *** [internal-all] Error 2
localhost:~/GNUstep-Darwin/core/base lars$

which is right since the library got not created (just the symlinks did):

localhost:~/GNUstep-Darwin/core/base lars$ ls -al Source/shared_obj/libgnustep-base.dylib* lrwxr-xr-x 1 lars staff 28 18 Oct 17:54 Source/shared_obj/libgnustep-base.dylib -> libgnustep-base.dylib.1.10.0 lrwxr-xr-x 1 lars staff 28 18 Oct 17:54 Source/shared_obj/libgnustep-base.dylib.1.10 -> libgnustep-base.dylib.1.10.0
localhost:~/GNUstep-Darwin/core/base lars$

summary:
========

libraries: libtool doesn't like -f options (like -fgnu-runtime) but needs to know where libobjc-gnu resides (works kind of using LDFLAGS='-L/opt/local/lib -lobjc-gnu' for configure)

executables: gcc needs -fgnu-runtime to do the right thing in conjunction with -lobjc _also_ at linktime (that's why I tried LDFLAGS='-fgnu-runtime'),

-> using LDFLAGS='-fgnu-runtime' confuses libtool and using just LDFLAGS='-L/opt/local/lib -lobjc-gnu' confuses gcc when linking executables (see my previous mail)

So is any gnustep-make wizard listening? Nicola Pero, are you around? I am not ready yet to bite the bullet (maybe after two weeks of waiting in vain ...)


Thanks,
Andrew Pinski

regards, Lars




_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnustep






reply via email to

[Prev in Thread] Current Thread [Next in Thread]