-
Notifications
You must be signed in to change notification settings - Fork 6
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
error: incompatible pointer to integer conversion in latest clang #6
Comments
I am seeing this too starting with Apple's command line tools version 15.3. If I revert to CLT 15.1, I am able to compile my binaries with ruby-packer. I'd be happy to submit a PR, but I have no idea where to start. Any pointers would be appreciated. I'd also love to learn how to add support for newer Ruby versions. Is it as simple as it was for replacing OpenSSL 1.1 with OpenSSL 3.x (i.e just downloading OpenSSL and plopping it in the vendor folder), or is there some patching of Ruby involved? cc @ericbeland |
Hi, just to confirm, I decided to stop trying to support this for a couple reasons.
@monfresh In terms of updating, I'm trying to remember. The process was roughly to just dump the files in and replace the libraries with the latest, and if they still compiled, keep them. When things failed I would look into what it was trying to run, try it at the command line, and google the heck out of whatever compile errors Now, i would probably use Bing (it is beating google for errors like this for me) and chatgpt. It is quite possible that upgrades are easier now. The trick for later rubies, back then, was hacking some compiler flags, iirc. |
@ericbeland considering this fork is still pretty high in Google, if you're no longer interested in maintaining it (which makes sense, packaging Ruby apps is a full time job 🥲) I think it would be nice if you updated README to point to alternatives and then archived the repo. At this point it's slowly rotting anyway since it doesn't work on latest macOS (and will likely stop working on Linux as well at some point) |
@d4rky-pl I'm open to that--it made sense when I had a business case. If anyone with a fork of ruby-packer wants into the list, or with an alternative, let me know! Please let me know of any other alternatives I should list as well. |
Thank you both for the details. Coincidentally, I had recently come across tebako, but if I'm understanding the README correctly, their "forward portable" philosophy is a huge limitation for me. It would mean that I would need to buy a separate Mac and install Monterey on it, and use it exclusively for building my CLI, in order for the resulting binaries to be executable on newer macOS versions. With ruby-packer, I can build using my day-to-day Mac that's running on Sonoma, and the resulting binaries work just fine on older macOS versions. However, I won't be able to do this once I upgrade to Sequoia because it doesn't support CLT 15.1, unless I figure out a way to get ruby-packer to work with newer CLT. An alternative option I'm considering is porting my CLI to Crystal. |
Good news! I downloaded Ruby 3.2.5 and put it in my local ruby-packer repo, and it worked with Xcode 15.4! Here's roughly what I did:
The next step is to see if I can build my CLI with this new |
Ha! I spoke too soon. It looks like the |
I wish I had a better recollection of being in the weeds, but I think I may recall that I did something like diffing the actual Ruby source of the version, vs. the embedded ruby source vs. the original of the same version, and found there were changes to it around the enclose code. I think I then added those changes in to the new unzipped ruby, then recompiled. |
Success! I figured out the compilation error with the current repo. Looking more closely at the error, it was complaining that the So then I noticed that the integer it's expecting is supposed to represent the This fixed that error, but I also ran into some libffi errors, but in my case, I don't need libffi, and I don't need gdbm, ncurses, or readline either, so I commented out where they get stuffed in I then tried the same thing with Ruby 3.2.5, making sure to keep all the |
When trying to build
ruby-packer
or a project withruby-packer
on latest MacOS with clang 15.0.0, it fails with the following errors:The text was updated successfully, but these errors were encountered: