Page 1 of 1

iOS build don't work, semantic issue

Posted: Wed Jun 30, 2021 4:40 pm
by gcmartijn
I'm using the latest Xcode and the M1 processor (don't know if that is relevant) with love 11.3

I don't have any knowledge about Xcode.

I want to test if the game is working in the iPad iOS simulator.
What I did was this (I want for now the most easy way, I was hoping that these are the steps)

https://love2d.org/wiki/Game_Distribution
- I download https://github.com/love2d/love/releases ... source.zip
- Open platform/xcode/love.xcodeproj with Xcode.
- Select love-ios target (not love-macosx)
- Select Build Phases of the 'love-ios' target and add your 'game.love' file into Copy Bundle Resources.
- Build the project.
Screenshot 2021-06-30 at 18.32.26.png
Screenshot 2021-06-30 at 18.32.26.png (321.93 KiB) Viewed 9575 times
Screenshot 2021-06-30 at 18.33.15.png
Screenshot 2021-06-30 at 18.33.15.png (433.73 KiB) Viewed 9575 times

Code: Select all

Semantic Issue Group
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/stdlib.h:143:10: No member named 'ldiv' in the global namespace; did you mean simply 'ldiv'?
/Users/diana/Downloads/love-11.3-ios-source/src/libraries/glad/glad.cpp:13:10: In file included from /Users/diana/Downloads/love-11.3-ios-source/src/libraries/glad/glad.cpp:13:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/assert.h:44:10: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/assert.h:44:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/stdlib.h:149:9: 'ldiv' declared here
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/c++/v1/stdlib.h:148:10: No member named 'lldiv' in the global namespace; did you mean simply 'lldiv'?
/Users/diana/Downloads/love-11.3-ios-source/src/libraries/glad/glad.cpp:13:10: In file included from /Users/diana/Downloads/love-11.3-ios-source/src/libraries/glad/glad.cpp:13:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/assert.h:44:10: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/assert.h:44:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk/usr/include/stdlib.h:153:10: 'lldiv' declared here
What do I wrong ?

Re: iOS build don't work, semantic issue

Posted: Thu Jul 01, 2021 6:04 pm
by gcmartijn
When I remove
line 13
#include <assert.h>

and make line 21 comments
// assert(0);

Then building is a small step 'better'
Screenshot 2021-07-01 at 20.01.22.png
Screenshot 2021-07-01 at 20.01.22.png (396.67 KiB) Viewed 9299 times
the error is now:

