Fail to set LD_LIBRARY_PATH then cross build for ARM

Joakim via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Aug 1 11:34:24 PDT 2017


On Tuesday, 1 August 2017 at 17:26:16 UTC, Oleg B wrote:
> On Tuesday, 1 August 2017 at 16:23:00 UTC, Joakim wrote:
>> Could you explain your build environment a bit: you're 
>> cross-compiling from linux/x64 to linux/armhf?  Using the old 
>> compiler built from source as on that wiki page, or by using 
>> the official pre-built release build of ldc?  The former 
>> shouldn't add /usr/lib64 to your linker path.  Maybe you mean 
>> to run the former but are running the latter by mistake.
>
> host:
>
> linux 4.11.11-300.fc26.x86_64
>
> ldc2 from official pre-build release from github
> LDC - the LLVM D compiler (1.3.0):
>   based on DMD v2.073.2 and LLVM 4.0.0
>   built with LDC - the LLVM D compiler (1.3.0)
>   Default target: x86_64-unknown-linux-gnu
>   Host CPU: skylake
>
> target:
>
> linux 4.9.35-v7+ armv7l (raspbian)
>
> ldc2 compiled from git (1.4.0git-02d2a2c)
> based on DMD v2.073.2 and LLVM 3.9.0

You just listed two different compilers: do you mean you used a 
prebuilt ldc 1.3 on linux/x64 to build an ldc 1.4 cross-compiler 
on linux/x64 for armhf from source?  If so, maybe you're invoking 
the wrong one, ie you should run ./ldc_build_arm/bin/ldc2 not 
ldc2 when cross-compiling.

Are you patching ldc 1.4 at all?
That old patch linked from the wiki won't work.


More information about the digitalmars-d-ldc mailing list