gnustep-dev
[Top][All Lists]
Advanced

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

OS X and gnustep-base 1.21.1


From: Eric Wasylishen
Subject: OS X and gnustep-base 1.21.1
Date: Sun, 10 Apr 2011 22:40:04 -0600

Hi,

After getting GNUstep-base 1.19.1 working on OS X with macports thanks to 
Ivan's help, I decided to try base 1.21.1.

I'm running in to some problems now in the ObjectiveC2 framework.


1. The Source/ObjectiveC2/Availability.h file conflicts with apple's in 
/usr/include.
This is because:
 a) gnustep-make supplies -I. to gcc
 b) blocks_runtime.c includes stdlib.h
 c) apple's /usr/include/stdlib.h #includes <Availability.h>, which is in 
/usr/include, but the copy in Source/ObjectiveC2/ takes precedence because of 
the -I.   This breaks some things in apple's stdlib.h


2. The #include <objc/objc.h> in runtime.c is a problem. 
I've learned that if gcc thinks it is compiling objective-c (i.e. .m file, or 
.c file with the -x objective-c flag), and it is passed the -fgnu-runtime flag, 
it will automatically add the 
/opt/local/lib/gcc44/gcc/x86_64-apple-darwin10/4.4.5/include-gnu-runtime/ 
directory to the include path, so the #include <objc/objc.h> would pick up the 
right file. But, since runtime.c is a c file, this doesn't happen, and apple's 
objc.h in /usr/include/objc is picked up instead.


3. there's an error caused by the -march=i686 flag:
  
 712 :info:build /opt/local/bin/gcc-mp-4.4 blocks_runtime.m -c \
 713 :info:build           -MMD -MP -I/opt/local/include -Wall 
-Wdeclaration-after-statement -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_RUNTIM   
  E=1 -DGNUSTEP_BASE_LIBRARY=1 -fno-common -Wall -DGSWARN -DGSDIAGNOSE 
-Wno-import -pipe -O2 -fno-strict-aliasing -fgnu-runtime -fgnu-run     time 
-march=i686 -fconstant-string-class=NSConstantString -I../../Headers/Additions 
-I../. -I../ -I../../Headers -I. -I/opt/local/inclu     de 
-I/opt/local/GNUstep/System/Library/Headers 
-I/opt/local/GNUstep/Local/Library/Headers 
-I/opt/local/GNUstep/Local/Library/Headers -I     /opt/local/include/libxml2 \
 714 :info:build            -o obj/ObjectiveC2.obj/blocks_runtime.m.o
 715 :info:build blocks_runtime.m:1: error: CPU you selected does not support 
x86-64 instruction set

It goes away if I delete this part of Source/ObjectiveC2/GNUmakefile:
 54 ifeq ($(GNUSTEP_TARGET_CPU), ix86)
 55   ADDITIONAL_OBJCFLAGS += -march=i686
 56 endif

I'm not sure why the march=i686 was causing an error.


It would be nice to get base 1.21.1 and more recent versions to work on OS X 
but I'm not sure if I can figure these out..

Cheers,
Eric 


reply via email to

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