-
Notifications
You must be signed in to change notification settings - Fork 935
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
Fix installSbtn for apple silicon #7426
Conversation
val isArmArchitecture: Boolean = sys.props | ||
.getOrElse("os.arch", "") | ||
.toLowerCase(java.util.Locale.ROOT) == "aarch64" | ||
val arch = if (Properties.isLinux && isArmArchitecture) "aarch64" else "x86_64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ipcsocket we created a universal binary, but for sbtn we didn't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like it - I downloaded sbt-1.9.7.zip:
> file **/sbtn-*
sbt/bin/sbtn-aarch64-apple-darwin: Mach-O 64-bit executable arm64
sbt/bin/sbtn-aarch64-pc-linux: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=95129380deb32d427b65bed01926e14e03defe43, for GNU/Linux 3.7.0, with debug_info, not stripped
sbt/bin/sbtn-x86_64-apple-darwin: Mach-O 64-bit executable x86_64
sbt/bin/sbtn-x86_64-pc-linux: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=c847d01e7dc66b4544e2f97cea0e46952b5554ae, for GNU/Linux 3.2.0, with debug_info, not stripped
sbt/bin/sbtn-x86_64-pc-win32.exe: PE32+ executable (console) x86-64, for MS Windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But actually you're right - a fat binary would be much better here.
Can you please point me to the place where the binaries are built before archiving?
It took me embarassing amount of time to get the iterator logic right and I'm super sad to see it being discarded :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a repo called sbt/sbtn-dist where we send CI job to Cirrus for aarch 64. Not sure how difficult it would be to create another job that waits and combines the outputs.
Closing this in favor of #7551 |
(2) is possibly controversial, because using sbtn through rosetta is always problematic.
But I'm just replicating current behaviour