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

iOS cross-compilation and macOS fixups #10

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

treamology
Copy link

This PR removes the 32-bit build options since we're not longer supporting it (and it adds some complexity to the build). I also removed the explicit setting of CMAKE_OSX_SYSROOT since CMake can infer it from the deployment target.

It also explicitly downloads and builds the icu library since there doesn't seem to be an easy way to satisfy that dependency externally.

I also bumped the OpenSSL version to the latest stable (1.1.1c) on macOS and iOS, since it has much better presets for building 64 bit executables for both.

I have a fork of the python-cmake-buildsystem repository that adds the ability to compile for iOS. I've added a BUILD_PYTHON option to this script accordingly, that is only built when cross-compiling by default.

…10.9.

It's more trouble than it's worth to try and detect the SDK version and change the build behavior, since i386 builds don't work at all on newer SDK versions. Also, explicitly use libc++ when building for macOS.
The system version of icu is not meant to be used and does not come with header files, so it's easier just to build it since it has no dependencies.
@treamology treamology force-pushed the ios branch 4 times, most recently from 4c6cefc to 2206e35 Compare June 7, 2019 15:01
@eoinroe
Copy link

eoinroe commented Jul 18, 2019

Hey,

Is there anything in particular you have to do when building from this branch on Mac? If I do:

git clone https://github.com/treamology/panda3d-thirdparty/tree/ios

And run:

cmake -DCMAKE_BUILD_TYPE=Release -G"Xcode" ..

I still get an error about the i386 architecture.

@treamology
Copy link
Author

@Eoey1 Hi there, be sure to clear your CMake cache (can be done by just deleting and recreating your build folder) before trying out this branch, so the old settings don't stick around.

@eoinroe
Copy link

eoinroe commented Jul 21, 2019

Hey,

So I simply cloned the repository again to start afresh and did:

cmake -DCMAKE_BUILD_TYPE=Release -G"Xcode" ..

And got the same i386 error.

If I don't specify the generator I get the following message:

The C compiler

"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc"

is not able to compile a simple test program.

It fails with the following output:

etc

Are you using MacOS?

@treamology
Copy link
Author

Yes, I'm on 10.14.5 with Xcode 10.2.1. Did you make sure to git checkout ios after cloning the repository? I'm confused as to how i386 could possibly be getting selected, since I explicitly set CMAKE_OSX_ARCHITECTURES to x86_64 in the build script.

@eoinroe
Copy link

eoinroe commented Jul 29, 2019

Hey, thanks for that!

I didn't realise I had to do 'git checkout ios' since I thought since I was cloning your repositiory:

https://github.com/treamology/panda3d-thirdparty.git

That I'd already be on the right branch...

After installing yasm (for FFmpeg) I could build the 3rd party packages succesfully.

However, I'm still running into problems when I go to build Panda3d...

@Moguri
Copy link
Contributor

Moguri commented Apr 28, 2021

@rdb and @treamology, what's the status of this PR? I am investigating bringing this repo into the main Panda repo, and I need to figure out if it makes sense to merge this soon or request that a new PR gets opened on the main repo if/when this repo gets merged in.

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

Successfully merging this pull request may close these issues.

3 participants