gurhub / surmagic

🚀 Command Line Tool to create XCFramework for multiple platforms in one shot!
MIT License
310 stars 43 forks source link

lipo step fatal error #1

Closed car5tenV closed 4 years ago

car5tenV commented 4 years ago

Hello there,

I just stumble upon your script for creating my first fat library. It seems not work for me. My project is wrapping a c++ library and not having any further pods. Mac OS: 10.14.6 Xcode: Version 11.3.1 (11C505)

Here is the log:


 ⏱ Starting the Universal Framework work... 

##################################################################

DEVICE_LIBRARY_PATH: /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-iphoneos/Lib.framework
SIMULATOR_LIBRARY_PATH: /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-iphonesimulator/Lib.framework
UNIVERSAL_LIBRARY_DIR: /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-Universal

##################################################################

##################################################################

 🚀 Step 1-1: Building for iphonesimulator

##################################################################

2020-02-17 10:27:35.835 xcodebuild[12512:170668] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.227 xcodebuild[12512:170668] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.269 xcodebuild[12512:170668] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.273 xcodebuild[12512:170668] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.279 xcodebuild[12512:170668] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.283 xcodebuild[12512:170668] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.287 xcodebuild[12512:170668] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.290 xcodebuild[12512:170668] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
xcodebuild: error: The directory /private/var/folders/kw/h8z3dt8n41x2zms9qlhhd3hcbk13wd/T does not contain an Xcode project.

##################################################################

 🚀 Step 1-2: Building for iphoneos 

2020-02-17 10:27:36.464 xcodebuild[12513:170708] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.807 xcodebuild[12513:170708] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.847 xcodebuild[12513:170708] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.851 xcodebuild[12513:170708] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.857 xcodebuild[12513:170708] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.861 xcodebuild[12513:170708] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.865 xcodebuild[12513:170708] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
2020-02-17 10:27:36.868 xcodebuild[12513:170708] [MT] DVTDeveloperPaths: WARNING: Environment variable XCODE_DEVELOPER_DIR_PATH is set, but is not an absolute path. The variable will be ignored. ()
xcodebuild: error: The directory /private/var/folders/kw/h8z3dt8n41x2zms9qlhhd3hcbk13wd/T does not contain an Xcode project.

##################################################################

 đŸ“Ļ Step 2: Copy the framework structure for iphoneos

##################################################################

##################################################################

 🛠 Step 3: The LIPO Step

##################################################################

fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't open input file: /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-iphonesimulator/Lib.framework/Lib (No such file or directory)

##################################################################

 đŸ“Ļ Step 4: Copy the Swiftmodules

##################################################################

ℹī¸ Couldn't any Swift module file for SIMULATOR!

cp: /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-Universal/Lib.framework/Modules/Lib.swiftmodule/arm64-apple-ios.swiftdoc and /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-iphoneos/Lib.framework/Modules/Lib.swiftmodule/arm64-apple-ios.swiftdoc are identical (not copied).
cp: /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-Universal/Lib.framework/Modules/Lib.swiftmodule/arm64-apple-ios.swiftmodule and /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-iphoneos/Lib.framework/Modules/Lib.swiftmodule/arm64-apple-ios.swiftmodule are identical (not copied).
cp: /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-Universal/Lib.framework/Modules/Lib.swiftmodule/arm64.swiftdoc and /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-iphoneos/Lib.framework/Modules/Lib.swiftmodule/arm64.swiftdoc are identical (not copied).
cp: /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-Universal/Lib.framework/Modules/Lib.swiftmodule/arm64.swiftmodule and /Users/.../Library/Developer/Xcode/DerivedData/Lib-dhiowyspmhqzznbidnnwddepamol/Build/Intermediates.noindex/ArchiveIntermediates/Lib-Universal/BuildProductsPath/Debug-iphoneos/Lib.framework/Modules/Lib.swiftmodule/arm64.swiftmodule are identical (not copied).

##################################################################

 🚛 Step 5 Copying in the project directory

##################################################################

##################################################################

##################################################################

##################################################################

 🏁 Completed with Success! 🙂

 🔍 For more details you can always check the /tmp/Lib_archive.log file. 📝 

##################################################################

I replaced the framework name with "Lib" and my user name with "...". Any idea?

gurhub commented 4 years ago

Hi,

seems like your error before the lipo step, xcodebuild unable the build your project in the first place. Under the "Step 1-2: Building for iphoneos" title error says:

xcodebuild: error: The directory /private/var/folders/kw/h8z3dt8n41x2zms9qlhhd3hcbk13wd/T does not contain an Xcode project.

Please first safely build your project with terminal command "xcodebuild" and after that check the script again. You can check the info section on the home page. Or open the universal script and find the Step 1: Build Frameworks. Use that script for building.

I hope it helps.

Best.