digitalmars.D - Installing ldc breaks gdc
- Eduard Staniloiu (44/44) Dec 09 2016 Hello, everyone.
- Johannes Pfau (5/64) Dec 09 2016 Archlinux uses /usr/include/dlang/[dmd|gdc|ldc]. Maybe debian/ubuntu
- Daniel Kozak via Digitalmars-d (9/18) Dec 09 2016 No thats all wrong, dmd a gdc could not use same include directory that
- Matthias Klumpp (7/7) Dec 09 2016 Hi!
- Iain Buclaw via Digitalmars-d (3/8) Dec 09 2016 Thanks
- Eduard Staniloiu (10/17) Dec 13 2016 Hi!
- Joseph Rushton Wakeling (7/11) Dec 14 2016 Is there any chance of getting a fix in Xenial itself (whether by
- Eduard Staniloiu (52/60) Dec 10 2016 Yes and no.. as you can see from the verbose output
- Iain Buclaw via Digitalmars-d (7/31) Dec 09 2016 No, the /usr/include/d is considered a system includes directory. Any
- Daniel Kozak via Digitalmars-d (2/40) Dec 09 2016
Hello, everyone. So I have found that installing ldc will break gdc. The setup: I have a VM running a 64bit Ubuntu 16.04, as you can see from the output of uname -a: 18:29:54 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux I have installed: dmd --version: DMD64 D Compiler v2.072.0 gdc --version: gdc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 With this setup, in /usr/include we can find dmd/ /usr/include/dmd |-- druntime | `-- import | |-- core | |-- etc As far as I can tell(guess), both dmd and gdc are using this one. I installed ldc2 (using apt-get install ldc): ldc2 --version: LDC - the LLVM D compiler (0.17.1): based on DMD v2.068.2 and LLVM 3.8.0 Default target: x86_64-pc-linux-gnu After installing ldc2, in /usr/include a new folder, d/, was created /usr/include/d |-- core |-- etc |-- ldc `-- std And now, the issue: After the steps above, when I try to compile something using gdc, it fails with the following error: /usr/include/d/core/stdc/stdarg.d:48:5: error: undefined identifier _va_list_tag alias __va_list = __va_list_tag; ^ Based on my previous assumtion (both dmd and gdc use /usr/include/dmd/) and the error above, I am inclined to believe that after installing ldc, gdc is using /usr/include/d/ and it breaks. Maybe we should consider having a separate folder in /usr/include/ for each compiler? Cheers, Eduard
Dec 09 2016
Am Fri, 09 Dec 2016 15:59:07 +0000 schrieb Eduard Staniloiu <edi33416 gmail.com>:Hello, everyone. So I have found that installing ldc will break gdc. The setup: I have a VM running a 64bit Ubuntu 16.04, as you can see from the output of uname -a: 18:29:54 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux I have installed: dmd --version: DMD64 D Compiler v2.072.0 gdc --version: gdc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609 With this setup, in /usr/include we can find dmd/ /usr/include/dmd |-- druntime | `-- import | |-- core | |-- etc As far as I can tell(guess), both dmd and gdc are using this one. I installed ldc2 (using apt-get install ldc): ldc2 --version: LDC - the LLVM D compiler (0.17.1): based on DMD v2.068.2 and LLVM 3.8.0 Default target: x86_64-pc-linux-gnu After installing ldc2, in /usr/include a new folder, d/, was created /usr/include/d |-- core |-- etc |-- ldc `-- std And now, the issue: After the steps above, when I try to compile something using gdc, it fails with the following error: /usr/include/d/core/stdc/stdarg.d:48:5: error: undefined identifier _va_list_tag alias __va_list = __va_list_tag; ^ Based on my previous assumtion (both dmd and gdc use /usr/include/dmd/) and the error above, I am inclined to believe that after installing ldc, gdc is using /usr/include/d/ and it breaks. Maybe we should consider having a separate folder in /usr/include/ for each compiler? Cheers, EduardArchlinux uses /usr/include/dlang/[dmd|gdc|ldc]. Maybe debian/ubuntu should do that as well or maybe we could even change the path in upstream GDC.
Dec 09 2016
Dne 9.12.2016 v 16:59 Eduard Staniloiu via Digitalmars-d napsal(a):Hello, everyone. ... Based on my previous assumtion (both dmd and gdc use /usr/include/dmd/) and the error above, I am inclined to believe that after installing ldc, gdc is using /usr/include/d/ and it breaks. Maybe we should consider having a separate folder in /usr/include/ for each compiler? Cheers, EduardNo thats all wrong, dmd a gdc could not use same include directory that is not possible. GDC use /usr/lib/gcc/x86_64-linux-gnu/5/include/d/ LDC use /usr/include/d/ and dmd use: /usr/include/dmd You probably have some misconfiguration issue
Dec 09 2016
Hi! This issue should be fixed since LDC 1:1.1.0-2, which Xenial doesn't have. Ideally, fetch a newer version from Debian or a PPA to solve this issue. Cheers, Matthias
Dec 09 2016
On 9 December 2016 at 18:53, Matthias Klumpp via Digitalmars-d <digitalmars-d puremagic.com> wrote:Hi! This issue should be fixed since LDC 1:1.1.0-2, which Xenial doesn't have. Ideally, fetch a newer version from Debian or a PPA to solve this issue. Cheers, MatthiasThanks
Dec 09 2016
On Friday, 9 December 2016 at 17:53:30 UTC, Matthias Klumpp wrote:Hi! This issue should be fixed since LDC 1:1.1.0-2, which Xenial doesn't have. Ideally, fetch a newer version from Debian or a PPA to solve this issue. Cheers, MatthiasHi! Thank you for your answer. For future readers, this indeed has solved the problem. Just add the ppa: sudo add-apt-repository ppa:d-language-packagers/ppa And install the new version: sudo apt-get update; sudo apt-get install ldc Cheers, Eduard
Dec 13 2016
On Friday, 9 December 2016 at 17:53:30 UTC, Matthias Klumpp wrote:This issue should be fixed since LDC 1:1.1.0-2, which Xenial doesn't have. Ideally, fetch a newer version from Debian or a PPA to solve this issue.Is there any chance of getting a fix in Xenial itself (whether by an update to 1.1.0 or via an updated 1.0.0 package)? It's pretty worrying if two LTS packages clash in this way. BTW what source is the LDC 1:1.1.0-2 package built from? Is it using one of the LDC beta releases? AFAIK LDC 1.1.0 has not yet been released.
Dec 14 2016
On Friday, 9 December 2016 at 17:34:35 UTC, Daniel Kozak wrote:On Friday, 9 December 2016 at 17:34:35 UTC, Daniel Kozak wrote:No thats all wrong, dmd a gdc could not use same include directory that is not possible. GDC use /usr/lib/gcc/x86_64-linux-gnu/5/include/d/Yes and no.. as you can see from the verbose output binary /usr/lib/gcc/x86_64-linux-gnu/5/cc1d version v2.067.1 parse gcd_bench importall gcd_bench import object (/usr/lib/gcc/x86_64-linux-gnu/5/include/d/object.d) import std.algorithm (/usr/include/d/std/algorithm/package.d) import std.algorithm.comparison (/usr/include/d/std/algorithm/comparison.d) import std.functional (/usr/include/d/std/functional.d) . . import std.stdiobase (/usr/include/d/std/stdiobase.d) /usr/include/d/core/stdc/stdarg.d:48:5: error: undefined identifier __va_list_tag alias __va_list = __va_list_tag; ^ import core.stdc.errno (/usr/include/d/core/stdc/errno.d)LDC use /usr/include/d/binary /usr/bin/ldc2 version 0.17.1 (DMD v2.068.2, LLVM 3.8.0) config /etc/ldc2.conf contents of /etc/ldc2.conf: default: { // 'switches' holds array of string that are appends to the command line // arguments before they are parsed. switches = [ "-I/usr/include/d/ldc", "-I/usr/include/d", "-L-L/usr/lib", "-defaultlib=phobos2-ldc,druntime-ldc", "-debuglib=phobos2-ldc-debug,druntime-ldc-debug" ]; };and dmd use: /usr/include/dmdbinary dmd version v2.072.0 config /etc/dmd.conf contents of /etc/dmd.conf: [Environment32] DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib/i386-linux-gnu -L--export-dynamic [Environment64] DFLAGS=-I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import -L-L/usr/lib/x86_64-linux-gnu -L--export-dynamicYou probably have some misconfiguration issueEverything is default, since they all have been installed with apt-get install
Dec 10 2016
On 9 December 2016 at 18:34, Daniel Kozak via Digitalmars-d <digitalmars-d puremagic.com> wrote:Dne 9.12.2016 v 16:59 Eduard Staniloiu via Digitalmars-d napsal(a):No, the /usr/include/d is considered a system includes directory. Any distribution package headers should be installed there, not ldc-specific header. :-) Regards IainHello, everyone. ... Based on my previous assumtion (both dmd and gdc use /usr/include/dmd/) and the error above, I am inclined to believe that after installing ldc, gdc is using /usr/include/d/ and it breaks. Maybe we should consider having a separate folder in /usr/include/ for each compiler? Cheers, EduardNo thats all wrong, dmd a gdc could not use same include directory that is not possible. GDC use /usr/lib/gcc/x86_64-linux-gnu/5/include/d/ LDC use /usr/include/d/ and dmd use: /usr/include/dmd You probably have some misconfiguration issue
Dec 09 2016
Ok, thats your opinion :P Dne 9.12.2016 v 23:04 Iain Buclaw via Digitalmars-d napsal(a):On 9 December 2016 at 18:34, Daniel Kozak via Digitalmars-d <digitalmars-d puremagic.com> wrote:Dne 9.12.2016 v 16:59 Eduard Staniloiu via Digitalmars-d napsal(a):No, the /usr/include/d is considered a system includes directory. Any distribution package headers should be installed there, not ldc-specific header. :-) Regards IainHello, everyone. ... Based on my previous assumtion (both dmd and gdc use /usr/include/dmd/) and the error above, I am inclined to believe that after installing ldc, gdc is using /usr/include/d/ and it breaks. Maybe we should consider having a separate folder in /usr/include/ for each compiler? Cheers, EduardNo thats all wrong, dmd a gdc could not use same include directory that is not possible. GDC use /usr/lib/gcc/x86_64-linux-gnu/5/include/d/ LDC use /usr/include/d/ and dmd use: /usr/include/dmd You probably have some misconfiguration issue
Dec 09 2016