-
-
Notifications
You must be signed in to change notification settings - Fork 419
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 "ld: library not found for -lSystem" on macOS Big Sur #3684
Comments
Some background that might be helpful (or perhaps not):
|
Can you give the output of |
Hi @SeanTAllen , thanks for looking into this!
Upgrade
and
I followed the instructions here: https://github.com/ponylang/ponyc/blob/master/INSTALL.md#macos |
Thanks. As far as I can tell (I don't have a Mac and our CI doesn't have Big Sur yet), with Big Sur they moved the location of a number of libraries. That MIGHT have an impact. I'm unsure. I'm trying to find someone in the Pony community who has a Big Sur install who might be able to help diagnose more fully. The limited information that I've found online for people experiencing similar problems with non-pony stuff is rather scattershot and doesn't provide any solid "it's definitely X" answers. |
@lutzh can you run |
I did, I don't think that's the problem, the output is
but I'm pretty sure the XCode command line tools and everything else are up to date, there are no updates displayed in "Software Update". I'm not quite sure where/how |
Thanks @lutzh. It does indeed look up to date. There's a This is the command that is failing. You should be able to try changing to it as long after it fails once you don't run any other ponyc commands in the same directory (at least this is the command based on what you pasted- assuming it is correct and there was no copy/paste etc munging):
It's quite possible that an additional path is needed for a -L to indicate where to find the System library. That in my mind is the most likely issue. If you can figure it out, we can do a PR to update the MacOS version going forward. Here's the code in ponyc where the ld command is set up: ponyc/src/libponyc/codegen/genexe.c Line 295 in 7c05e1f
|
Hi @SeanTAllen , Thanks again. Tried that, I can confirm that
does work and I got to the the "Hello, world!" output I was looking for. So it might be that some lookup rules changed in macOS 10.12 and this has to be passed to the linker as a library path. Or it might still be that some configuration is messed up just on my machine. I guess I could create a PR, but I hope what fixes it for me doesn't break it for anyone else. Do you really think I should? |
From what I've read, this appears to be something that will be needed in general for Big Sur. I'm surprised the xcode update didn't pick that change up automatically as what I read seemed to indicate that it would. Can you run "which ld" and put the output here. There's a couple other things to check which I'll add another note for once I'm not on my phone. |
@lutzh what happens if you run:
Do you get a working hello world application? |
Yes I did, see my comment #3684 (comment) As for your other question,
Maybe also of interest
|
Excellent. Thanks. So it appears the solution would be to add In The primary change therefore can be done here in genexe.c: ponyc/src/libponyc/codegen/genexe.c Line 295 in 7c05e1f
The only caveat is making sure that the memory to be allocated is adjusted at ponyc/src/libponyc/codegen/genexe.c Line 290 in 7c05e1f
|
@lutzh this is ready for someone to pick up the work. Would you like to do it? It's straightforward. You did most of the diagnosing, so I'd like to offer you the opportunity to fix it if you are interested, if you aren't that's ok too. |
Tbh given I only tried out ponyc for the first time this weekend and have never built it from source, it might be better someone else takes over from here. When I explore pony further, I'm sure there'll be ample opportunity to find some other issue to work on. |
I just ran into this github issue since I'm facing a similar issue (can't compile an app that uses the Just wanted to point out that I'm on a recently upgraded Big Sur machine and this directory doesn't exist anymore: |
@v-almonacid does this mean that the fix that worked for @lutzh doesn't work for you? |
@SeanTAllen I don't know, I'm not using this software. It's just a heads up. |
@v-almonacid Apple apparently had the ingenuous idea to delete the command line tools with every XCode update, but you should be able to make them reappear with |
@lutzh I did an upgrade to the command line tools just last night (this is a ~month after I upgraded to Big Sur), and even after doing I wonder whether this is related to (from Big Sur change logs):
|
@lutzh sorry, forget what I say, I think it's just that the upgrade was not complete (needed to accept license agreement, etc). |
I'm going to give this a try this weekend, so I'm assigning it to myself for now. |
I am using ifort on Big Sur and I ran into this issue, I have read through the comments but still, I am not sure how to resolve the issue. Can someone help me, please. |
Hi @alikhaledi the problem should be fixed in the next release. In the meantime, you can try compiling your programs like so:
Let us know if that works for you! |
This is fixed in 0.38.2 which was released within the last 10 minutes. |
Yes, I did but still, I get the same error. I have the following simple FORTRAN code Implicit none print*, 'Hello' end
|
@alikhaledi this isn't a fortran project. you'll need to consult with the project in question. this is an issue for the Pony programming language compiler only. |
Hi, I'm trying to compile a "Hello World" program on macOs Big Sur 11.0.1 (20B29)
but linking fails
Sorry if this is an FAQ... I literally tried pony for the very first time today, so please bear with me...
Thanks for your help!
The text was updated successfully, but these errors were encountered: