October 16, 2012
On 10/16/2012 06:55 PM, Manu wrote:
> Okay, I don't feel like my question is any clearer...
>
> Why wouldn't you want a standard shared include path?
> /usr/include works great for C, I don't see why there wouldn't be
> something like that for D for compiler-agnostic 3rd party libs.
>
> But my question is, where do I install includes? I'm not really a linux
> user, I just want someone to tell me where to put it :) .. and if there
> isn't a direct answer, then perhaps that's a problem that needs to be
> addressed?

/usr/[local/]include/d seems to be the most common, and it should work great for compiler-agnostic libs.
But for the standard library like D1-Tango mentioned earlier it probably isn't the right place.

-- 
Mike Wey
October 16, 2012
On Tue, 16 Oct 2012 17:48:54 +0200
Jordi Sayol <g.sayol@yahoo.es> wrote:

> Al 16/10/12 17:17, En/na Manu ha escrit:
> > On 16 October 2012 18:09, Jacob Carlborg <doob@me.com <mailto:doob@me.com>> wrote:
> > 
> >     On 2012-10-16 16:01, Iain Buclaw wrote:
> > 
> >         /usr/[local/]include/d is the standard path.  Each compiler
> > tends to have it's own subfolder here anyway...
> > 
> > 
> >     DMD doesn't look anywhere outside of its folder by default.
> > 
> > 
> > Well, that's obviously crap. What is the approach most people take when they want to install their library? I'll just do what's considered standard...
> 
> Linux dmd deb/rpm packages installs "/etc/dmd.conf" file which contains the modules/interfaces paths. The easiest way to add another path for your library in Linux is to create a "pkg-config" file.

Would that be Debian-specific though?

> There are some D libraries deb packages containing a "pkg-config" file (.pc) on the apt repository https://code.google.com/p/d-apt/
> 
> > 
> > Can DMD just be fixed to include [local/]/include/d in it's default search paths? I presume GDC and LDC already look there?
> 
> Linux dmd will not include /usr/include/d path by default to avoid conflicts with ldc1 (tango) "object.di" incompatibility, and I recommend you to not use this path for that reason.
> 

Then we can use '/usr/include/d2'. Problem solved ;)

October 16, 2012
On Tue, 16 Oct 2012 18:17:10 +0300
Manu <turkeyman@gmail.com> wrote:
> 
> Well, that's obviously crap. What is the approach most people take when they want to install their library?

I'm at the point where I don't even bother. I just pass in -I[path] as needed. It *greatly* simplifies instructions for compiling/installing stuff. Otherwise the instructions amount to a big convoluted pile of crap that will essentially be read by the user as "D desperately needs a fucking package manager, I'm not jumping through these retarded hoops that are system-specific anyway, I'm going back to Python."

October 16, 2012
On Tue, Oct 16, 2012 at 04:37:32PM -0400, Nick Sabalausky wrote:
> On Tue, 16 Oct 2012 17:48:54 +0200 Jordi Sayol <g.sayol@yahoo.es> wrote:
> 
> > Al 16/10/12 17:17, En/na Manu ha escrit:
[...]
> > > Can DMD just be fixed to include [local/]/include/d in it's default search paths? I presume GDC and LDC already look there?
> > 
> > Linux dmd will not include /usr/include/d path by default to avoid conflicts with ldc1 (tango) "object.di" incompatibility, and I recommend you to not use this path for that reason.
> > 
> 
> Then we can use '/usr/include/d2'. Problem solved ;)

I propose /usr/include/d/${version}/. It will make it possible for multiple versions of dmd to coexist, as well as eliminate version incompatibility problems (or at least make them very unlikely).

Mixing everything in /usr/include/d (or /usr/include/d2) with the fact that dmd releases have been incompatible with older druntime/phobos is just asking for trouble.


T

-- 
People say I'm indecisive, but I'm not sure about that. -- YHL, CONLANG
October 16, 2012
On Tue, 16 Oct 2012 14:00:32 -0700
"H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote:

> On Tue, Oct 16, 2012 at 04:37:32PM -0400, Nick Sabalausky wrote:
> > On Tue, 16 Oct 2012 17:48:54 +0200 Jordi Sayol <g.sayol@yahoo.es> wrote:
> > > 
> > > Linux dmd will not include /usr/include/d path by default to avoid conflicts with ldc1 (tango) "object.di" incompatibility, and I recommend you to not use this path for that reason.
> > > 
> > 
> > Then we can use '/usr/include/d2'. Problem solved ;)
> 
> I propose /usr/include/d/${version}/. It will make it possible for multiple versions of dmd to coexist, as well as eliminate version incompatibility problems (or at least make them very unlikely).
> 
> Mixing everything in /usr/include/d (or /usr/include/d2) with the fact that dmd releases have been incompatible with older druntime/phobos is just asking for trouble.
> 

If by ${version} you mean 2.059, 2.060, etc., then I don't like that. I don't want to have to have the same library installed separately for every version of DMD on my system. That's just a mess.

A way to have multiple versions of the same lib would be good though. Although that's one of the reasons I prefer to just use -I instead of messing with system-wide installation anyway.

October 16, 2012
On Tue, Oct 16, 2012 at 05:45:07PM -0400, Nick Sabalausky wrote:
> On Tue, 16 Oct 2012 14:00:32 -0700
> "H. S. Teoh" <hsteoh@quickfur.ath.cx> wrote:
> 
> > On Tue, Oct 16, 2012 at 04:37:32PM -0400, Nick Sabalausky wrote:
> > > On Tue, 16 Oct 2012 17:48:54 +0200 Jordi Sayol <g.sayol@yahoo.es> wrote:
> > > > 
> > > > Linux dmd will not include /usr/include/d path by default to avoid conflicts with ldc1 (tango) "object.di" incompatibility, and I recommend you to not use this path for that reason.
> > > > 
> > > 
> > > Then we can use '/usr/include/d2'. Problem solved ;)
> > 
> > I propose /usr/include/d/${version}/. It will make it possible for multiple versions of dmd to coexist, as well as eliminate version incompatibility problems (or at least make them very unlikely).
> > 
> > Mixing everything in /usr/include/d (or /usr/include/d2) with the fact that dmd releases have been incompatible with older druntime/phobos is just asking for trouble.
> > 
> 
> If by ${version} you mean 2.059, 2.060, etc., then I don't like that. I don't want to have to have the same library installed separately for every version of DMD on my system. That's just a mess.

If you have multiple versions of DMD sharing the same /usr/include/d, that's even more of a mess.

Of course, ideally, when you upgrade DMD it will also uninstall the older stuff so that you don't have like 50 stale copies of druntime/phobos after upgrading 50 times. That's something for the package manager to take care of. :-P


> A way to have multiple versions of the same lib would be good though. Although that's one of the reasons I prefer to just use -I instead of messing with system-wide installation anyway.

How else would you have multiple versions of the same lib, though? They can't all live in the same place since files will conflict.


T

-- 
Life is complex. It consists of real and imaginary parts. -- YHL
October 17, 2012
On 17 October 2012 00:00, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:

> On Tue, Oct 16, 2012 at 04:37:32PM -0400, Nick Sabalausky wrote:
> > On Tue, 16 Oct 2012 17:48:54 +0200 Jordi Sayol <g.sayol@yahoo.es> wrote:
> >
> > > Al 16/10/12 17:17, En/na Manu ha escrit:
> [...]
> > > > Can DMD just be fixed to include [local/]/include/d in it's default search paths? I presume GDC and LDC already look there?
> > >
> > > Linux dmd will not include /usr/include/d path by default to avoid conflicts with ldc1 (tango) "object.di" incompatibility, and I recommend you to not use this path for that reason.
> > >
> >
> > Then we can use '/usr/include/d2'. Problem solved ;)
>
> I propose /usr/include/d/${version}/. It will make it possible for multiple versions of dmd to coexist, as well as eliminate version incompatibility problems (or at least make them very unlikely).
>
> Mixing everything in /usr/include/d (or /usr/include/d2) with the fact that dmd releases have been incompatible with older druntime/phobos is just asking for trouble.
>

I don't really care about the compilers own drunntime/phobos.
I want to know where to install 3rd party libs.
They should be identical no matter what compiler is compiling them. C has
/usr/[local/]include/


October 17, 2012
On Wed, Oct 17, 2012 at 03:01:33AM +0300, Manu wrote:
> On 17 October 2012 00:00, H. S. Teoh <hsteoh@quickfur.ath.cx> wrote:
> 
> > On Tue, Oct 16, 2012 at 04:37:32PM -0400, Nick Sabalausky wrote:
> > > On Tue, 16 Oct 2012 17:48:54 +0200 Jordi Sayol <g.sayol@yahoo.es> wrote:
> > >
> > > > Al 16/10/12 17:17, En/na Manu ha escrit:
> > [...]
> > > > > Can DMD just be fixed to include [local/]/include/d in it's default search paths? I presume GDC and LDC already look there?
> > > >
> > > > Linux dmd will not include /usr/include/d path by default to avoid conflicts with ldc1 (tango) "object.di" incompatibility, and I recommend you to not use this path for that reason.
> > > >
> > >
> > > Then we can use '/usr/include/d2'. Problem solved ;)
> >
> > I propose /usr/include/d/${version}/. It will make it possible for multiple versions of dmd to coexist, as well as eliminate version incompatibility problems (or at least make them very unlikely).
> >
> > Mixing everything in /usr/include/d (or /usr/include/d2) with the fact that dmd releases have been incompatible with older druntime/phobos is just asking for trouble.
> >
> 
> I don't really care about the compilers own drunntime/phobos.  I want to know where to install 3rd party libs.  They should be identical no matter what compiler is compiling them. C has /usr/[local/]include/

I think there was some talk recently about standardizing on /usr/include/d (or /usr/include/d2). But I don't know if a clear decision was made.


T

-- 
Don't throw out the baby with the bathwater. Use your hands...
October 17, 2012
On 2012-10-16 23:00, H. S. Teoh wrote:

> I propose /usr/include/d/${version}/. It will make it possible for
> multiple versions of dmd to coexist, as well as eliminate version
> incompatibility problems (or at least make them very unlikely).
>
> Mixing everything in /usr/include/d (or /usr/include/d2) with the fact
> that dmd releases have been incompatible with older druntime/phobos is
> just asking for trouble.

Putting Phobos and druntime libraries and import files in these locations would be a bad idea, in my opinion.

-- 
/Jacob Carlborg
October 17, 2012
Al 16/10/12 22:37, En/na Nick Sabalausky ha escrit:
>> Linux dmd deb/rpm packages installs "/etc/dmd.conf" file which contains the modules/interfaces paths. The easiest way to add another path for your library in Linux is to create a "pkg-config" file.
> 
> Would that be Debian-specific though?

This is Linux and C specific.
In debian/Ubuntu/LinuxMint, with "libgtk-3-dev" and "pkg-config" packages installed, just type:
$ pkg-config --cflags --libs gtk+-3.0
You'll get all the sources, libraries and some flags that gcc needs to properly compile gtk projects.

>> Linux dmd will not include /usr/include/d path by default to avoid conflicts with ldc1 (tango) "object.di" incompatibility, and I recommend you to not use this path for that reason.
>>
> 
> Then we can use '/usr/include/d2'. Problem solved ;)
> 

Is a possibility, but it must be agreed.

-- 
Jordi Sayol