Created attachment 971574 [details] reproducer script using docker containers Description of problem: After compiling a D language program, it fails to run. Version-Release number of selected component (if applicable): bash-4.3# rpm -qa ldc\* ldc-druntime-devel-0.13.0-61.fc21.x86_64 ldc-config-0.13.0-61.fc21.noarch ldc-0.13.0-61.fc21.x86_64 ldc-druntime-0.13.0-61.fc21.x86_64 ldc-phobos-devel-0.13.0-61.fc21.x86_64 ldc-phobos-0.13.0-61.fc21.x86_64 How reproducible: always Steps to Reproduce: 1. git clone https://github.com/CyberShadow/dhcptest.git 2. cd dhcptest 3. ldc2 dhcptest.d 4. ./dhcptest -h Expected results: should see help (usage) for the compiled program. Actual results: $ docker run --rm -i -t fedora:21 bash bash-4.3# yum -y install ldc gcc git &> /dev/null bash-4.3# useradd testuser bash-4.3# su - testuser [testuser@e60fa7d2eeb1 ~]$ git clone https://github.com/CyberShadow/dhcptest.git Cloning into 'dhcptest'... remote: Counting objects: 127, done. remote: Total 127 (delta 0), reused 0 (delta 0) Receiving objects: 100% (127/127), 27.49 KiB | 0 bytes/s, done. Resolving deltas: 100% (56/56), done. Checking connectivity... done. [testuser@e60fa7d2eeb1 ~]$ cd dhcptest/ [testuser@e60fa7d2eeb1 dhcptest]$ ldc2 dhcptest.d [testuser@e60fa7d2eeb1 dhcptest]$ ./dhcptest --help Fatal Error while loading '/lib64/libphobos-ldc.so.64': The module 'std.range' is already defined in './dhcptest'. Illegal instruction (core dumped) [testuser@e60fa7d2eeb1 dhcptest]$ ./dhcptest -h Fatal Error while loading '/lib64/libphobos-ldc.so.64': The module 'std.range' is already defined in './dhcptest'. Illegal instruction (core dumped) Additional info: I have added test.sh, a script that uses docker to demonstrate the following. Note that ldc on fedora 20 compiles and runs tag 0.4 of the D project, but fedora 21 fails to run. =================== SUMMARY for Sat Dec 20 21:59:21 UTC 2014 ------------------- Fedora 20 (Heisenbug) branch master FAILED to compile Fedora 20 (Heisenbug) branch heads/0.4 compiles OK and runs OK Fedora 21 (Twenty One) branch master compiles OK but FAILS to run Fedora 21 (Twenty One) branch heads/0.4 compiles OK but FAILS to run Ubuntu 14.04.1 LTS, Trusty Tahr branch master compiles OK and runs OK Ubuntu 14.04.1 LTS, Trusty Tahr branch heads/0.4 compiles OK and runs OK I also tried the same exercise in Rawhide with the same, failed outcome.
Created attachment 979657 [details] Simple Hello World program
I have the same problem and am unable to run any D progrma, even the simple attached "Hello world" program : 1. download the attachement as "Test.d". 2. ldc2 test.d 3. ./Test Expected result : display "Hello World". Actual result : Fatal Error while loading '/lib64/libphobos-ldc.so.64': The module 'std.array' is already defined in './Test'. zsh: illegal hardware instruction (core dumped) ./Test
(In reply to Gilles Berger Sabbatel from comment #2) > I have the same problem and am unable to run any D progrma, even the simple > attached "Hello world" program : -snip- same here (fedora 21): $ ./hello Fatal Error while loading '/lib64/libphobos-ldc.so.64': The module 'std.array' is already defined in './hello'. Illegal instruction (core dumped)
same thing on fedora 22 (rawhide) [user@rawhide ~]$ cat /etc/os-release NAME=Fedora VERSION="22 (Rawhide)" ID=fedora VERSION_ID=22 PRETTY_NAME="Fedora 22 (Rawhide)" ANSI_COLOR="0;34" CPE_NAME="cpe:/o:fedoraproject:fedora:22" HOME_URL="https://fedoraproject.org/" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=Rawhide REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=Rawhide [user@rawhide ~]$ rpm -qa ldc\* ldc-druntime-0.13.0-61.fc22.x86_64 ldc-0.13.0-61.fc22.x86_64 ldc-phobos-devel-0.13.0-61.fc22.x86_64 ldc-phobos-0.13.0-61.fc22.x86_64 ldc-config-0.13.0-61.fc22.noarch ldc-druntime-devel-0.13.0-61.fc22.x86_64 [user@rawhide ~]$ cat hello.d import std.stdio; int main() { stdout.writeln("Hella world!"); return 0; } [user@rawhide ~]$ ldc2 hello.d [user@rawhide ~]$ ./hello Fatal Error while loading '/lib64/libphobos-ldc.so.64': The module 'std.array' is already defined in './hello'. Illegal instruction (core dumped)
> [user@rawhide ~]$ ./hello > Fatal Error while loading '/lib64/libphobos-ldc.so.64': > The module 'std.array' is already defined in './hello'. > Illegal instruction (core dumped) Wow, that doesn't look good at all! Is that only because Fedora is stuck at ldc-0.13.0? Or is it specific to Fedora even? What version is used by Ubuntu? > Fedora 20 (Heisenbug) branch master FAILED to compile > Fedora 20 (Heisenbug) branch heads/0.4 compiles OK and runs OK > Fedora 21 (Twenty One) branch master compiles OK but FAILS to run > Fedora 21 (Twenty One) branch heads/0.4 compiles OK but FAILS to run > Ubuntu 14.04.1 LTS, Trusty Tahr branch master compiles OK and runs OK > Ubuntu 14.04.1 LTS, Trusty Tahr branch heads/0.4 compiles OK and runs OK
We (upstream) don't support shared libraries at all for versions before 0.14.0. I'd strongly suggest upgrading to 0.15.1 or at least 0.14.0 before spending any more time on this. Before officially releasing shared library support in 0.14 I had to deal with a couple issues that occurred with only one of ld.bfd and ld.gold but not the other. This might explain what you are seeing.
Latest ldc from git compiles fine under fedora 21. Only needed to install a few devel packages and llvm-static. I used it to compile gtkd, and then compile and run my own program (using gtkd)...
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
derelict-3-33.20150730git10a517b.fc23 gtkd-3.1.4-52.fc23 dustmite-1-25.20150515git3498068.fc23 ldc-0.16.0.alpha3-76.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-16259
derelict-3-33.20150730git10a517b.fc23, dustmite-1-25.20150515git3498068.fc23, gtkd-3.1.4-52.fc23, ldc-0.16.0.alpha3-76.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with $ su -c 'dnf --enablerepo=updates-testing update dustmite gtkd derelict ldc' You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16259
derelict-3-33.20150730git10a517b.fc23, dustmite-1-25.20150515git3498068.fc23, gtkd-3.1.4-52.fc23, ldc-0.16.0.alpha3-76.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.