DUB Error

Sönke Ludwig sludwig+dforum at outerproduct.org
Wed Feb 26 08:57:03 PST 2014


Am 26.02.2014 08:00, schrieb Steve Teale:
> On Wednesday, 26 February 2014 at 03:33:38 UTC, Jesse Phillips wrote:
>> On Tuesday, 25 February 2014 at 14:32:42 UTC, Steve Teale wrote:
>>> What does the somewhat cryptic DUB error
>>>
>>> Trying to append absolute path.
>>>
>>> mean.
>>>
>>> By a process of elimination, the offending line in the json file is
>>>
>>> "importPaths": ["/usr/local/include/d/gtkd-2"]
>>>
>>> Steve
>>
>> The path you have provide is an absolute path, I suspect that
>> somewhere in the code it is doing something like:
>>
>>     buildPath(curDir, importPath);
>>
>> However, buildPath doesn't have a check for appending absolute path,
>> so probably a custom path library which is basically saying your
>> ignoring the working directory.
>
> I guess I was misunderstanding 'importPaths'. I got a little further
> along when I used
>
> "dflags": ["/usr/local/include/d/gtkd-2"]
>
> instead.
>
> But you'd think that since it is targeting D, importFlags might have
> that purpose.
>
> Steve

I'll check what goes wrong. Usually all places where paths are handled 
do "if (!path.absolute) path = package_path ~ path;" and thus 
*shouldn't* produce such errors. However, "dflags": ["-I/user/lo..."] 
(with -I) ought to work, too, even if it will produce a warning that 
recommends to use "importPaths" instead, to stay compatible with all D 
compilers.

In this particular case I'd recommend to add "dependencies": {"gtk-d": 
"~master"} to use the DUB package for GTK instead (but please ignore me 
here if that's actually a completely different library).


More information about the Digitalmars-d-learn mailing list