Am Thu, 21 Apr 2016 15:34:35 +0000 schrieb Matthias Klumpp <matth...@tenstral.net>:
> Hi, and thanks for your detailed explanations! You're welcome :-) > On Thursday, 21 April 2016 at 11:49:13 UTC, Johannes Pfau wrote: > > On Thursday, 21 April 2016 at 01:01:01 UTC, Matthias Klumpp > > wrote: > >> [...] > > > > You currently can't install druntime or phobos headers in this > > directory, as each compiler will have slightly modified > > versions and then you end up with /usr/include/d/(dmd|gdc|ldc). > > That doesn't seem to be the case for LDC on Debian... It installs > Phobos into /usr/include/d/std, which makes GDC go crazy as soon > as LDC is installed too. > I suspect this is a packaging bug, if so, I'll report a bug > against LDC. > IIRC GDC makes sure to install in some lib/gcc directory to avoid such problems. But it's possible ldc defaults to the include directory. As an example, Arch Linux configures all compilers to use /usr/include/dlang&(ldc|gdc|dmd): https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/ldc#n37 https://projects.archlinux.org/svntogit/community.git/tree/trunk/folders.diff?h=packages/gdc https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/dmd#n54 > > But all other library headers should be shareable between > > compilers and can be placed in /usr/include/d. (This might even > > work for phobos, I don't think we have many compiler specific > > changes there. But then you need to use the same frontend > > version for all compilers.) > > This is probably a very naive question, but: Isn't the D > specification finished? If the language is done, why would there > be a dependence of Phobos on a specific compiler? > Or is this because the new code in Phobos might expose bugs in > the compiler itself, which causes these incompatibilities? We only introduce backwards compatible changes, but it's still possible that a new feature will be used in a new phobos version. Most of the time it's some obscure template bug fix which will require a new frontend version. And phobos is often one of the first libraries to use bug fixes or new compiler features. > [...] > > See above. The main question is: Do you want to have a C style > > install of one version of a library and have gdc find the > > includes and library when running gdc main.a -libfoo > > For plain gdc/ldc, I'd say: yes > > > or do you want dub-style support for multiple library versions > > which means you need to compile everything through dub. > > For stuff using dub, I'd say yes to that too ;-) Where do ruby / python package managers install their packages? I guess they're special as they use arch-independent sources? Anyway, for a one-version system wide install standard /usr/include/d and /usr/lib is probably best. I don't know a reasonable location for a dub 'repository' though. > >> ## Shared library support in all compilers > > > > This is mainly a GDC issue. DMD and LDC support shared libs, > > although I don't think these libraries are ABI compatible. > > Sounds more and more like LDC is - at time - the better choice > over GDC... GDC is indeed lagging behind a little bit. We're working on it ;-)