-
Notifications
You must be signed in to change notification settings - Fork 95
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
can't use the output of rubyc on an older version of MacOs, because of Dynamic Libraries #128
Comments
I should have mentioned more info. I have tried every flavour of Xcode. |
@michaelcinquin Hi Michael, thanks for reporting the issue. An essentially similar issue that was once mentioned by @bkmgit was recorded here: #109 I have been aware of the problem for some time. The solution is very apparent to me: we should build the binaries on a machine that is as old as possible (apart from making the runtime dynamic lib dependencies as few as possible), so that it can run on a wider range of platforms because of runtime-lib compatibilities. Currently the binaries in the README were built by Github Action runners, which are definitely too new, i.e. I plan to switch to the oldest runners available on Github Action soon, i.e. There will be some fine-tuning needed after switching those CI runner platforms. Due to weekday work, I have to work on it during my next weekend. Pull requests are also greatly welcome! |
Thanks for the feedback ! Though I'm not sure it's a problem with the version of rubyc binary:
I've been using the very same binary :
* to pack from MacOs 10.12 ; the packed binary works with all versions > 10.12
* to pack from MacOS 10.14 : the packed binary works only with versions > 10.14
I hope it's workable ;-)
… On 2 Sep 2020, at 01:27, Minqi Pan ***@***.***> wrote:
@michaelcinquin <https://github.com/michaelcinquin> Hi Michael, thanks for reporting the issue. An essentially similar issue that was once mentioned by @bkmgit <https://github.com/bkmgit> was recorded here: #109 <#109>
I have been aware of the problem for some time. The solution is very apparent to me: we should build the binaries on a machine that is as old as possible (apart from making the runtime dynamic lib dependencies as few as possible), so that it can run on a wider range of platforms because of runtime-lib compatibilities. Currently the binaries in the README were built by Github Action runners, which are definitely too new, i.e. ubuntu-20.04, macos-10.15 and windows-2019.
I plan to switch to the oldest runners available on Github Action soon, i.e. ubuntu-16.04 and windows-2016. That should be able to solve the problems on Linux and Windows. However, Github Actions does not seem to provide old enough platforms for macOS. For that, I plan to use Travis CI beacuse they seem to provide runners for macOS 10.11 (osx_image: xcode7.3).
There will be some tuning after switching those CI runner platforms. Due to work I have to work on it during my next weekend.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#128 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAZM7VMAVTNRCYCIGAJC7HTSDV7MPANCNFSM4QSDFWVQ>.
|
@pmq20 i have hit the same issue i think ( #143 ) and looked at the build strategy for traveling-ruby which, i'm sure, you are aware of. it sure would be super duper awesome and amazing if you combined forced with @FooBarWidget to extract the holy build box strategy they've developed, since it would seem that tying to github actions is always going to float versions up and be difficult to perfectly control. but i may be wrong, just thinking out loud and confirming this is a real issue. finally, ruby-packer is awesome and i really am looking forward to releasing some new code via the project. thanks! |
I recently refreshed Holy Build Box and fixed a lot of issues. I think that's the easiest way to build portable binaries for Linux. |
As for macOS, you actually don't need to build on an older macOS. You do however need two things:
|
Thank you so much! This is exactly the answer I needed, it works perfect! And this page is today the only one in the world containing the words "enclose.io" and "MACOSX_DEPLOYMENT_TARGET" ;-) |
…ub Action" This reverts commit 08059fc.
Hi
I use rubyc to pack a ruby script, that uses quite a few gems, some of which have c-code such as Nokogiri.
I use rubyc as so:
rubyc myScript.rb -o myBinary
But the output of my rubyc is linked to some Dynamic Libraries :
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
/usr/lib/libSystem.B.dylib
/usr/lib/libobjc.A.dylib
/usr/lib/libutil.dylib
When I run the binary on an older system, the versions don't match, and the binary crashes:
If I study the binary output by rubyc with otool, the versions mismatch are apparent:
Is there a way to use a rubyc output binary on an older system?
(could we use --make-args or something to force the use of static libraries?)
thanks !
The text was updated successfully, but these errors were encountered: