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

Support M1 and Android x64 #5

Closed
Niborski opened this issue Aug 11, 2022 · 23 comments · Fixed by #6
Closed

Support M1 and Android x64 #5

Niborski opened this issue Aug 11, 2022 · 23 comments · Fixed by #6
Labels
enhancement New feature or request

Comments

@Niborski
Copy link

I've updated the buildscripts in my fork of buildware: see https://github.com/pietpukkel/buildware

Buildscript now builds (on my Mac) Mac x64 and arm64 binaries and the distribution scripts make them to fat libraries. I've also added x64 libraries for Android (have not been able to test the results yet). Delete all files in buildsrc after every build.

The only issue that I have is in bulding libjitlua. Building seems to succeed for iOS/Mac but the resulting libs are most likely corrupted. Building for Android fails (for luajit). So these build steps need some TLC from someone with a bit more expertise than I have. I also see no test that actually uses this library.

Assuming the windows powershell scripts only generate the libraries for windows, i have not touched these (or looked at them).

@Niborski
Copy link
Author

Buildware is by the way not entirely complete as for Mac and iOS glsl_optimizer (libglcpp-library, libglsl-optimizer.a and libmesa.a) is missing. I've build these for Mac using https://github.com/aras-p/glsl-optimizer (and just change target in xcode to standard platforms; intel and apple silicon).

@halx99 halx99 added the enhancement New feature or request label Aug 11, 2022
@halx99
Copy link
Member

halx99 commented Aug 11, 2022

The glsl-optimizer support cmake, maybe could be add to buildware also.

@halx99 halx99 linked a pull request Aug 11, 2022 that will close this issue
@Niborski
Copy link
Author

Yes indeed! I've modified the build script to generate the library from https://github.com/cocos2d/glsl-optimizer. Tomorrow I'll clean the scripts, modify the distribution scripts and make sure these only can be build for iOS and OSX.

From there the buildscripts should basically download and build everything (except perhaps luajit a I just cannot get those to work).

@Niborski
Copy link
Author

Niborski commented Aug 12, 2022

Done. Last commit in my fork should now also generate glsl-optimizer libraries and add them to the release zip. Again I did not look at the Powershell scripts as I do not have a Windows computer or VM available for that.

@halx99
Copy link
Member

halx99 commented Aug 12, 2022

The glsl-optimizer only for mac/ios, so no needs to build windows for it.

@halx99 halx99 closed this as completed in #6 Aug 12, 2022
@halx99
Copy link
Member

halx99 commented Aug 12, 2022

Seems we can't cross compile osx arm64(M1) through github actions:
image

@halx99
Copy link
Member

halx99 commented Aug 12, 2022

Apple M1 support is in github action roadmap, but not complete yet, refer to: github/roadmap#528

@Niborski
Copy link
Author

Niborski commented Aug 12, 2022 via email

@halx99
Copy link
Member

halx99 commented Aug 12, 2022

Let us wait the latest action finished and dist again

@halx99
Copy link
Member

halx99 commented Aug 12, 2022

Yes, maybe script error for openssl:

CONFIG_ALL_OPTIONS=darwin64-x86_64-cc no-tests no-comp no-async no-shared --prefix=/Users/runner/work/buildware/buildware/install_osx_arm64/openssl --openssldir=/Users/runner/work/buildware/buildware/install_osx_arm64/openssl

@Niborski
Copy link
Author

Niborski commented Aug 12, 2022 via email

@halx99
Copy link
Member

halx99 commented Aug 12, 2022

Yes, the github action only provide macos x86_64 vm currently

@Niborski
Copy link
Author

Niborski commented Aug 12, 2022 via email

@halx99
Copy link
Member

halx99 commented Aug 12, 2022

The logic check seems incorrect:
https://github.com/axys1/buildware/blob/main/1k/build1.sh#L78

@halx99
Copy link
Member

halx99 commented Aug 12, 2022

No worries, I will fix it

@Niborski
Copy link
Author

Just ran it again in my x64 Mac and my latest commit also fixes it. No need for an M1 runner 😉

@halx99
Copy link
Member

halx99 commented Aug 12, 2022

Good job

@halx99
Copy link
Member

halx99 commented Aug 12, 2022

The openssl osx arm64 seems still failed:

/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^

@Niborski
Copy link
Author

Might be due to the MacOS version of the runner and the commandline tools. Catelina does not support arm64 (only Big Sur and up). The scripts run correctly on a MacOS 12.5 system (Monterey). If you want I can run them for you.

@Niborski
Copy link
Author

MacOSX10.15.sdk is too "old".

@halx99
Copy link
Member

halx99 commented Aug 12, 2022

OK, I upgrade it, and works on github action: https://github.com/axys1/buildware/actions/runs/2849072550

@Niborski
Copy link
Author

Looks like it worked 👍

@Niborski
Copy link
Author

Niborski commented Oct 11, 2022 via email

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

Successfully merging a pull request may close this issue.

2 participants