Bug 1176361 - Fatal Error while loading '/lib64/libphobos-ldc.so.64'
Summary: Fatal Error while loading '/lib64/libphobos-ldc.so.64'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ldc
Version: 21
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: MERCIER Jonathan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-20 22:39 UTC by Paul Morgan
Modified: 2015-10-01 16:05 UTC (History)
6 users (show)

Fixed In Version: ldc-0.16.0.alpha3-76.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-01 16:05:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
reproducer script using docker containers (3.35 KB, application/x-shellscript)
2014-12-20 22:39 UTC, Paul Morgan
no flags Details
Simple Hello World program (91 bytes, text/plain)
2015-01-13 15:38 UTC, Gilles Berger Sabbatel
no flags Details

Description Paul Morgan 2014-12-20 22:39:00 UTC
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.

Comment 1 Gilles Berger Sabbatel 2015-01-13 15:38:43 UTC
Created attachment 979657 [details]
Simple Hello World program

Comment 2 Gilles Berger Sabbatel 2015-01-13 15:42:48 UTC
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

Comment 3 Paul Morgan 2015-01-13 15:47:25 UTC
(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)

Comment 4 Paul Morgan 2015-01-13 16:26:07 UTC
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)

Comment 5 Michael Schwendt 2015-01-15 10:10:25 UTC
> [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

Comment 6 David Nadlinger 2015-01-16 22:09:11 UTC
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.

Comment 7 Gilles Berger Sabbatel 2015-01-19 16:26:04 UTC
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)...

Comment 8 Fedora Admin XMLRPC Client 2015-02-17 03:17:10 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Fedora Update System 2015-09-20 20:27:14 UTC
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

Comment 10 Fedora Update System 2015-09-21 18:52:28 UTC
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

Comment 11 Fedora Update System 2015-10-01 16:05:20 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.