Skip to content

Xcode 4.5.1 (4G1004) build error with -sectcreate #268

Open
drjackyl opened this Issue Oct 29, 2012 · 2 comments

2 participants

@drjackyl

After all that upgrading (Mountain Lion, Xcode 4.5, iOS 6) I wanted to "upgrade" appledoc as well. Pulled the repo, opened in Xcode and got the following error while building:

Ld /Users/fl/Library/Developer/Xcode/DerivedData/appledoc-fyfcqianzzfmjsdehbppqnjjyama/Build/Products/Debug/appledoc normal x86_64
    cd "/Users/fl/Entwicklung/External Resources/appledoc"
    setenv MACOSX_DEPLOYMENT_TARGET 10.7
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
 -arch x86_64
 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk
 -L/Users/fl/Library/Developer/Xcode/DerivedData/appledoc-fyfcqianzzfmjsdehbppqnjjyama/Build/Products/Debug "-L/Users/fl/Entwicklung/External Resources/appledoc/Libraries"
 -F/Users/fl/Library/Developer/Xcode/DerivedData/appledoc-fyfcqianzzfmjsdehbppqnjjyama/Build/Products/Debug
 -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks
 -filelist /Users/fl/Library/Developer/Xcode/DerivedData/appledoc-fyfcqianzzfmjsdehbppqnjjyama/Build/Intermediates/appledoc.build/Debug/appledoc.build/Objects-normal/x86_64/appledoc.LinkFileList
 -mmacosx-version-min=10.7
 -licucore
 -sectcreate __ZIP __templates default_templates.zip
 -fobjc-link-runtime
 -lz
 -framework Foundation
 -framework Cocoa
 -framework SystemConfiguration
 -framework CoreServices
 -lParseKitLib
 -lmarkdown
 -o /Users/fl/Library/Developer/Xcode/DerivedData/appledoc-fyfcqianzzfmjsdehbppqnjjyama/Build/Products/Debug/appledoc

ld: can't open
 -sectcreate file: default_templates.zip
clang: error: linker command failed with exit code 1 (use
 -v to see invocation)

To prevent any whatsoever-changes be a reason, I recloned the whole repo, but the error came again.

After removing the linkerflag it resulted in an error when executing the second script of the build phase, that should rm the default_templates.zip. Looks like it wasn't moved to the $PROJECT_DIR.

I didn't have time to have a closer look at it, so I fixed it for me for now: I removed the scripts from the target, copied the templates to ~/Library/Application Support/appledoc myself and appledoc is working.

@tomaz
Owner
tomaz commented Oct 29, 2012

Seems like it's due to embedded templates - recent contribution. Did you try the latest commit - I got warned about $PROJECT_DIR without quotes that could affect paths with spaces.

I also played with idea of changing project to Cocoa app. I actually made this with one of my internal tools and actually like results. It greatly simplifies embedding of resources and frameworks, but makes cmd line somewhat less intuitive...

@drjackyl

Ah, right. When I updated a project I got errors with using $SOURCE_DIR unquoted.

$SOURCE_DIR/docs/appledoc ...

didn't work and I could easily see, that it's because of spaces in the path. In the end

"$SOURCE_DIR"/docs/appledoc ...

did the trick and the target built again.

Hehe, I wanted to try this with appledoc itself now and just saw, it's already fixed 8o)

Thx, regards,
Felix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.