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

Adding Mac Mini runner for arm64 (M1) packages #578

Merged
merged 22 commits into from
Dec 6, 2022
Merged

Conversation

macumber
Copy link
Collaborator

No description provided.

@macumber
Copy link
Collaborator Author

macumber commented Nov 26, 2022

@jmarrec getting this error when trying to run the OS 3.5.0 CLI on Mac Mini with M1 processor

(py39)irvinemac@~$ /Users/irvinemac/git/OSApp-build/OpenStudio-3.5.0/OpenStudio-3.5.0+7b14ce1588-Darwin-arm64/bin/openstudio
dyld: Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
  Referenced from: /Users/irvinemac/git/OSApp-build/OpenStudio-3.5.0/OpenStudio-3.5.0+7b14ce1588-Darwin-arm64/bin/../lib/libopenstudiolib.dylib (which was built for Mac OS X 12.1)
  Expected in: /usr/lib/libc++.1.dylib

Might be because the Mac Mini was on OS 11.6 (20G165), I'll update it

Updating the Mac Mini to 13.0.1 fixed the build issues!

@macumber
Copy link
Collaborator Author

It's odd that my commits from the Mac Mini are showing up as you @jmarrec, I generated and used a new token under my account to do the commits. I guess I need to change the global config too.

@jmarrec
Copy link
Collaborator

jmarrec commented Nov 28, 2022

I'm downloading the dmg package for arm64 and will test it on my machine to make sure it works. OpenStudioApplication-1.4.1.758c1c5864d6b42ecb9ca3a8dd8a1ece2682a1c9-macos-arm64.dmg

I'm getting an issue with the Measure Manager, this is probably not due to this specific PR though.

image

$ OPENSTUDIO_APPLICATION_DEBUG=1 /Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp
[OpenStudioApplicationPathHelpers] <-2> getOpenStudioApplicationModule, info.dli_fname = '/Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp'
[PathHelpers] <-2> completeAndNormalize: result = /Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp
[ApplicationPathHelpers] <-2> getOpenStudioApplicationModule, found '/Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp'
[OpenStudioApplicationPathHelpers] <-2> Searching for CLI in '/Users/irvinemac/actions-runner/_work/OpenStudioApplication/OpenStudioApplication/build/OpenStudio-3.5.0/OpenStudio-3.5.0+7b14ce1588-Darwin-arm64/bin/openstudio'
[OpenStudioApplicationPathHelpers] <-2> getOpenStudioApplicationModule, info.dli_fname = '/Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp'
[PathHelpers] <-2> completeAndNormalize: result = /Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp
[ApplicationPathHelpers] <-2> getOpenStudioApplicationModule, found '/Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp'
[OpenStudioApplicationPathHelpers] <-2> Searching for CLI in '/Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/../bin/openstudio'
[openstudio.OSAppBase] <-2> Starting measure manager server at http://127.0.0.1:50139
[OpenStudioApplicationPathHelpers] <-2> getOpenStudioApplicationModule, info.dli_fname = '/Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp'
[PathHelpers] <-2> completeAndNormalize: result = /Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp
[ApplicationPathHelpers] <-2> getOpenStudioApplicationModule, found '/Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp'
[OpenStudioApplicationPathHelpers] <-2> Searching for CLI in '/Users/irvinemac/actions-runner/_work/OpenStudioApplication/OpenStudioApplication/build/OpenStudio-3.5.0/OpenStudio-3.5.0+7b14ce1588-Darwin-arm64/bin/openstudio'
[OpenStudioApplicationPathHelpers] <-2> getOpenStudioApplicationModule, info.dli_fname = '/Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp'
[PathHelpers] <-2> completeAndNormalize: result = /Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp
[ApplicationPathHelpers] <-2> getOpenStudioApplicationModule, found '/Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/OpenStudioApp'
[OpenStudioApplicationPathHelpers] <-2> Searching for CLI in '/Applications/OpenStudioApplication-1.4.1-alpha/OpenStudioApp.app/Contents/MacOS/../bin/openstudio'
[openstudio.OSAppBase] <-2> Command:  measure -s 50139
Warning: QIODevice::read (QProcess): device not open ((null):0, (null))
Warning: QIODevice::read (QProcess): device not open ((null):0, (null))

@jmarrec
Copy link
Collaborator

jmarrec commented Nov 28, 2022

I had botched the configure of thre OpenStudioApplicationPathHelpers.cxx.in in #566, c90605e should fix it

COMPRESSED_EXT: tar.gz
BINARY_PKG_PATH: _CPack_Packages/Darwin/IFW
COMPRESSED_PKG_PATH: _CPack_Packages/Darwin/TGZ
MACOSX_DEPLOYMENT_TARGET: 10.14
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably too old really. I build the E+ and OS SDK with MACOSX_DEPLOYMENT_TARGET=12.1 on my machine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I see 10.15 in both EnergyPlus and OpenStudio. Agree that we could be less accommodating if we need, I'd say we update to 10.15 unless there are problems in 10.15 and then go to 11.

Copy link
Collaborator

@jmarrec jmarrec Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I build the arm64 packages myself, so that's local to my machine. see https://github.com/NREL/EnergyPlus/releases/tag/v22.2.0 for eg, you'll see the (only) arm64 package has 12.1 in the name.

