-
Notifications
You must be signed in to change notification settings - Fork 36
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
ld -rpath error when compiling on Mac (12.0.1) #127
Comments
I think |
I tried recompiling perl through perlbrew with no change. This installation was attempted with |
This web page says you need to add First, do a |
Looking at your build.log, I'm worried that your macOS SDK is too old, based on this line:
Your PostgreSQL installation is also very old (9.6) and may have been built using 10.3? I think that's where the In both cases, the PostgreSQL code and the macOS SDK need to be built for macOS 10.5+. Maybe do something like this to update your SDK?
And then download and compile a more recent PostgreSQL version? |
Thanks. I tried updating the xcode CommandLineTools, updating Postgres to 16 (via Postgres.app), but that didn't seem to make a difference. Adding Unfortunately once I try to run it (this is an M1 mac) I get the following error: Or in full:
|
If you are on an M1 Mac, then you shouldn't need x86_64 at all unless either your Perl or your PostgreSQL installation is x86_64? Run the |
Yeah, I have no idea what the install scripts are doing or how the file architecture's are chosen, etc. That's why I opened this bug. I should be able to just type 'cpanm DBD::Pg'
|
That's not either of the two files I said to run
|
Sorry, I misunderstood. Perl is (for reasons I don't yet know)
|
Your previous commands showed you using Perl 5.40.0, but that output says you're using Perl 5.38.2. Regardless, it would seem that that's the problem. Your Perl is x86_64 even though your architecture is Apple Silicon, and it's not even a dual-architecture compile. I suggest asking the perlbrew people about that. If you can fix that, you should be in the home stretch to getting DBD::Pg to work. I suppose you could force DBD::Pg to compile as x86_64, but I don't think you want to do that. |
Yeah, all perlbrew perl's are x86_64. As I noted I tried recompiling for good measure. |
Try prefixing your perlbrew (and cpanm) commands with Or maybe switch to Homebrew: https://formulae.brew.sh/formula/perl |
Using perl-5.40.0 from perlbrew I get the following error (full build log attached):
If I naively remove the "-rpath" argument, it builds but gives these warnings:
Which, if used, result in runtime errors:
mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
The text was updated successfully, but these errors were encountered: