atilaneves / dpp

Directly include C headers in D source code
Boost Software License 1.0
229 stars 31 forks source link

Build on Debian Sid requires edit of dub.sdl file #256

Closed russel closed 4 years ago

russel commented 4 years ago

In order to build DPP on Debian Sid, I had to edit the dub.sdl file. I replaced the Travis-CI lflags line with:

lflags "-L/usr/lib/llvm-9/lib" platform="posix"  # for Russel's Debian Sid
atilaneves commented 4 years ago

I don't know how else to deal with different libclang locations. I'd suggest changing environment variables or symlinking to /usr/lib.

russel commented 4 years ago

For me, and others, amending manually anything in /usr is a no-no since that is a package managed area. I was wondering though if there was a way Dub for DPP could handle an environment variable. Doing:

(export LD_LIBRARY_PATH=<path-to-llvm>; dub build --build=release)

seems not to work.

atilaneves commented 4 years ago

dub doesn't work well with environment variables. I still don't know why libclang would be in a non-standard place on other distributions - it makes no sense to not put it in /usr/lib. Another reason for me to like Arch the best, I guess.

russel commented 4 years ago

I think the Debian thinking is that all LLVM version can coexist at the same time, hence the version specific naming. The question is, I guess, why there is no alternatives system over the top to decide which is the current version. That is actually a bit strange.

Anyway, it seems I am stuck with manually hacking dub.sdl, which, whilst irritating, is fine if I know there is no other way.