Couple of datapoints:

  • Release dates:
    • Big Sur: November 12, 2020
    • Mac Mini M1 2020: November 17, 2020
    • Monterey: October 25, 2021
    • Macbook Pro 2021 M1: October 25, 2021
  • The Mac Mini (M1, 2020), which was as far as I know the first commercial M1 mac, was on Big Sur, so 11.x. At that point in time, I used Irvine's mac mini to build E+ package, and set the deployment target to 11.2.
  • My MBP M1 shipped with Monterrey (12.x)
  • I reckon people with M1 machines are more likely to be on the bleeding edge anyways.

So I figured I could just bump to 12.1, to match the macos-12 github actions runner. (I may have had another reason that is escaping me at the moment).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I get linker warnings that 12.1 is newer than the target 11.0 when I link with the OpenStudio build, did you build the OpenStudio packages for M1 with 12.1 too?

warning: dylib (../../OpenStudio-3.5.0/OpenStudio-3.5.0+7b14ce1588-Darwin-arm64/lib/libopenstudiolib.dylib) was built for newer macOS version (12.1) than being linked (11.0)

If so, I guess there is no reason to try to be more backward compatible than OpenStudio is. Looks like the conan stuff is being built for 11.2.

Comment on lines +280 to +283
if [ "${{matrix.SELF_HOSTED}}" = "true" ]; then
echo "Using previously installed ninja and IFW"
echo "/Users/irvinemac/Qt/Tools/QtInstallerFramework/4.3/bin/" >> $GITHUB_PATH
else
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All that stuff should just be preconfigured on the machine perhaps? And we can just skip the step entirely if self hosted

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(maybe we should have a dedicated workflow yml file for the self hosted?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about both of those. I wanted to try the caching and see how it goes, seems like it's not worth it. I'd prefer to keep a single workflow file otherwise I'm sure they'll diverge.

.github/workflows/app_build.yml Outdated Show resolved Hide resolved
.github/workflows/app_build.yml Show resolved Hide resolved
@jmarrec
Copy link
Collaborator

jmarrec commented Nov 29, 2022

Still having an issue with the packaging. Not the fault of this PR I think, though I do see packaging CPACK issuing errors: https://github.com/openstudiocoalition/OpenStudioApplication/actions/runs/3575395655/jobs/6011876669#step:19:1009

CMake Error: failed to create symbolic link '/Users/irvinemac/actions-runner/_work/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/Darwin/IFW/OpenStudioApplication-1.4.1-alpha+e611bc884a-macOS11-arm64/packages/Unspecified/data/OpenStudioApp.app/Contents/Frameworks/QtWebEngineCore.framework/Versions/A/Helpers/QtWebEngineProcess.app/Contents/Frameworks': No such file or directory
CMake Error: failed to create symbolic link '/Users/irvinemac/actions-runner/_work/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/Darwin/IFW/OpenStudioApplication-1.4.1-alpha+e611bc884a-macOS11-arm64/packages/Unspecified/data/OpenStudioApp.app/Contents/EnergyPlus': No such file or directory
CMake Error: failed to create symbolic link '/Users/irvinemac/actions-runner/_work/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/Darwin/IFW/OpenStudioApplication-1.4.1-alpha+e611bc884a-macOS11-arm64/packages/Unspecified/data/OpenStudioApp.app/Contents/Radiance': No such file or directory
CMake Error: failed to create symbolic link '/Users/irvinemac/actions-runner/_work/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/Darwin/IFW/OpenStudioApplication-1.4.1-alpha+e611bc884a-macOS11-arm64/packages/Unspecified/data/OpenStudioApp.app/Contents/Frameworks/libpythonengine.so': No such file or directory
CMake Error: failed to create symbolic link '/Users/irvinemac/actions-runner/_work/OpenStudioApplication/OpenStudioApplication/build/_CPack_Packages/Darwin/IFW/OpenStudioApplication-1.4.1-alpha+e611bc884a-macOS11-arm64/packages/Unspecified/data/OpenStudioApp.app/Contents/Frameworks/librubyengine.so': No such file or directory

image

@macumber
Copy link
Collaborator Author

macumber commented Dec 3, 2022

Hmm I don't see those errors when building locally in the home directory, I'll look into it. Nevermind, when I configured for IFW I see the error

@macumber
Copy link
Collaborator Author

macumber commented Dec 3, 2022

@jmarrec the symlinks were being installed in the Unspecified component instead of OpenStudioApp. There were also some issues after updating Xcode but I think those are good now. Do these packages work for you now?

@macumber macumber requested a review from jmarrec December 4, 2022 04:49
@jmarrec jmarrec closed this Dec 5, 2022
@jmarrec jmarrec reopened this Dec 5, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2022
@openstudiocoalition openstudiocoalition unlocked this conversation Dec 5, 2022
@jmarrec
Copy link
Collaborator

jmarrec commented Dec 5, 2022

Sorry about the closing / reopening, I misclicked by accident... I'm testing out the package right now, will report back.

@jmarrec
Copy link
Collaborator

jmarrec commented Dec 5, 2022

@jmarrec the symlinks were being installed in the Unspecified component instead of OpenStudioApp. There were also some issues after updating Xcode but I think those are good now. Do these packages work for you now?

All good apparently! Thanks @macumber !

@macumber macumber merged commit c019265 into develop Dec 6, 2022
@macumber macumber deleted the macmini_runner branch December 6, 2022 04:16
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2022
@jmarrec jmarrec changed the title Adding Mac Mini runner Adding Mac Mini runner for arm64 (M1) packages Dec 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants