Skip to content
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: linking with c:/msys64/mingw64/bin/arm-none-eabi-gcc.exe failed: exit code: 1 #21

Open
iamwacko opened this issue May 10, 2022 · 2 comments

Comments

@iamwacko
Copy link

I have been trying to compile this project with MSYS2 for a while now, but I keep getting this error:
= note: c:/msys64/mingw64/bin/../lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld.exe: warning: -z relro ignored
c:/msys64/mingw64/bin/../lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lgcc_s
c:/msys64/mingw64/bin/../lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lutil
c:/msys64/mingw64/bin/../lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lrt
c:/msys64/mingw64/bin/../lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -lpthread
c:/msys64/mingw64/bin/../lib/gcc/arm-none-eabi/10.1.0/../../../../arm-none-eabi/bin/ld.exe: cannot find -ldl
collect2.exe: error: ld returned 1 exit status

I know this means that the linker can't find the libraries libqcc, libutil, librt, libpthread, and libdl. I just haven't found any way to include these libraries. Any help would be greatly appreciated.

@pixix4
Copy link
Owner

pixix4 commented May 10, 2022

Hmm, I probably can't help too much with MSYS2 errors. I've rarely tried building on Windows (cause I don't use Windows regularly). With WSL2 and Powershell (with the rustup installer) I was able to build it without any problems. Can you try it with WSL2? Alternatively, I need more information to be able to reproduce your setup (how/where did you install rust, which command do you use to build, did you modify any configs, ...)

@iamwacko
Copy link
Author

iamwacko commented May 10, 2022

Here is a list of all of the packages that are installed. My cargo config just looks like this: [target.armv5te-unknown-linux-gnueabi] linker = "c:/msys64/mingw64/bin/arm-none-eabi-gcc.exe". I ran cargo build --release --target armv5te-unknown-linux-gnueabi to build. Rust is installed in C:/Users/myusername/. In the .bashrc I have export PATH=$PATH:/c/Users/myusername/.cargo/bin. This should be everything you need to reproduce my situation.

This isn't a top priority to me, so I'm just going to use linux to compile this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants