www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - GDC includes from LDC

reply Russel Winder via Digitalmars-d <digitalmars-d puremagic.com> writes:
Iain,

Playing with the SCons tests, I am heading to the hypothesis that, at
least on Debian Sid, if both gdc and ldc packages are installed, then
gdc picks up the D source files from the ldc package in preference to
the ones from the gdc package.


scons: Building targets ...
gdc -I. -c -o foo.o foo.d
scons: building terminated because of errors.

STDERR =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
/usr/include/d/core/stdc/config.d:28:3: error: static if conditional cannot=
 be at global scope
=C2=A0=C2=A0=C2=A0static if( (void*).sizeof > int.sizeof )
=C2=A0=C2=A0=C2=A0^
scons: *** [foo.o] Error 1


|> dpkg -S /usr/include/d/core/stdc/config.d
libphobos2-ldc-dev: /usr/include/d/core/stdc/config.d

--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.n=
et
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
Jan 10 2016
parent reply John Colvin <john.loughran.colvin gmail.com> writes:
On Sunday, 10 January 2016 at 16:23:24 UTC, Russel Winder wrote:
 Iain,

 Playing with the SCons tests, I am heading to the hypothesis 
 that, at least on Debian Sid, if both gdc and ldc packages are 
 installed, then gdc picks up the D source files from the ldc 
 package in preference to the ones from the gdc package.


 scons: Building targets ...
 gdc -I. -c -o foo.o foo.d
 scons: building terminated because of errors.

 STDERR 
 =========================================================================
 /usr/include/d/core/stdc/config.d:28:3: error: static if 
 conditional cannot be at global scope
    static if( (void*).sizeof > int.sizeof )
    ^
 scons: *** [foo.o] Error 1


 |> dpkg -S /usr/include/d/core/stdc/config.d 
 libphobos2-ldc-dev: /usr/include/d/core/stdc/config.d
I think this is the same problem I have on OS X.
Jan 10 2016
parent Mathias Lang via Digitalmars-d <digitalmars-d puremagic.com> writes:
Looks like a packaging issue. In Archlinux there is one extra directory
level for the compiler (e.g. `/usr/include/dlang/<compiler>/`) to prevent
such things.

Looking at the file list for both libraries:
- GDC: https://packages.debian.org/sid/amd64/libphobos-4.9-dev/filelist
- LDC: https://packages.debian.org/fr/sid/amd64/libphobos2-ldc-dev/filelist

It seems that indeed GDC is picking LDC's libphobos.

2016-01-10 17:51 GMT+01:00 John Colvin via Digitalmars-d <
digitalmars-d puremagic.com>:

 On Sunday, 10 January 2016 at 16:23:24 UTC, Russel Winder wrote:

 Iain,

 Playing with the SCons tests, I am heading to the hypothesis that, at
 least on Debian Sid, if both gdc and ldc packages are installed, then gdc
 picks up the D source files from the ldc package in preference to the ones
 from the gdc package.


 scons: Building targets ...
 gdc -I. -c -o foo.o foo.d
 scons: building terminated because of errors.

 STDERR
 =========================================================================
 /usr/include/d/core/stdc/config.d:28:3: error: static if conditional
 cannot be at global scope
    static if( (void*).sizeof > int.sizeof )
    ^
 scons: *** [foo.o] Error 1


 |> dpkg -S /usr/include/d/core/stdc/config.d libphobos2-ldc-dev:
 /usr/include/d/core/stdc/config.d
I think this is the same problem I have on OS X.
Jan 10 2016