www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2963] New: dmd will not link on 64bit linux

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2963

           Summary: dmd will not link on 64bit linux
           Product: D
           Version: 2.029
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: one_mad_alien hotmail.com


I have an AMD quad core with 64bit linux (xubuntu) 
`uname -a`

GNU/Linux

`gcc --version`
gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3)

`ld --version`
GNU ld (GNU Binutils for Ubuntu) 2.18.0.20080103

and I'm trying to use dmd ....

I have tried -L-m32 (which is what I've used in the past to build 32 bit
binaries on a 64bit system) but I get 

gcc main.o -o main -m32 -Xlinker -L/home/mwynn/bin/dmd/linux/lib -Xlinker -m32
-lphobos2 -lpthread -lm 
/usr/bin/ld: unrecognised emulation mode: 32
Supported emulations: elf_x86_64 elf_i386 i386linux
collect2: ld returned 1 exit status
--- errorlevel 1

if I try - L-mi386linux I get 

gcc main.o -o main -m32 -Xlinker -L/home/mwynn/bin/dmd/linux/lib -Xlinker
-mi386linux -lphobos2 -lpthread -lm 
/usr/bin/ld: unrecognized option '--eh-frame-hdr'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
--- errorlevel 1

and -L-melf_i386 gives me the same error as no options given ...
gcc main.o -o main -m32 -Xlinker -L/home/mwynn/bin/dmd/linux/lib -Xlinker
-melf_i386 -lphobos2 -lpthread -lm 
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../libpthread.so when searching for
-lpthread
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.2.4/../../../libpthread.a when searching for
-lpthread
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libpthread.so when searching
for -lpthread
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libpthread.a when searching
for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for
-lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for
-lpthread
/usr/bin/ld: cannot find -lpthread
collect2: ld returned 1 exit status

Is D going to go 64bit or is it me with a poorly setup linux system ?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 11 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2963






PDT ---
 dmd
Digital Mars D Compiler v2.029

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 11 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2963


Jarrett Billingsley <jarrett.billingsley gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jarrett.billingsley gmail.c
                   |                            |om





2009-05-11 08:08:28 PDT ---
DMD doesn't produce 64-bit executables.  You need to have the 32-bit libraries
installed.  Try installing the 'libc6-deb-i386' and 'lib32stdc++6' packages and
see if it works.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 11 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2963






2009-05-11 08:27:56 PDT ---

 installed.  Try installing the 'libc6-deb-i386' and 'lib32stdc++6' packages and
Erm, libc6-dev-i368 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 11 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2963






PDT ---
I've tried `sudo apt-get install lib32stdc++6` and `sudo apt-get install
libc6-dev-i368`  (the former I had but the latter was missing)
I now fail to find a compatible libgcc 
I have tried `sudo apt-get install lib32gcc1` but that is already installed.
(I tried apt-cache search for 'gcc' and 'lib32' so see if I could find a hint
...)

+ dmd -v -I~/bin/dmd/src/druntime/import -I~/bin/dmd/src/phobos
-L-L/home/mwynn/bin/dmd/linux/lib main.d
parse     main
semantic  main
import    object    (/home/mwynn/bin/dmd/src/druntime/import/object.di)
import    std.c.stdio    (/home/mwynn/bin/dmd/src/phobos/std/c/stdio.d)
import    core.stdc.stdio   
(/home/mwynn/bin/dmd/src/druntime/import/core/stdc/stdio.d)
import    core.stdc.config   
(/home/mwynn/bin/dmd/src/druntime/import/core/stdc/config.d)
import    core.stdc.stddef   
(/home/mwynn/bin/dmd/src/druntime/import/core/stdc/stddef.d)
import    core.stdc.stdarg   
(/home/mwynn/bin/dmd/src/druntime/import/core/stdc/stdarg.d)
semantic2 main
semantic3 main
code      main
function  main
gcc main.o -o main -m32 -Xlinker -L/home/mwynn/bin/dmd/linux/lib -lphobos2
-lpthread -lm 
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/libgcc.a
when searching for -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.2.4/libgcc.a
when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 16 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2963


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |INVALID



This is an environment problem, not a bug in dmd.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 10 2011