kstenerud / iOS-Universal-Framework

An XCode project template to build universal frameworks (arm7, arm7s, and simulator) for iOS / iPhone.
2.95k stars 473 forks source link

XCode 5 Shell Script Invocation error #142

Open thiagoramos23 opened 10 years ago

thiagoramos23 commented 10 years ago

I know that lib works perfect with XCode 4. But i'm using xcode 5 now and i'm getting this error. Hope someone can help.

Build other platform xcodebuild -project /Users/thiagoramos/Google Drive/ios/RanckFramework/RKFramework/RKFramework.xcodeproj -target RKFramework -configuration Release -sdk iphonesimulator7.0 BUILD_DIR=/Users/thiagoramos/Library/Developer/Xcode/DerivedData/RKFramework-cemulnyqhftczvdvcsmkuyodsoqc/Build/Products CONFIGURATION_TEMP_DIR=/Users/thiagoramos/Library/Developer/Xcode/DerivedData/RKFramework-cemulnyqhftczvdvcsmkuyodsoqc/Build/Intermediates/RKFramework.build/Release-iphonesimulator build Build settings from command line: BUILD_DIR = /Users/thiagoramos/Library/Developer/Xcode/DerivedData/RKFramework-cemulnyqhftczvdvcsmkuyodsoqc/Build/Products CONFIGURATION_TEMP_DIR = /Users/thiagoramos/Library/Developer/Xcode/DerivedData/RKFramework-cemulnyqhftczvdvcsmkuyodsoqc/Build/Intermediates/RKFramework.build/Release-iphonesimulator SDKROOT = iphonesimulator7.0

=== BUILD TARGET RKFramework OF PROJECT RKFramework WITH CONFIGURATION Release ===

Check dependencies No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=i386, VALID_ARCHS=armv7 armv7s).

\ BUILD FAILED **

The following build commands failed: Check dependencies (1 failure) Command /bin/sh failed with exit code 65

bengotow commented 10 years ago

Hi folks,

I'm having issues with Xcode 5 as well. I use iOS-Universal-Framework to build the framework for the Spark Inspector, and I'm getting this output in the latest build of Xcode 5:

CalledProcessError: Command '['/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool', '-static', '-arch_only', 'armv6', '-syslibroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk', '-L/Volumes/Work Files/F376/Projects/iOS-View-Explorer/iOS/DerivedData/SparkInspector/Build/Products/Debug-iphoneos', '-filelist', '/Volumes/Work Files/F376/Projects/iOS-View-Explorer/iOS/DerivedData/SparkInspector/Build/Intermediates/SparkInspector.build/Debug-iphoneos/SparkInspector.build/Objects-normal/armv6/SparkInspector.LinkFileList', '-o', '/Volumes/Work Files/F376/Projects/iOS-View-Explorer/iOS/DerivedData/SparkInspector/Build/Intermediates/SparkInspector.build/Debug-iphoneos/SparkInspector.build/Objects-normal/armv6/SparkInspector.ufwbuild']' returned non-zero exit status 1
Command /bin/sh failed with exit code 1
baskren commented 10 years ago

Unfortunately, I am having a similar issue. The build error I'm seeing is:

line 101: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/libtool: No such file or directory

bengotow commented 10 years ago

Hey guys,

I was able to resolve my issues by switching to pub-buritto's branch of iOS-Universal-Framework, which includes this commit: https://github.com/pub-burrito/iOS-Universal-Framework/commit/08a4052b6d056a25ae2c9c2cadedbd0e01c8a516.

I pulled down the zip file for his master branch, replaced my templates in Xcode, and created a new 'fake framework' project. Then, I opened my existing (not compiling) project and replaced the existing "Run Script" phase with the two "Run Script" phases in the pub-burrito framework project.

I'm not sure what's going on with @kstenerud's branch. It seems to have other Xcode5 related commits, but this one did the trick for me.

chroba commented 10 years ago

I don't known if this could help you but I've fixed this by copying the libtool from: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/

chroba commented 10 years ago

FYI In order to be able to run from my iPhone, I also add to change the second Run Script to (iOS 7 does not seems to like the Resources folder for some reason):

Build embedded framework structure

