Re: strange -fPIC compilation error

2016-11-01 Thread Lodovico Giaretta via Digitalmars-d-learn
On Tuesday, 1 November 2016 at 18:13:32 UTC, TheGag96 wrote: On Monday, 31 October 2016 at 07:16:50 UTC, Sebastien Alaiwan wrote: Hello, From GCC 6.2, -fpie is becoming the default setting at compile and at link time. As dmd uses GCC to link, now the code needs to be compiled with a special op

Re: strange -fPIC compilation error

2016-11-01 Thread Charles Hixson via Digitalmars-d-learn
On 11/01/2016 10:34 AM, bachmeier via Digitalmars-d-learn wrote: On Tuesday, 1 November 2016 at 17:23:54 UTC, Charles Hixson wrote: On 11/01/2016 12:52 AM, Nordlöw via Digitalmars-d-learn wrote: On Tuesday, 1 November 2016 at 07:15:19 UTC, Mike Parker wrote: but dmd -defaultlib=libphobos2.so -

Re: strange -fPIC compilation error

2016-11-01 Thread TheGag96 via Digitalmars-d-learn
On Monday, 31 October 2016 at 07:16:50 UTC, Sebastien Alaiwan wrote: Hello, From GCC 6.2, -fpie is becoming the default setting at compile and at link time. As dmd uses GCC to link, now the code needs to be compiled with a special option. Which means you need, at the moment, to add the followin

Re: strange -fPIC compilation error

2016-11-01 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 1 November 2016 at 17:23:54 UTC, Charles Hixson wrote: On 11/01/2016 12:52 AM, Nordlöw via Digitalmars-d-learn wrote: On Tuesday, 1 November 2016 at 07:15:19 UTC, Mike Parker wrote: but dmd -defaultlib=libphobos2.so -fPIC test.d works. It shouldn't be required (as in the default /

Re: strange -fPIC compilation error

2016-11-01 Thread Charles Hixson via Digitalmars-d-learn
On 11/01/2016 12:52 AM, Nordlöw via Digitalmars-d-learn wrote: On Tuesday, 1 November 2016 at 07:15:19 UTC, Mike Parker wrote: but dmd -defaultlib=libphobos2.so -fPIC test.d works. It shouldn't be required (as in the default /etc/dmd.conf should handle it correctly, but I can deal with it now.

Re: strange -fPIC compilation error

2016-11-01 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 1 November 2016 at 07:15:19 UTC, Mike Parker wrote: but dmd -defaultlib=libphobos2.so -fPIC test.d works. It shouldn't be required (as in the default /etc/dmd.conf should handle it correctly, but I can deal with it now. Can this be fed as parameters to the DMD call (programmatica

Re: strange -fPIC compilation error

2016-11-01 Thread Mike Parker via Digitalmars-d-learn
On Monday, 31 October 2016 at 19:20:21 UTC, Charles Hixson wrote: but dmd -defaultlib=libphobos2.so -fPIC test.d works. It shouldn't be required (as in the default /etc/dmd.conf should handle it correctly, but I can deal with it now. The need to manually add this to dmd.conf is a very recen

Re: strange -fPIC compilation error

2016-10-31 Thread Charles Hixson via Digitalmars-d-learn
On 10/31/2016 12:31 PM, Daniel Kozak via Digitalmars-d-learn wrote: Dne 31.10.2016 v 20:20 Charles Hixson via Digitalmars-d-learn napsal(a): ... but dmd -defaultlib=libphobos2.so -fPIC test.d works. It shouldn't be required (as in the default /etc/dmd.conf should handle it correctly, but I c

Re: strange -fPIC compilation error

2016-10-31 Thread Daniel Kozak via Digitalmars-d-learn
Dne 31.10.2016 v 20:20 Charles Hixson via Digitalmars-d-learn napsal(a): ... but dmd -defaultlib=libphobos2.so -fPIC test.d works. It shouldn't be required (as in the default /etc/dmd.conf should handle it correctly, but I can deal with it now. It should work, it is possible that you have s

Re: strange -fPIC compilation error

2016-10-31 Thread Charles Hixson via Digitalmars-d-learn
On 10/31/2016 11:23 AM, Daniel Kozak via Digitalmars-d-learn wrote: Dne 31.10.2016 v 18:06 Charles Hixson via Digitalmars-d-learn napsal(a): On 10/31/2016 09:26 AM, Charles Hixson via Digitalmars-d-learn wrote: On 10/30/2016 11:34 PM, Daniel Kozak via Digitalmars-d-learn wrote: Dne 31.10.201

Re: strange -fPIC compilation error

2016-10-31 Thread Daniel Kozak via Digitalmars-d-learn
Dne 31.10.2016 v 18:06 Charles Hixson via Digitalmars-d-learn napsal(a): On 10/31/2016 09:26 AM, Charles Hixson via Digitalmars-d-learn wrote: On 10/30/2016 11:34 PM, Daniel Kozak via Digitalmars-d-learn wrote: Dne 31.10.2016 v 02:30 Charles Hixson via Digitalmars-d-learn napsal(a): Well,

