I met the same problem and sudo apt-get install libnewlib-arm-none-eabi helped me.
Top answer 1 of 2
7
I met the same problem and sudo apt-get install libnewlib-arm-none-eabi helped me.
2 of 2
2
I was getting the following when trying to run a build:
/usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: cannot find -lstdc++
I had installed the packages on Ubuntu using sudo apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi make dfu-util but it seems there is one more that is required (at least for my system). After installing libstdc++-arm-none-eabi-newlib it was able to find the correct file.
Here are the files included in that package on my system:
$ apt-file show libstdc++-arm-none-eabi-newlib | grep -e "stdc++.a$"
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/armv6-m/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/armv7-ar/thumb/fpu/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/armv7-ar/thumb/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/armv7-ar/thumb/softfp/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/armv7-m/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/armv7e-m/fpu/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/armv7e-m/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/armv7e-m/softfp/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/fpu/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/mthumb/march=armv7/mfloat-abi=hard/mfpu=vfpv3-d16/mbig-endian/libstdc++.a
libstdc++-arm-none-eabi-newlib: /usr/lib/arm-none-eabi/newlib/thumb/libstdc++.a
Debian Manpages
manpages.debian.org › testing › binutils-arm-none-eabi › arm-none-eabi-ld.1.en.html
arm-none-eabi-ld(1) — binutils-arm-none-eabi — Debian testing — Debian Manpages
For programs that do not use constructors or destructors, or for ELF based systems this option is equivalent to -r: it generates relocatable output---i.e., an output file that can in turn serve as input to ld. For other binaries however the -Ur option is similar to -r but it also resolves references to constructors and destructors. For those systems where -r and -Ur behave differently, it does not work to use -Ur on files that were themselves linked with -Ur; once the constructor table has been built, it cannot be added to.
Launchpad
answers.launchpad.net › gcc-arm-embedded › +question › 262827
Question #262827 “arm-none-eabi-ld cannot find -lgcc” : Questions : GNU Arm Embedded Toolchain
Hi, I installed this toolchain on Ubuntu 14.04 but when I go to compile a project I get an error: /home/marlon/Downloads/gcc-arm-none-eabi-4_9-2014q4/bin/arm-none-eabi-ld: cannot find -lgcc I've specified -nostdlibs and -lgcc as linker arguments. My colleague has installed the same toolchain on his Ubuntu 14.04 installation and it works correctly for him. libgcc.a is in /home/marlon/Downloads/gcc-arm-none-eabi-4_9-2014q4/lib/gcc/arm-none-eabi/4.9.3/armv6-m, and that path has been given t...
Launchpad
answers.launchpad.net › gcc-arm-embedded › +question › 250415
Question #250415 “arm-none-eabi-ld linking with libc” : Questions : GNU Arm Embedded Toolchain
June 18, 2014 - Suggest you to use arm-none-eabi-gcc rather than the arm-none-eabi-ld.
Arm Community
community.arm.com › support-forums › f › compilers-and-libraries-forum › 52126 › linking-with-arm-none-eabi-gcc-instead-of-arm-none-eabi-ld
Linking with arm-none-eabi-gcc instead of arm-none-eabi-ld
January 14, 2022 - Have a question about working on Arm technology? Browse our support forums for solutions to your questions, answer questions from fellow community members and get help from Arm experts.
GitHub
github.com › im-tomu › tomu-quickstart › issues › 9
arm-none-eabi/bin/ld: cannot find -lstdc++ error when running make · Issue #9 · im-tomu/tomu-quickstart
July 19, 2018 - $ make CC miniblink.c miniblink.o LD miniblink.elf /usr/lib/gcc/arm-none-eabi/4.9.3/../../../arm-none-eabi/bin/ld: cannot find -lstdc++ collect2: error: ld returned 1 exit status ../Makefile.common:59: recipe for target 'miniblink.elf' failed make: *** [miniblink.elf] Error 1
Author gbrayut
Arch Linux Forums
bbs.archlinux.org › viewtopic.php
Issues with v7e-m libraries from arm-none-eabi-ld when building myevic / Applications & Desktop Environments / Arch Linux Forums
November 7, 2020 - Additionally there isn't a libgcc.a library anywhere within the /usr/arm-none/eabi path. ┌─[tsvetkov@anna] - [~/Documents/builds/evic_firmware/myevic] - [Sat Nov 07, 15:56] └─[$] <git:(master*)> find /usr/arm-none-eabi -type f | grep "libnosys.a\|libgcc.a\|libc.a\|libm.a" | grep v7e /usr/arm-none-eabi/lib/thumb/v7e-m/nofp/libnosys.a /usr/arm-none-eabi/lib/thumb/v7e-m/nofp/libc.a /usr/arm-none-eabi/lib/thumb/v7e-m/nofp/libm.a /usr/arm-none-eabi/lib/thumb/v7e-m+fp/softfp/libnosys.a /usr/arm-none-eabi/lib/thumb/v7e-m+fp/softfp/libc.a /usr/arm-none-eabi/lib/thumb/v7e-m+fp/softfp/libm.a /us
Stack Overflow
stackoverflow.com › questions › 66482512 › arm-none-gcc-ld-error-cannot-find-the-object-file-even-though-it-exists-with-t
c - arm-none-gcc-ld error : cannot find the object file even though it exists with the proper path - Stack Overflow
#include header files directory vpath %.h = include vpath %.o = obj #create a list of *.c from the source directory SRC = $(wildcard src/*.c) OBJ = $(SRC:src/%.c=%.o) main.elf: $(OBJ) $(CC) $(LDFLAGX) $(addprefix obj/,$(OBJ)) -o $@ %.o : %.c $(CC) $(CPPFLAGS) $(CFLAGS) -c $^ -o obj/$@ ... arm-none-eabi-gcc -Iinclude -mcpu=cortex-m3 -mthumb -std=gnu11 -O0 -g -Wall -c src/RCC.c -o obj/RCC.o arm-none-eabi-gcc -Iinclude -mcpu=cortex-m3 -mthumb -std=gnu11 -O0 -g -Wall -c src/SPI.c -o obj/SPI.o arm-none-eabi-gcc -Iinclude -mcpu=cortex-m3 -mthumb -std=gnu11 -O0 -g -Wall -c src/main.c -o obj/main.o ar
Stack Overflow
stackoverflow.com › questions › 69898048 › raspbian-arm-none-eabi-ld-cannot-find-lm
c - Raspbian: arm-none-eabi-ld: cannot find -lm - Stack Overflow
It looks like the math libraries are part of a recommended package and not a dependency: packages.debian.org/sid/gcc-arm-none-eabi. Jonathon S. – Jonathon S. 2021-11-09 12:38:31 +00:00 Commented Nov 9, 2021 at 12:38 ... Why do you use the arm-none-eabi toolchain?
Arm Community
community.arm.com › support-forums › f › compilers-and-libraries-forum › 52304 › arm-none-eabi-ld-cannot-set-target-architecture
arm-none-eabi-ld: Cannot set target architecture
February 20, 2022 - Have a question about working on Arm technology? Browse our support forums for solutions to your questions, answer questions from fellow community members and get help from Arm experts.
Stack Overflow
stackoverflow.com › questions › 43754007 › arm-none-eabi-ld-to-tell-object-files-directory
embedded - arm-none-eabi-ld, to tell object files directory - Stack Overflow
Therefore, you could try to reorder it, such as $arm-none-eabi-ld build/start.o build/main.o -T Application/linker.ld -lc -o kernel.elf. ... Find the answer to your question by asking.
Raspberry Pi Forums
forums.raspberrypi.com › board index › hardware and peripherals › raspberry pi pico › sdk
[UPDATE: SOLVED] Apple (M2): arm-none-eabi-gcc is missing the nosys.specs file - Raspberry Pi Forums
September 2, 2023 - make[2]: *** [pico-sdk/src/rp2_common/boot_stage2/bs2_default.elf] Error 1 make[1]: *** [pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/all] Error 2 make: *** [all] Error 2 So basically my arm-none-eabi-gcc is missing his nosys.specs file. Therefor my finaI questions is: How do I add the 'nosys.specs' file or how do I reinstall the gcc correct so I get this file? Sorry for my broken english. And thanks in advanced! Last edited by Felix1202 on Sat Sep 02, 2023 8:53 pm, edited 1 time in total. ... That was it! After I removed the old arm-gcc and installed the new everything worked.
GitHub
github.com › rust-lang › rust › issues › 113597
Regression when using `linker=arm-none-eabi-gcc` · Issue #113597 · rust-lang/rust
July 12, 2023 - It recently encountered an error when using arm-none-eabi-gcc in nightly builds since #112910. The most likely culprit is that the failing version has started added "-fuse-ld=lld" to the linker arguments, which was not present in previous working ...
Author adamgreig
Texas Instruments E2E
e2e.ti.com › support › tools › code-composer-studio-group › ccs › f › code-composer-studio-forum › 916618 › ccs-msp432p401r-energia-project-arm-none-eabi-bin-ld-cannot-find--lmsp432r_msp-exp432p410r_pubsubclient
CCS/MSP432P401R: Energia project: arm-none-eabi/bin/ld: cannot find -lmsp432r_MSP-EXP432P410R_PubSubClient
June 23, 2020 - Part Number: MSP432P401R Tool/software: Code Composer Studio Hello, ive been having issues with this energia library, before it did work but i removed a dependency
Stack Exchange
raspberrypi.stackexchange.com › questions › 23271 › cannot-find-lgcc-lc
cross compilation - Cannot find -lgcc -lc - Raspberry Pi Stack Exchange
September 14, 2014 - arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.4 20140401 (release) [ARM/embedded-4_7-branch revision 209195] Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. The makefile for the project specifies two lines, which I've modified as follows: kernel.elf: LDFLAGS += -L "/usr/local/gcc-arm-none-eabi-4_7-2014q2/bin/" -lgcc kernel.elf: LDFLAGS += -L "/usr/local/gcc-arm-none-eabi-4_7-2014q2/lib/" -lc
Raspberry Pi Forums
forums.raspberrypi.com › board index › programming › bare metal, assembly language
Anyone can compile the LdB sample on linux? - Raspberry Pi Forums
The gcc version arm-none-eabi-gcc --version arm-none-eabi-gcc (4.8.4-1+11-1) 4.8.4 20141219 (release) The error: arm-none-eabi-ld: cannot find libc.a Makefile:35: recipe for target 'kernel.bin' failed The line with the error is: arm-none-eabi-ld SmartStart32.o rpi-SmartStart.o emb-stdio.o Main.o -L /usr/lib/gcc/arm-none-eabi/4.8/libgcc.a /usr/lib/gcc/arm-none-eabi/4.8/../../../arm-none-eabi/lib/libc.a /usr/lib/gcc/arm-none-eabi/4.8/../../../arm-none-eabi/lib/libm.a -T rpi32.ld -o kernel.elf The library file paths translate to (and files exists): ls /usr/lib/arm-none-eabi/lib/libc.a ls /usr/lib/arm-none-eabi/lib/libm.a The Makefile