Arm-none-eabi-g++: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found [Closed]

Hello

I downloaded firmware 0.4.9 to prepare a local setup(Ubuntu 14.04.3). Build for photon/p1 results in following error:

arm-none-eabi-g++: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found

However, the library liblto_plugin.so is present in my system in the following path:

/usr/lib/gcc/i686-linux-gnu/4.8/liblto_plugin.so

Inputs please. Thanks.

I don’t know exactly why it’s failing but /usr/lib/gcc/i686-linux-gnu is the x86 Linux library, not the ARM library needed to cross-compile to the Photon. On my system, it’s in:

/usr/local/bin/gcc-arm/lib/gcc/arm-none-eabi/5.2.1/liblto_plugin.so

The first part of the path depends on where you installed the gcc-arm toolchain on your system.

1 Like

Thank you @rickkas7 for the quick response. It helped.
I reinstalled gcc arm tools and it contains the mentioned library.
Build is successful. Good day.

2 Likes