IBM-Swift / Kitura-HelloWorld-iOS

A Hello World example of running Kitura on iOS
https://developer.ibm.com/swift/2017/03/13/kitura-ios/
Apache License 2.0
55 stars 16 forks source link

Running build shell script produces error #3

Closed ghost closed 7 years ago

ghost commented 7 years ago

During the build script step

bash Builder/Scripts/buildCurlStaticLibrary.sh curl-7.43.0

I keep getting

cp: /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-i386/include/curl: No such file or directory
cp: /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-x86_64/include/curl: No such file or directory
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-armv7/lib/libcurl.a (No such file or directory)
ERROR: Building /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl failed.
Try curl version 7.43.0 from https://curl.haxx.se/download/ - it worked for us.

Any ideas would be greatly appreciated!

UPDATE: My directory structure is as follows


drwxr-xr-x@ 13 nstein  staff    442 Mar 15 10:16 ..
-rw-r--r--@  1 nstein  staff   6148 Mar 15 14:08 .DS_Store
drwxr-xr-x  14 nstein  staff    476 Mar 15 10:28 .git
-rw-r--r--   1 nstein  staff    443 Mar 15 10:16 .gitignore
-rw-r--r--   1 nstein  staff    217 Mar 15 10:16 .gitmodules
drwxr-xr-x   9 nstein  staff    306 Mar 15 12:02 Builder
drwxr-xr-x   6 nstein  staff    204 Mar 15 10:16 ClientSide
drwxr-xr-x   3 nstein  staff    102 Mar 15 10:16 Documentation
-rw-r--r--   1 nstein  staff  10174 Mar 15 10:16 LICENSE.txt
-rw-r--r--   1 nstein  staff    762 Mar 15 10:16 Makefile
-rw-r--r--   1 nstein  staff   2966 Mar 15 10:16 README.md
drwxr-xr-x  15 nstein  staff    510 Mar 15 13:15 ServerSide
drwxr-xr-x  39 nstein  staff   1326 Mar 15 10:58 curl-7.43.0
vadimeisenbergibm commented 7 years ago

@nstein It means that Builder/Scripts/doBuildCurl.sh - the script that builds curl library for iOS - failed for some reason. You can add set -x command to that script to perform tracing, so you will be able to see which part fails.

ghost commented 7 years ago

@vadimeisenbergibm This seems to narrow the problem down. I've added set -x at the beginning of that script and I'm seeing an error when lipo is executed


...
+ cp -r /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-i386/include/curl /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/include-32/
cp: /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-i386/include/curl: No such file or directory
+ cp -r /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-x86_64/include/curl /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/include-64/
cp: /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-x86_64/include/curl: No such file or directory
+ lipo /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-armv7/lib/libcurl.a /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-armv7s/lib/libcurl.a /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-arm64/lib/libcurl.a /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-i386/lib/libcurl.a /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-x86_64/lib/libcurl.a -create -output /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/lib/libcurl.a
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-armv7/lib/libcurl.a (No such file or directory)
...
vadimeisenbergibm commented 7 years ago

@nstein I see, so the script failed to create /Users/nstein/Swift/Kitura-HelloWorld-iOS/iOSStaticLibraries/Curl/.build/curl-i386/include/curl directory. Could you please paste the whole output of the script?

vadimeisenbergibm commented 7 years ago

@nstein Additional question - did you run xcode-select --install ?

ghost commented 7 years ago

@vadimeisenbergibm I hadn't! I mistakenly run xcode-select -p which pointed to the path for the tools under Xcode /Applications/Xcode.app/Contents/Developer. I installed it and everything works smooth now! Thank you so much for your help!

vadimeisenbergibm commented 7 years ago

@nstein You are welcome, glad it works for you.