FYI:
Building a static library of a Release-Configuration with the following Deployment build settings DEPLOYMENT_LOCATION = YES DEPLOYMENT_POSTPROCESSING = YES DSTROOT = /tmp/$(PROJECT_NAME).dst INSTALL_PATH = $(PREFIX)/lib
fails to link *after* deleting the installation in INSTALL_DIR and optionally also cleaning this target.
Note: the INSTALL_DIR content will not be deleted with Clean, which is IMO another issue.
The first build succeeded with the same settings. (note, PREFIX is defined in the project build settings as /opt/local)
The error can be easily located from the build transcript: the two important things are the directory (INSTALL_DIR) which must be created first, and the output file passed to the libtool command. The directory and the path for the output file shall match:
Libtool /tmp/CairoTest.dst/opt/local/lib/libcairo.a normal ppc mkdir /Users/agrosam/Develop/Mono/libgdiplus/XCode/test/build cd /Users/agrosam/Develop/Mono/libgdiplus/XCode/test setenv MACOSX_DEPLOYMENT_TARGET 10.4 /usr/bin/libtool -static -arch_only ppc -o /tmp/CairoTest.dst/opt/local/lib/libcairo.a -L/Users/agrosam/Develop/Mono/libgdiplus/XCode/test/build -L/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib -L/opt/local/lib -lpixman -v -filelist /Users/agrosam/Develop/Mono/libgdiplus/XCode/test/build/CairoTest.build/Release/cairo-lib.build/Objects-normal/ppc/cairo.LinkFileList -syslibroot /Developer/SDKs/MacOSX10.4u.sdk /usr/bin/libtool: can't create output file: /tmp/CairoTest.dst/opt/local/lib/libcairo.a (No such file or directory)
!! The output file seems to have the correct INSTALL_DIR, but the mkdir command is somewhat confused and chose the wrong directory (buildsetting). It should have been:
Libtool /tmp/CairoTest.dst/opt/local/lib/libcairo.a normal ppc mkdir /tmp/CairoTest.dst/opt/local/lib cd /Users/agrosam/Develop/Mono/libgdiplus/XCode/test setenv MACOSX_DEPLOYMENT_TARGET 10.4 /usr/bin/libtool -static -arch_only ppc -o /tmp/CairoTest.dst/opt/local/lib/libcairo.a -L/Users/agrosam/Develop/Mono/libgdiplus/XCode/test/build -L/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib -L/opt/local/lib -lpixman -v -filelist /Users/agrosam/Develop/Mono/libgdiplus/XCode/test/build/CairoTest.build/Release/cairo-lib.build/Objects-normal/ppc/cairo.LinkFileList -syslibroot /Developer/SDKs/MacOSX10.4u.sdk
As mentioned, the first time the build is successfully. After cleaning, the build system seems to be confused. Closing and re-opening the project does not help. Only restarting Xcode eliminates the problem.
Anyone already noticed this problem?
I will file bug if this is not known already.
Regards Andreas
|