ckosmic / sm64ex-ios

iOS/tvOS port of https://github.com/sm64pc/sm64ex/

Github PK Tool:Github PK Tool

Repository from Github https://github.com/ckosmic/sm64ex-iosRepository from Github https://github.com/ckosmic/sm64ex-ios

"linker command failed with exit code 1" Error

macbookator opened this issue · 12 comments

I did "Building for iOS via Xcode" steps in Wiki. But when I try to build on Xcode for iOS or tvOS, I receive this error and build was fail.

/Users/username/sm64ios/sm64ex-ios/sm64ios/clang:1:1: linker command failed with exit code 1 (use -v to see invocation)

How do I solve this?

Right click that error and hit “Show in Log” and it will show you the specific error that occurred during the build process. Let me know what it says or send me the log.

Error occurred in second line.

ld: building for tvOS, but linking in object file built for iOS, file 'build/us_pc/src/engine/behavior_script.o' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation) <- Error
gmake: *** [Makefile:1063: build/us_pc/sm64tvos] Error 1
rm build/us_pc/bin/ccm_skybox.c build/us_pc/bin/bitfs_skybox.c build/us_pc/bin/ssl_skybox.c build/us_pc/bin/cloud_floor_skybox.c build/us_pc/bin/wdw_skybox.c build/us_pc/bin/bbh_skybox.c build/us_pc/bin/bidw_skybox.c build/us_pc/bin/water_skybox.c build/us_pc/sound/sequences/00_sound_player.o build/us_pc/bin/bits_skybox.c build/us_pc/bin/clouds_skybox.c
building file list ... 
rsync: link_stat "/Users/username/Desktop/sm64ios/sm64ex-ios/ios/." failed: No such file or directory (2)
0 files to consider

sent 29 bytes  received 20 bytes  98.00 bytes/sec
total size is 0  speedup is 0.00
rsync error: some files could not be transferred (code 23) at /System/Volumes/Data/SWE/macOS/BuildRoots/38cf1d983f/Library/Caches/com.apple.xbs/Sources/rsync/rsync-55/rsync/main.c(996) [sender=2.6.9]

Library/Developer/Xcode/DerivedData/sm64ios-ccnmxlbiuymhkegpryinydqhsuqh/Build/Products/Debug-appletvos/ -no-pie -lpthread
clang: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument]
ld: building for tvOS, but linking in object file built for iOS, file 'build/us_pc/src/engine/behavior_script.o' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake: *** [Makefile:1063: build/us_pc/sm64tvos] Error 1
building file list ...
rsync: link_stat "/Users/manny/sm64ios/sm64ex-ios/ios/." failed: No such file or directory (2)
0 files to consider

sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /System/Volumes/Data/SWE/macOS/BuildRoots/b8ff8433dc/Library/Caches/com.apple.xbs/Sources/rsync/rsync-55/rsync/main.c(996) [sender=2.6.9]

I tried to create a new folder named "iOS" in sm64ex-ios folder as other issues. iOS target build successfully, but in tvOS target, there are 3 new errors appeared. Logs:

ld: building for tvOS, but linking in object file built for iOS, file 'build/us_pc/src/engine/geo_layout.o' for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation) <- Error
gmake: *** [Makefile:1063: build/us_pc/sm64tvos] Error 1
building file list ... 
 0 files...
1 file to consider
./

sent 86 bytes  received 26 bytes  224.00 bytes/sec
total size is 0  speedup is 0.00
Command PhaseScriptExecution emitted errors but did not return a nonzero exit code to indicate failure <- Error

(Process Info.plist)

ProcessInfoPlistFile /Users/username/Library/Developer/Xcode/DerivedData/sm64ios-aheaxqbejnbygwegdzoyjzvimayh/Build/Products/Debug-appletvos/sm64tvos.app/Info.plist /Users/christiankosman/Documents/sm64ex-nightly/sm64ios/Info.plist (in target 'sm64tvos' from project 'sm64ios')
    cd /Users/username/Desktop/sm64ios/sm64ex-ios/sm64ios
    builtin-infoPlistUtility /Users/christiankosman/Documents/sm64ex-nightly/sm64ios/Info.plist -producttype com.apple.product-type.application -genpkginfo /Users/username/Library/Developer/Xcode/DerivedData/sm64ios-aheaxqbejnbygwegdzoyjzvimayh/Build/Products/Debug-appletvos/sm64tvos.app/PkgInfo -expandbuildsettings -format binary -platform appletvos -additionalcontentfile /Users/username/Library/Developer/Xcode/DerivedData/sm64ios-aheaxqbejnbygwegdzoyjzvimayh/Build/Intermediates.noindex/sm64ios.build/Debug-appletvos/sm64tvos.build/assetcatalog_generated_info.plist -requiredArchitecture arm64 -o /Users/username/Library/Developer/Xcode/DerivedData/sm64ios-aheaxqbejnbygwegdzoyjzvimayh/Build/Products/Debug-appletvos/sm64tvos.app/Info.plist

error: Build input file cannot be found: '/Users/christiankosman/Documents/sm64ex-nightly/sm64ios/Info.plist' (in target 'sm64tvos' from project 'sm64ios') <- Error

You’ll need to clean your build folder when switching targets. To do this, run make clean in your sm64ex-ios directory

I did, but there is still one error during "Process Info.plist" task.

error: Build input file cannot be found: '/Users/christiankosman/Documents/sm64ex-nightly/sm64ios/Info.plist' (in target 'sm64tvos' from project 'sm64ios')

I see, that's my bad. Both the missing ios folder and the Info.plist issues should be fixed in the latest commit e1d958c.

Thanks for your work. All build issues are solved on iOS and tvOS, and I can build for both successfully. Also app is work well on iOS, but it didn't work in tvOS. I can successfully build and install to my Apple TV 4K, but app was crashed after start.

This error appeared in commit e1d958c:

Ah okay I know why that’s happening, thanks. I’ll fix that later today. It has to do with trying to read save data that hasn’t been created yet as I had to implement my own read/write system for the ATV since it doesn’t have traditional local file read/write support.

Not sure why the above fix wasnt there when i cloned it couple of hours ago. But when I made changes to the specified files the build works on iOS as well as tvOS devices

It works well! But in Apple TV, there are resolution issues like here. And in my iPad mini 4, some buttons are so close to screen edges. I'll create a new issue for this.