Fail to set LD_LIBRARY_PATH then cross build for ARM

Oleg B via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Aug 1 07:39:27 PDT 2017


> Is possible to set -L flag through ldc2 arguments?

-L-L flag can add library path

   ldc2 -v -L-L/home/deviator/Documents/ldc_build_arm/lib 
-mtriple=arm-linux-gnueabihf 
-gcc=/usr/bin/arm-linux-gnueabihf-gcc test.d

but it's fails too

/usr/bin/arm-linux-gnueabihf-gcc test.o -o test -L/usr/lib64 
-L/home/deviator/Documents/ldc_build_arm/lib -lphobos2-ldc 
-ldruntime-ldc -Wl,--gc-sections -lrt -ldl -lpthread -lm
/usr/lib64/libphobos2-ldc.so: file not recognized: File format 
not recognized
collect2: error: ld returned 1 exit status
Error: /usr/bin/arm-linux-gnueabihf-gcc failed with status: 1

only if remove default -L/usr/lib64 it's work


More information about the digitalmars-d-ldc mailing list