Showing Recent Issues
In /Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Products/Debug-iphonesimulator/liblove.a(lib_aux.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64






d /Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Products/Debug-iphonesimulator/love.app/love normal (in target 'love-ios' from project 'love')
cd /Users/diana/Downloads/love-11.3-ios-source/platform/xcode
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -target arm64-apple-ios12.0-simulator -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.5.sdk -L/Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Products/Debug-iphonesimulator -F/Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Products/Debug-iphonesimulator -F/Users/diana/Downloads/love-11.3-ios-source/platform/xcode -filelist /Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Intermediates.noindex/love.build/Debug-iphonesimulator/love-ios.build/Objects-normal/arm64/love.LinkFileList -Xlinker -rpath -Xlinker @loader_path/../Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Intermediates.noindex/love.build/Debug-iphonesimulator/love-ios.build/Objects-normal/arm64/love_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -stdlib\=libc++ -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Intermediates.noindex/love.build/Debug-iphonesimulator/love-ios.build/love.app-Simulated.xcent -weak_framework Metal -lbz2 -framework AVFoundation /Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Products/Debug-iphonesimulator/liblove.a -framework Foundation -framework CoreMotion -weak_framework GameController -lz -framework CoreGraphics -framework QuartzCore -framework AudioToolbox -framework UIKit -framework OpenGLES -framework OpenAL -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Intermediates.noindex/love.build/Debug-iphonesimulator/love-ios.build/Objects-normal/arm64/love_dependency_info.dat -o /Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Products/Debug-iphonesimulator/love.app/love

ld: in /Users/diana/Library/Developer/Xcode/DerivedData/love-gbtnagayicgtoobvjpmkrlnvqncc/Build/Products/Debug-iphonesimulator/liblove.a(lib_aux.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Going to search google for that error later, maybe I need to clone the love2d repo and use that for building iOS , going to try that later.

Re: iOS build don't work, semantic issue

Posted: Thu Jul 01, 2021 6:15 pm
by slime
iOS build issues with recent Xcode versions should be fixed by using the latest love source from github, yeah.

Re: iOS build don't work, semantic issue

Posted: Fri Jul 02, 2021 3:56 pm
by gcmartijn
That gives another error.

The steps are now:
- git clone https://github.com/love2d/love.git
- download https://github.com/love2d/love/releases ... raries.zip and place it into the ios/ folder
- open love.xcodeproj
- press build

Error
entry point (_main) undefined. for architecture x86_64
Screenshot 2021-07-02 at 17.49.03.png
Screenshot 2021-07-02 at 17.49.03.png (2.36 MiB) Viewed 9188 times
I did try this: https://stackoverflow.com/questions/466 ... 9/56291763
"If you're facing this error while building a framework, then select the Dynamic Library Under the Build Settings > Mach-O Type."
But that give other errors.

I did remove Xcode and reinstall it, maybe I'm missing something else

gcc --version

Code: Select all

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: arm64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
clang++ --version

Code: Select all

Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: arm64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
]
g++ --version

Code: Select all

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.5 (clang-1205.0.22.11)
Target: arm64-apple-darwin20.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Inside readme-iOS.rtf is a invalid link to https://bitbucket.org/rude/love/downloa ... raries.zip , maybe its better to refactor it to readme-iOS.md

Re: iOS build don't work, semantic issue

Posted: Fri Jul 02, 2021 5:11 pm
by slime
You might need the iOS dependencies from here: https://github.com/slime73/love-apple-dependencies

Re: iOS build don't work, semantic issue

Posted: Fri Jul 02, 2021 5:17 pm
by gcmartijn
nope, don't do a thing.

But some people have the same error and I think its about this.

https://github.com/godotengine/godot/issues/17802
Screenshot 2021-07-02 at 19.16.23.png
Screenshot 2021-07-02 at 19.16.23.png (324.71 KiB) Viewed 9168 times
I don't have a developer account, just want to test it using the simulator.
Did try some variations , going go check what a provisioning profile is...

Re: iOS build don't work, semantic issue

Posted: Sat Jul 03, 2021 8:35 am
by gcmartijn
Oke I did make some space on the MacBook Air and install Xcode and there it works slow but the iOS simulator was started with the love app.

I can confirm that using the MacBook the above signing & capalilities are the same, so that is not the issue.

I'm now trying all options on the iMac M1 processor, I already did this
https://milanpanchal24.medium.com/xcode ... 0cc28ec832

I guess it has something to do with the iOS simulator x86_64 and not building correctly for it using a M1 processor.

I forget to mention a important things, and that is that I did see it work once, a few day again.
But then I did a stupid thing by fixing the warning about the signing. So I can see that it is possible to compile and run the simulator, but once you do something wrong, is broke. And uninstalling Xcode and removing the project and caches don't fix it.

Re: iOS build don't work, semantic issue

Posted: Sat Jul 03, 2021 8:48 am
by gcmartijn
It is working !

Not using arm m1 but using rosetta.
Screenshot 2021-07-03 at 10.47.13.png
Screenshot 2021-07-03 at 10.47.13.png (1.52 MiB) Viewed 8839 times
Now I'm going to try the game for the first time.

I think my next question will be:
If the app is crashing in the simulator, where can I find the error log ?

Re: iOS build don't work, semantic issue

Posted: Sat Jul 03, 2021 8:57 am
by gcmartijn
Screenshot 2021-07-03 at 10.55.59.png
Screenshot 2021-07-03 at 10.55.59.png (253.7 KiB) Viewed 8831 times
Yes working
Screenshot 2021-07-03 at 10.51.28.png
Screenshot 2021-07-03 at 10.51.28.png (683.94 KiB) Viewed 8831 times
Damn...

Going to test a hello world later!