-
Notifications
You must be signed in to change notification settings - Fork 392
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
Linker fails with cross, but builds otherwise inside the same docker image #643
Comments
I'd appreciate any feedback on how to approach this issue and what else to try. A simple check to see whether ld can find libjack:
Thanks! |
Can you try basing your image on the newest image here: https://github.com/cross-rs/cross/pkgs/container/x86_64-unknown-linux-gnu |
Thanks @Emilgardis! I pulled the new image, added EPEL repo, and installed (an older version of Jack) with yum (the image's been apparently changed from ubuntu to centos?). Same result, unfortunately: I repeated the test with |
alright, I feel like there is something wrong in how cargo invokes ld, can you run with also, you bring up a good point, we should possibly have the centos image be named something else, the reason for using centos is due to glibc compatibility, but I don't think many are going to be interested in that. We should provide a ubuntu based image for |
I ran it with Anyway, if you spot anything of significance, let me know what to try next (sorry, but I am no expert in C flags, even less so for rust :(). Interestingly enough, the test program (below) compiles without problems with #include <jack/jack.h>
int main(int argc,char**argv)
{
jack_client_t* jc;
jack_status_t stat;
jc = jack_client_open("test",0,&stat);
if( jc )
jack_client_close( jc );
return 0;
} logs
|
do you have a way for us to reproduce this? also the logs don't tell much, I'd need the full output, including what cross and cargo does |
@Emilgardis, while preparing a repro, I figured it out. I was using
Notice the hyphen ( Anyway, thanks a lot for your help! I appreciate it! Perhaps an error should be thrown when (custom) image is not found? /close |
great! I think this type of error is very sneaky, reason being it may well be a valid target. I think the most logical way to warn/detect this case is to normalize |
I'm building a proggy which depends on JACK and I'm getting an error when building with cross (complete log at the end):
I'm running this on Mac (x64) otherwise. In trying to fix the
cannot find -ljack
error, I also built a custom docker image, referenced it inCross.toml
and created./cargo/config.toml
.Cross.toml:
./cargo/config.toml:
If I test if
gcc
can find the library, the test is successful:This is also the case with ldconfig -p:
But I can't figure out what is going on. I then installed rust in this image, mounted the sources and
cargo build
them and it was done. So I'm guessing there's something wrong with my configuration, understanding or... perhaps with my usage of cross?I'd appreciate any feedback, thanks!
Complete log
The text was updated successfully, but these errors were encountered: