-
Notifications
You must be signed in to change notification settings - Fork 114
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
Fails to link cargo (library order error between curl
and ssh2
)
#138
Comments
Probably caused by mrustc not emitting libraries in the correct order, but not sure where it could be going wrong. |
What platform are you compiling on/for? If it's guix, then I might close this in favour of #140 |
curl
and ssh2
)
Hi, I'm having the same issue as #140 while building in my build environment. Is this a problem in the order of load_build_script in manifest.cpp? |
It looks like the problem occurs in the function finalise in src/trans/codegen_c.cpp |
I've meant to look up what linker arguments It's not an explicit error in |
Would --start-group and --end-group be a "good" temporary workaround? |
Yes... may not end up being temporary either :) |
Could using |
Interesting - My test builds have objects in a different order, which implies that there's some non-determininisim involved in the linker order (maybe an |
Confirmed: The list used to create the library link section of the final command is an |
Probable fix committed in f89824b |
@dtolnay Can you confirm that the above fix solved the issue for you? |
|
@arlosi Is there an alternative that has the same effect? |
@thepowersgang macOS uses its own linker which doesn't support hints. WebAssembly is using The simplest way to bring hints to macOS is switch to |
|
@bjorn3 I expect that it simple keeps order of provided arguments. To be honest: a few times when I needed it, it works like that. But I never try to answer why. |
e2a759a moved |
When running
make -f minicargo.mk output/cargo
, one of the commands mrustc 0.9 tries to run is:On my system this fails with:
It is almost correct though. The
-l
flags there at the end are:Adding (another)
"-l" "curl"
immediately before the"-l" "ssh2"
fixes the problem and links successfully.Is this something that would need to be fixed in mrustc, in Cargo or its dependencies, or somewhere else?
The text was updated successfully, but these errors were encountered: