DUB Build Linker Library Search Path
"Nordlöw" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jul 10 04:02:09 PDT 2015
On Friday, 10 July 2015 at 09:37:42 UTC, Rikki Cattermole wrote:
> On 10/07/2015 9:34 p.m., "Nordlöw" wrote:
>> On Friday, 10 July 2015 at 09:29:49 UTC, Martin Nowak wrote:
>>> On Friday, 10 July 2015 at 09:27:19 UTC, Nordlöw wrote:
>>>> How do I tell `dub build` where to find libraries in
>>>> non-standard
>>>> directories?
>>>
>>> You're missing the development package libclang-dev, which
>>> should come
>>> with a pkg-config.
>>
>> I've already installed libclang-dev.
>>
>> The problem is that I can't find a way (from the command line)
>> (by
>> reading the DUB docs) to tell DUB that it's placed in
>>
>> /usr/lib/llvm-3.6/lib/libclang.so.1
>>
>> I don't what to have to modify the dub.json (lflags variable)
>> as I want
>> automation.
>>
>> Aren't all DUB the variables somehow modifiable in shell call?!
>>
>> Further
>>
>> `pkg-config --list-all |grep clang`
>>
>> shows nothing.
>
> LFLAGS="..." dub build
LDFLAGS="-L/usr/lib/llvm-3.6/lib" dub build
--compiler="/usr/bin/dmd" -v
has not effect:
/usr/bin/dmd
-of.dub/build/default-debug-linux.posix-x86_64-dmd_2067-0E9173B3A2F733029144DC3F174B9E99/dstep -debug -g -version=Have_dstep -version=Have_dstack -version=Have_mambo -version=Have_tango -Idstep -Iclang -I../../.dub/packages/dstack-0.0.3 -I../../.dub/packages/mambo-0.0.4 -I../../.dub/packages/tango-1.0.1_2.067 -Jresources clang/Compiler.d clang/Cursor.d clang/Diagnostic.d clang/File.d clang/Index.d clang/SourceLocation.d clang/TranslationUnit.d clang/Type.d clang/Util.d clang/Visitor.d clang/c/CXErrorCode.d clang/c/CXString.d clang/c/Index.d dstep/config/Configuration.d dstep/core/Exceptions.d dstep/driver/Application.d dstep/driver/DStep.d dstep/translator/Declaration.d dstep/translator/Enum.d dstep/translator/IncludeHandler.d dstep/translator/Output.d dstep/translator/Record.d dstep/translator/Translator.d dstep/translator/Type.d dstep/translator/objc/Category.d dstep/translator/objc/ObjcInterface.d ../../.dub/packages/dstack-0.0.3/libdstack.a ../../.dub/packages/mambo-0.0.4/libmambo.a ../../.dub/packages/tango-1.0.1_2.067/libtango.a -L-lclang -L-rpath -L. -L-L. -L-lbz2 -vcolumns
../../.dub/packages/mambo-0.0.4/mambo/util/Traits.d(154,39):
Deprecation: typedef is removed
../../.dub/packages/mambo-0.0.4/mambo/util/Traits.d(182,30):
Deprecation: typedef is removed
/usr/bin/ld: error: cannot find -lclang
Using export as
export LDFLAGS="-L/usr/lib/llvm-3.6/lib"; dub build
--compiler=/usr/bin/dmd
doesn't work either.
Adding "-L-L/usr/lib/llvm3-6/lib" to the call to dmd works.
What's wrong with my call to DUB?
I'm sitting on DUB git master.
More information about the Digitalmars-d-learn
mailing list