September 03, 2012 Re: [phobos] OSX builds are broken | ||||
---|---|---|---|---|
| ||||
Attachments:
| Hi, I had the same problem regarding osx builds being broken. The culprit is in posix.mak: The current logic to set up SDK env var is frail and won't work for someone who has only 10.7+ SDKs. I simply had to add this: SDK=$(SDKDIR)/MacOSX10.7.sdk but a better logic would be to test which is the latest SDK installed checking for $(SDKDIR)/MacOSX10.x.sdk, x=5..8 ifeq (OSX,$(TARGET)) SDKDIR=/Developer/SDKs ifeq "$(wildcard $(SDKDIR) )" "" SDKDIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs endif ## See: http://developer.apple.com/documentation/developertools/conceptual/cross_development/Using/chapter_3_section_2.html#//apple_ref/doc/uid/20002000-1114311-BABGCAAB ENVP= MACOSX_DEPLOYMENT_TARGET=10.3 #SDK=$(SDKDIR)/MacOSX10.4u.sdk #doesn't work because can't find <stdarg.h> #SDK=$(SDKDIR)/MacOSX10.5.sdk #SDK=$(SDKDIR)/MacOSX10.6.sdk # SDK:=$(if $(filter 11.%, $(OSVER)), $(SDKDIR)/MacOSX10.6.sdk, $(SDKDIR)/MacOSX10.5.sdk) # SDK:=$(if $(filter 11.%, $(OSVER)), $(SDKDIR)/MacOSX10.7.sdk, $(SDKDIR)/MacOSX10.5.sdk) ################## changed that SDK=$(SDKDIR)/MacOSX10.7.sdk TARGET_CFLAGS=-isysroot ${SDK} #-syslibroot is only passed to libtool, not ld. #if gcc sees -isysroot it should pass -syslibroot to the linker when needed #LDFLAGS=-lstdc++ -isysroot ${SDK} -Wl,-syslibroot,${SDK} -framework CoreServices LDFLAGS=-lstdc++ -isysroot ${SDK} -Wl -framework CoreServices else LDFLAGS=-lm -lstdc++ -lpthread endif |
Copyright © 1999-2021 by the D Language Foundation