D.gnu - gdc broken by ldc-phobos-devel on Fedora
- mipri (54/54) Nov 20 2019 Howdy,
- Iain Buclaw (45/45) Nov 20 2019 Tm90aGluZyBtdWNoIHRoYXQgY2FuIGJlIGRvbmUgaGVyZSBleGNlcHQgZ2V0IHRoZSBwYWNr...
- Matthias Klumpp (10/23) Nov 21 2019 That's why we explicitly set the LDC include path in Debian:
- BoraxMan (3/15) Dec 13 2019 I filed a bug report with Fedora for this issue.
Howdy, This was the case in Fedora 30, and is now the case in Fedora 31. RPMs are available for gdc and for ldc2, but when both are installed gdc can't compile anything as it tries to load a version of phobos installed by ldc2 which has features gdc doesn't yet support. For someone who's decided to just use gdc for a project, they have the easy fix of just uninstalling ldc2, but I'd expect that someone evaluating D as a language will be interested in comparing the different compilers, so all the compilers will be installed--and then only dmd and ldc will be functional. As commands: dnf install gcc-gdc ldc echo 'void main() { import std.stdio; writeln("hello"); }' > hello.d gdc hello.d This will fail due to ldc-phobos-devel's files in /usr/include/d: /usr/include/d/core/internal/hash.d:426:16: error: basic type expected, not foreach 426 | static foreach (i; 0 .. T.sizeof / size_t.sizeof) | ^ /usr/include/d/core/internal/hash.d:426:16: error: no identifier for declarator _error_ 426 | static foreach (i; 0 .. T.sizeof / size_t.sizeof) | ^ /usr/include/d/core/internal/traits.d:175:12: error: declaration expected, not 'foreach' 175 | static foreach (Ti; T) | ^ /usr/include/d/core/internal/traits.d:175:26: error: no identifier for declarator T 175 | static foreach (Ti; T) | ^ /usr/include/d/core/internal/traits.d:175:26: error: declaration expected, not ')' 175 | static foreach (Ti; T) | ^ /usr/include/d/core/internal/traits.d:182:5: error: unrecognized declaration 182 | } | ^ gdc installs its own files into path[1] but prefers /usr/include/d: import path[0] = /usr/include/d import path[1] = /usr/lib/gcc/x86_64-redhat-linux/9/include/d and I haven't found a way, in gdc's manpage or in (the much less examined) gcc documentation, to skip the first path. I'm also not sure what a proper fix would be. Maybe the ldc rpm should be updated to install phobos into a similarly ldc-specific directory. Maybe a gdc update will happen soon and ldc's phobos files will be acceptable to it. Mainly I want to mention it here so that people can find it and not just think that gdc is broken on Fedora, like I thought for a good while.
Nov 20 2019
Tm90aGluZyBtdWNoIHRoYXQgY2FuIGJlIGRvbmUgaGVyZSBleGNlcHQgZ2V0IHRoZSBwYWNrYWdl IG1haW50YWluZXIgdG8gZml4IHRoZSBpbnN0YWxsYXRpb24gcGF0aHMgb2YgbGRjLgoKVGhlIHBo b2Jvcy9kcnVudGltZSBzb3VyY2VzIHdpbGwgYWx3YXlzIGRpZmZlciBiZXR3ZWVuIGVhY2ggY29t cGlsZXIgcnVudGltZSBsaWJyYXJ5IGFzIHRoZXJlJ3JlIG1hbnkgbG9jYWwgY2hhbmdlcyB0aGF0 IGFyZW4ndCBhY2NlcHRlZCBpbiB1cHN0cmVhbS4KCi0tCklhaW4KCi0tLS0tLS0tIE9yaWdpbmFs IE1lc3NhZ2UgLS0tLS0tLS0KT24gTm92IDIwLCAyMDE5LCAxMDo1MSBQTSwgbWlwcmkgdmlhIEQu Z251IDwgZC5nbnVAcHVyZW1hZ2ljLmNvbT4gd3JvdGU6Ckhvd2R5LApUaGlzIHdhcyB0aGUgY2Fz ZSBpbiBGZWRvcmEgMzAsIGFuZCBpcyBub3cgdGhlIGNhc2UgaW4gRmVkb3JhIDMxLgpSUE1zIGFy ZSBhdmFpbGFibGUgZm9yIGdkYyBhbmQgZm9yIGxkYzIsIGJ1dCB3aGVuIGJvdGggYXJlCmluc3Rh bGxlZCBnZGMgY2FuJ3QgY29tcGlsZSBhbnl0aGluZyBhcyBpdCB0cmllcyB0byBsb2FkIGEgdmVy c2lvbgpvZiBwaG9ib3MgaW5zdGFsbGVkIGJ5IGxkYzIgd2hpY2ggaGFzIGZlYXR1cmVzIGdkYyBk b2Vzbid0IHlldApzdXBwb3J0LiBGb3Igc29tZW9uZSB3aG8ncyBkZWNpZGVkIHRvIGp1c3QgdXNl IGdkYyBmb3IgYSBwcm9qZWN0LAp0aGV5IGhhdmUgdGhlIGVhc3kgZml4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aWxsIGhhcHBlbiBzb29uIGFuZCBsZGMn cyBwaG9ib3MgZmlsZXMgd2lsbCBiZQphY2NlcHRhYmxlIHRvIGl0LgpNYWlubHkgSSB3YW50IHRv IG1lbnRpb24gaXQgaGVyZSBzbyB0aGF0IHBlb3BsZSBjYW4gZmluZCBpdCBhbmQKbm90Cmp1c3Qg dGhpbmsgdGhhdCBnZGMgaXMgYnJva2VuIG9uIEZlZG9yYSwgbGlrZSBJIHRob3VnaHQgZm9yIGEg Z29vZAp3aGlsZS4=
Nov 20 2019
On Wednesday, 20 November 2019 at 21:51:58 UTC, mipri wrote:Howdy, This was the case in Fedora 30, and is now the case in Fedora 31. RPMs are available for gdc and for ldc2, but when both are installed gdc can't compile anything as it tries to load a version of phobos installed by ldc2 which has features gdc doesn't yet support. For someone who's decided to just use gdc for a project, they have the easy fix of just uninstalling ldc2, but I'd expect that someone evaluating D as a language will be interested in comparing the different compilers, so all the compilers will be installed--and then only dmd and ldc will be functional.That's why we explicitly set the LDC include path in Debian: https://salsa.debian.org/d-team/ldc/blob/master/debian/rules#L15 This is a bug in Fedora, you could file an issue with the package at Fedora and ask them to do the same as Debian for include paths. (we do set the path explicitly as linked, and also apply this patch: https://salsa.debian.org/d-team/ldc/blob/master/debian/patches/02_ldc_include_path.diff Cheers, Matthias
Nov 21 2019
On Thursday, 21 November 2019 at 23:25:34 UTC, Matthias Klumpp wrote:On Wednesday, 20 November 2019 at 21:51:58 UTC, mipri wrote:I filed a bug report with Fedora for this issue.[...]That's why we explicitly set the LDC include path in Debian: https://salsa.debian.org/d-team/ldc/blob/master/debian/rules#L15 This is a bug in Fedora, you could file an issue with the package at Fedora and ask them to do the same as Debian for include paths. (we do set the path explicitly as linked, and also apply this patch: https://salsa.debian.org/d-team/ldc/blob/master/debian/patches/02_ldc_include_path.diff Cheers, Matthias
Dec 13 2019