Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"cannot invoke compiler!" on ios toolchain, and some questions #46

Closed
punto- opened this issue Sep 8, 2015 · 10 comments
Closed

"cannot invoke compiler!" on ios toolchain, and some questions #46

punto- opened this issue Sep 8, 2015 · 10 comments

Comments

@punto-
Copy link

punto- commented Sep 8, 2015

Hi. I'm following the instructions here (provided by tpoechtrager) to compile Godot for iOS on our build server: #45 (comment) . After running "build.sh" for the toolchain, I get "cannot invoke compiler!" when I run bin/arm-apple-darwin11-clang++. What is it supposed to be running?

Also, will there be a different toolchain for each architecture? (on apple's toolchain we use -arch armv7 or -arch arm64 on the same I think). Fat binaries that include arm64 are required to publish on the app store, so that's what we're going for. What is the "root" of each toolchain, that I can pack and put on our build server?

Thanks!

@tpoechtrager
Copy link
Owner

Hi. I'm following the instructions here (provided by tpoechtrager) to compile Godot for iOS on our build server: #45 (comment) . After running "build.sh" for the toolchain, I get "cannot invoke compiler!" when I run bin/arm-apple-darwin11-clang++. What is it supposed to be running?

Clang must be installed and in PATH.

Also, will there be a different toolchain for each architecture? (on apple's toolchain we use -arch armv7 or -arch arm64 on the same I think). Fat binaries that include arm64 are required to publish on the app store, so that's what we're going for. What is the "root" of each toolchain, that I can pack and put on our build server?

No, you can build fat binaries with the "ios example toolchain" too, just pass the -arch option(s) to the compiler. Copying "target/*" onto the server after running build.sh should be enough.

@punto-
Copy link
Author

punto- commented Sep 8, 2015

Ok installing native clang worked, now I get the standard "no input files". Thanks!

So I run build.sh twice in the same place, one with "armv7", another with "arm64", and that should be able to use -arch with armv7 and arm64? or what is the purpose of that last parameter to build.sh?

@tpoechtrager
Copy link
Owner

You only need to build the toolchain once, the last parameter just sets the default architecture.

arm-apple-darwin11-clang++               # default arch

arm-apple-darwin11-clang++ -arch arm64   # arm64
arm-apple-darwin11-clang++ -arch armv7   # armv7
arm-apple-darwin11-clang++ -arch armv6   # armv6

arm-apple-darwin11-clang++ -arch armv7 -arch arm64  # armv7 and arm64

@punto-
Copy link
Author

punto- commented Sep 8, 2015

awesome, thanks

@punto- punto- closed this as completed Sep 8, 2015
@punto- punto- reopened this Sep 9, 2015
@punto-
Copy link
Author

punto- commented Sep 9, 2015

I'm getting this error when I compile with -arch arm64:

"clang: error: invalid arch name '-arch arm64'"

Using -arch armv7 and armv6 both work tho (the armv7 binary runs perfectly on an iphone) Do I need to do something to add arm64?

Thanks!

@tpoechtrager
Copy link
Owner

You need clang >= 3.5 for arm64.

@vnen
Copy link

vnen commented Sep 15, 2015

With clang 3.6 I'm able to build with -arch armv7 -arch arm64. In fact, I was able to build Godot for iPhone on my Ubuntu machine.

@tpoechtrager
Copy link
Owner

@vnen: Thanks for letting me know. Does the 64-bit binary work? I haven't had the chance so far to test -arch arm64 properly.

@punto-
Copy link
Author

punto- commented Sep 16, 2015

I've been able to compile both architectures (with clang 3.6, thanks for
the tip George), and create the fat binary with arm-apple-darwin11-lipo, it
runs on the iphone 6. My next step is to submit a game to the app store,
see if they approve.

On 16 September 2015 at 19:55, Thomas Pöchtrager notifications@github.com
wrote:

@vnen https://github.com/vnen: Thanks for letting me know. Does the
64-bit binary work? I haven't had the chance so far to test -arch arm64
properly.


Reply to this email directly or view it on GitHub
#46 (comment)
.

@punto- punto- closed this as completed Sep 16, 2015
@tpoechtrager tpoechtrager mentioned this issue Sep 16, 2015
@tpoechtrager
Copy link
Owner

Good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants