Make dub part of the standard dmd distribution

Manu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 2 18:23:27 PDT 2015


On 2 June 2015 at 04:03, Johannes Pfau via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> Am Mon, 1 Jun 2015 15:26:51 +1000
> schrieb Manu via Digitalmars-d <digitalmars-d at puremagic.com>:
>
>> So, DMD/LDC/GDC know where to look to find these packages?
> IIRC no.
>
>> What
>> happens if the package includes a binary lib?
>>
>> That that, I still want someone to declare an official path for D
>> 'includes' in the *nix filesystem, so D lib packages have somewhere to
>> install...
>
> GDC looks in /usr/include/d2. Dicebot changed that
> to /usr/include/d/gdc for archlinux and there are some reasons why this
> is (for now) necessary:
>
> Sharing D sources/headers between compilers is possible, but there are
> some headers (druntime,phobos) which can be compiler specific. As long
> as these are not in a common import path it's not a problem though.
>
> The main problem is we don't have ABI compatibility. This means we can't
> share the libraries between compilers. So we could make 'import foo'
> work but linking with -lfoo without manually adjusting linker paths is
> not possible.
>
> There are some solutions, all have drawbacks:
> * Have compiler specific directories for libraries
>   (/usr/lib/gdc/libvibed.a, /usr/lib/dmd/libvibed.a). Only works for
>   static libraries. Can only have one version of a library installed
> * have per-library directories. I guess dub uses this. Can have
>   multiple versions of the same library. Drawback: compiler can't know
>   the correct library path.[1]
> * Shared libraries should be installed in a common location (/usr/lib)
>   anyway. This is only possible if we have ABI compatibility[2].
>   Library versioning is limited to the standard C/C++ like versioning.
>
> I guess the main reason why we can't have a C/C++ like out of the box
> experience is ABI compatibility. There'll always be some quirks as long
> as we don't fix this.

I'm inclined to suggest, this would be an excellent focus for 2.068...
The compilers need to become aligned, and ABI issues seems like a
critical issue to focus on.


More information about the Digitalmars-d mailing list