Re: strange -fPIC compilation error

2016-10-31 Thread Charles Hixson via Digitalmars-d-learn
On 10/31/2016 09:26 AM, Charles Hixson via Digitalmars-d-learn wrote: On 10/30/2016 11:34 PM, Daniel Kozak via Digitalmars-d-learn wrote: Dne 31.10.2016 v 02:30 Charles Hixson via Digitalmars-d-learn napsal(a): Well, that certainly changed the error messages. With dmd -defaultlib=/usr/lib/x

Re: strange -fPIC compilation error

2016-10-31 Thread Charles Hixson via Digitalmars-d-learn
On 10/30/2016 11:34 PM, Daniel Kozak via Digitalmars-d-learn wrote: Dne 31.10.2016 v 02:30 Charles Hixson via Digitalmars-d-learn napsal(a): Well, that certainly changed the error messages. With dmd -defaultlib=/usr/lib/x86_64-linux-gnu/libphobos2.so test.d I get: /usr/include/dmd/druntime/im

Re: strange -fPIC compilation error

2016-10-31 Thread Sebastien Alaiwan via Digitalmars-d-learn
Hello, From GCC 6.2, -fpie is becoming the default setting at compile and at link time. As dmd uses GCC to link, now the code needs to be compiled with a special option. Which means you need, at the moment, to add the following options to your dmd.conf: -defaultlib=libphobos2.so -fPIC (the ch

Re: strange -fPIC compilation error

2016-10-30 Thread Daniel Kozak via Digitalmars-d-learn
Dne 31.10.2016 v 02:30 Charles Hixson via Digitalmars-d-learn napsal(a): Well, that certainly changed the error messages. With dmd -defaultlib=/usr/lib/x86_64-linux-gnu/libphobos2.so test.d I get: /usr/include/dmd/druntime/import/core/stdc/stdio.d(1121): Error: found 'nothrow' when expecting

Re: strange -fPIC compilation error

2016-10-30 Thread Charles Hixson via Digitalmars-d-learn
On 10/30/2016 05:14 PM, Lodovico Giaretta via Digitalmars-d-learn wrote: On Monday, 31 October 2016 at 00:08:59 UTC, Charles Hixson wrote: So now I removed the repository version of dmd and dub, downloaded DMD64 D Compiler v2.072.0-b2, used dkpg to install it, and appear to get the same error

Re: strange -fPIC compilation error

2016-10-30 Thread Lodovico Giaretta via Digitalmars-d-learn
On Monday, 31 October 2016 at 00:08:59 UTC, Charles Hixson wrote: So now I removed the repository version of dmd and dub, downloaded DMD64 D Compiler v2.072.0-b2, used dkpg to install it, and appear to get the same errors. (Well, actually I removed the commenting out of the code, but it compi

Re: strange -fPIC compilation error

2016-10-30 Thread Charles Hixson via Digitalmars-d-learn
So now I removed the repository version of dmd and dub, downloaded DMD64 D Compiler v2.072.0-b2, used dkpg to install it, and appear to get the same errors. (Well, actually I removed the commenting out of the code, but it compiles and runs properly with ldc2.) On 10/30/2016 11:02 AM, Charle

Re: strange -fPIC compilation error

2016-10-30 Thread Charles Hixson via Digitalmars-d-learn
Just as a test I tried it with ldc, and, as expected, there wasn't any problem. On 10/30/2016 11:02 AM, Charles Hixson via Digitalmars-d-learn wrote: dmd --version DMD64 D Compiler v2.071.2 Copyright (c) 1999-2015 by Digital Mars written by Walter Bright on debian testing. dub is installed v

Re: strange -fPIC compilation error

2016-10-30 Thread Charles Hixson via Digitalmars-d-learn
On 10/30/2016 04:03 PM, Lodovico Giaretta via Digitalmars-d-learn wrote: On Sunday, 30 October 2016 at 18:02:28 UTC, Charles Hixson wrote: dmd --version DMD64 D Compiler v2.071.2 Copyright (c) 1999-2015 by Digital Mars written by Walter Bright on debian testing. dub is installed via apt-get.

Re: strange -fPIC compilation error

2016-10-30 Thread Lodovico Giaretta via Digitalmars-d-learn
On Sunday, 30 October 2016 at 18:02:28 UTC, Charles Hixson wrote: dmd --version DMD64 D Compiler v2.071.2 Copyright (c) 1999-2015 by Digital Mars written by Walter Bright on debian testing. dub is installed via apt-get. Should I revert to an earlier version? Or what? The program: import

strange -fPIC compilation error

2016-10-30 Thread Charles Hixson via Digitalmars-d-learn
dmd --version DMD64 D Compiler v2.071.2 Copyright (c) 1999-2015 by Digital Mars written by Walter Bright on debian testing. dub is installed via apt-get. Should I revert to an earlier version? Or what? The program: importstd.stdio; voidmain() {//int[]t1; //t1~=