www.digitalmars.com         C & C++   DMDScript  

D.gnu - GDC Pre-Built 6.3.0: Fails during linking stage (liblto_plugin.so)

reply Maxwell Flynn <me maxwellflynn.com> writes:
I have been attempting since yesterday evening to compile a D 
project of mine on my new Raspberry Pi Zero W. I downloaded the 
latest `arm-linux-gnueabi` binary, extracted it, and added it to 
my path. Then, I made a makefile to compile my project.

It seems that, while it gets past the compilation stage fine, 
once it reaches the link stage, an error is spit out. This error 
reads as follows.

/usr/bin/ld: 
/usr/local/lib/gdc-6.3.0/bin/../libexec/gcc/arm-unknown-linux-gnueabi/6.3
0/liblto_plugin.so: error loading plugin: /usr/bin/ld:
/usr/local/lib/gdc-6.3.0/bin/../libexec/gcc/arm-unknown-linux-gnueabi/6.3
0/liblto_plugin.so: cannot open shared object file: No such file or directory

Though, when I look in that location for that `.so` file, there 
is a file with that corresponding name. How could I fix this 
problem so that my program will compile?

Thanks in advance!
Mar 14
parent Johannes Pfau <nospam example.com> writes:
Am Tue, 14 Mar 2017 23:56:42 +0000
schrieb Maxwell Flynn <me maxwellflynn.com>:

 I have been attempting since yesterday evening to compile a D 
 project of mine on my new Raspberry Pi Zero W. I downloaded the 
 latest `arm-linux-gnueabi` binary, extracted it, and added it to 
 my path. Then, I made a makefile to compile my project.
 
 It seems that, while it gets past the compilation stage fine, 
 once it reaches the link stage, an error is spit out. This error 
 reads as follows.
 
 /usr/bin/ld: 
 /usr/local/lib/gdc-6.3.0/bin/../libexec/gcc/arm-unknown-linux-gnueabi/6.3.0/liblto_plugin.so:
 error loading
 plugin: /usr/bin/ld:
/usr/local/lib/gdc-6.3.0/bin/../libexec/gcc/arm-unknown-linux-gnueabi/6.3.0/liblto_plugin.so:
 cannot open shared object file: No such file or directory
 
 Though, when I look in that location for that `.so` file, there 
 is a file with that corresponding name. How could I fix this 
 problem so that my program will compile?
 
 Thanks in advance!
That's only for LTO. You should be able to avoid this problem by disabling LTO: gdc -fno-lto -fno-use-linker-plugin Nevertheless the full output of gdc test.d -v -Xlinker --verbose could be useful for debugging. -- Johannes
Mar 15