echo "Build Embedded Framework"

echo rm -rf "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.embeddedframework" rm -rf "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.embeddedframework" echo mkdir -p "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.embeddedframework/rsrc" mkdir -p "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.embeddedframework/rsrc" echo cp -a "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.embeddedframework/" cp -a "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.embeddedframework/"

declare -a UFW_FILE_LIST list_files "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" UFW_FILE_LIST for filename in "${UFW_FILE_LIST[@]}" do if [[ "${filename}" != "Info.plist" ]] && [[ ! "${filename}" =~ .*.lproj$ ]] then echo ln -sf "../${WRAPPER_NAME}/rsrc/${filename}" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.embeddedframework/rsrc/${filename}" ln -sf "../${WRAPPER_NAME}/rsrc/${filename}" "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.embeddedframework/rsrc/${filename}" fi done

harryworld commented 10 years ago

Thanks, @chroba It works for me by copying libtool

Seems the Resources folder does not cause problem to me.

terryxiao commented 10 years ago

Copying the libtool also works for me.

JoshuaKaden commented 10 years ago

Further thanks to @chroba ! Copying libtool worked like a charm.

jonathannaguin commented 10 years ago

I am having this issue, copy the libtool didn't fix it...

Build other platform
xcodebuild -project /Users/jnaguin/Workspace/Project.xcodeproj -target Project -configuration Debug -sdk iphonesimulator7.0 BUILD_DIR=/Users/jnaguin/Library/Developer/Xcode/DerivedData/Project-fkcaraphakyczyfrezqbqpbipwax/Build/Products CONFIGURATION_TEMP_DIR=/Users/jnaguin/Library/Developer/Xcode/DerivedData/Project-fkcaraphakyczyfrezqbqpbipwax/Build/Intermediates/Project.build/Debug-iphonesimulator build
Build settings from command line:
    BUILD_DIR = /Users/jnaguin/Library/Developer/Xcode/DerivedData/Project-fkcaraphakyczyfrezqbqpbipwax/Build/Products
    CONFIGURATION_TEMP_DIR = /Users/jnaguin/Library/Developer/Xcode/DerivedData/Project-fkcaraphakyczyfrezqbqpbipwax/Build/Intermediates/Project.build/Debug-iphonesimulator
    SDKROOT = iphonesimulator7.0

=== BUILD TARGET Project OF PROJECT Project WITH CONFIGURATION Debug ===

Check dependencies
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=armv6, VALID_ARCHS=i386 x86_64).

** BUILD FAILED **

The following build commands failed:
    Check dependencies
(1 failure)
Command /bin/sh failed with exit code 65
SOLUTION:

I fixed adding "i386" to the Valid Architectures setting under Build Settings

loretoparisi commented 10 years ago

The error that I have is

Building on armv7 standard arch:

target specifies product type 'com.apple.product-type.framework.static', but there's no such product type for the 'iphoneos' platform

loretoparisi commented 10 years ago

It worked after using the commit: https://github.com/pub-burrito/iOS-Universal-Framework/commit/08a4052b6d056a25ae2c9c2cadedbd0e01c8a516

  1. Installing the framework again
  2. Creating a new project and copying the three Run Script in the project with errors.
  3. Adding i386 as valid architecture.

Weird!

bliljerk101 commented 10 years ago

Copying libtool worked for me, too :+1: Thanks for that.

zirinisp commented 10 years ago

It worked for me too by copying the libtool. THank you

sidan5 commented 10 years ago

Could there be a fix to the library itself?

stephent commented 10 years ago

libtool copy worked for me too - thanks for the workaround.

oden commented 10 years ago

copied libtool is working \(^o^)/ thanks @chroba \(^o^)/

clibbz0r commented 10 years ago

Hooray copying libtool works =]

drgarbage commented 10 years ago

copied libtool working for me too, thanks @chroba

angeltwbtea commented 10 years ago

Adding i386 as valid architecture, Good!

jfsagasti commented 10 years ago

Adding i386 as valid architecture \(^o^)/

easonoutlook commented 10 years ago

Adding i386 as valid architecture working for me.

saltwat5r commented 9 years ago

copying libtool is working!