Fail to set LD_LIBRARY_PATH then cross build for ARM

Oleg B via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Wed Aug 2 14:39:00 PDT 2017


On Wednesday, 2 August 2017 at 03:28:48 UTC, Joakim wrote:
> OK, got it, would have helped a lot if you'd explained all this 
> from the beginning.

My mistake, sorry.

> I'm guessing you're using ldc 1.3 installed by your distro's 
> package manager, as I don't see any lib64 in the ldc download, 
> so your distro packages a ldc2.conf that adds the lib64 path.  
> You can make sure by looking at /usr/etc/ldc2.conf, or wherever 
> your distro puts that config file, and looking for lib64 in 
> there.
> You're probably best off creating a .ldc/ldc2.conf in your home 
> directory, with the specific config you want for linux/armhf.

Thank you! I found -L/usr/lib64 switch in /etc/ldc2.conf. In 
.ldc/ldc2.conf I configure build for arm and it's work!
Question about it: why '.ldc'? Why not '.config/' dir?

> See this previous post for an example:
>
> http://forum.dlang.org/post/skdqeursuheqdsermmwh@forum.dlang.org

Cool! But I don't understand how it use through dub. Dub don't 
know about any arch expect x86(_64). If add dflags "-march=arm" 
or something like this in dub.sdl it applies only for building 
package, not for dependencies. Building without dub is some 
painful for me and it's not useful to change .ldc/ldc2.conf when 
need arm and when need x86... Maybe I do something wrong?

> We're working on making it much simpler to cross-compile the 
> stdlib for the next ldc 1.4 beta, see kinke's latest patch here:
>
> https://github.com/ldc-developers/ldc/pull/2253

I'm looking forward to full cross-building. It's plained? Or 
always be need external cross-linker?

> I'm not sure how well your approach will work, as the ldc 1.4 
> stdlib may not work with ldc 1.3.  I'll be submitting a PR soon 
> that should make it even easier, so you may want to wait for 
> the next 1.4 beta instead.

Can't wait 1.4 beta, business does not wait =)


More information about the digitalmars-d-ldc mailing list