Cannot find -lstdc++_nano, -lg_nano, -lg_nano [SOLVED]

I’m trying to compile the Photon firmware locally and I’m having trouble setting up my environment. I followed the steps in the Github repo’s gettingstarted.md. Since then I’ve done a fair bit of troubleshooting with no luck. I’ve done a lot of digging and it seems like Issue #60 could be related to my problem.

I’m on Ubuntu 14.04 LTS.

When I run sudo make PLATFORM=photon from my firmware/main directory, I get the following output:

/home/brian/bin/gcc-arm-embedded/gcc-arm-none-eabi-4_8-2014q2/bin/…/lib/gcc/arm-none-eabi/4.8.4/…/…/…/…/arm-none-eabi/bin/ld: cannot find -lstdc++_nano
/home/brian/bin/gcc-arm-embedded/gcc-arm-none-eabi-4_8-2014q2/bin/…/lib/gcc/arm-none-eabi/4.8.4/…/…/…/…/arm-none-eabi/bin/ld: cannot find -lg_nano
/home/brian/bin/gcc-arm-embedded/gcc-arm-none-eabi-4_8-2014q2/bin/…/lib/gcc/arm-none-eabi/4.8.4/…/…/…/…/arm-none-eabi/bin/ld: cannot find -lc_nano
collect2: error: ld returned 1 exit status
make[1]: *** […/…/…/build/target/user-part/platform-6-m/user-part.elf] Error 1
make[1]: Leaving directory `/home/brian/Documents/Embedded/firmware/modules/photon/user-part’
make: *** [modules/photon/user-part] Error 2

For the record here is the output when I run arm-none-eabi-gcc -v

Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/home/brian/bin/gcc-arm-embedded/gcc-arm-none-eabi-4_8-2014q2/bin/…/lib/gcc/arm-none-eabi/4.8.4/lto-wrapper
Target: arm-none-eabi
Configured with: /home/build/work/GCC-4-8-build/src/gcc/configure --target=arm-none-eabi --prefix=/home/build/work/GCC-4-8-build/install-native --libexecdir=/home/build/work/GCC-4-8-build/install-native/lib --infodir=/home/build/work/GCC-4-8-build/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/home/build/work/GCC-4-8-build/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-8-build/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-8-build/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build/work/GCC-4-8-build/install-native/arm-none-eabi --build=i686-linux-gnu --host=i686-linux-gnu --with-gmp=/home/build/work/GCC-4-8-build/build-native/host-libs/usr --with-mpfr=/home/build/work/GCC-4-8-build/build-native/host-libs/usr --with-mpc=/home/build/work/GCC-4-8-build/build-native/host-libs/usr --with-isl=/home/build/work/GCC-4-8-build/build-native/host-libs/usr --with-cloog=/home/build/work/GCC-4-8-build/build-native/host-libs/usr --with-libelf=/home/build/work/GCC-4-8-build/build-native/host-libs/usr --with-host-libstdcxx=’-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm’ --with-pkgversion=‘GNU Tools for ARM Embedded Processors’ --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.8.4 20140526 (release) [ARM/embedded-4_8-branch revision 211358] (GNU Tools for ARM Embedded Processors)

Any ideas?

This is caused by using an older compiler (the 4.8.x line) which used a different suffix for the runtime libraries (_s instead of _nano). A fix for this has just been pushed to latest and develop branches.

Please pull down the branch - the problem should be resolved. :smile:

Thanks for the quick reply! I’ll give this a try tonight.

This works now. Thanks for the help @mdma!

1 Like