www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13836] New: DMD linker (v2.066) not working with older "ld"


          Issue ID: 13836
           Summary: DMD linker (v2.066) not working with older "ld"
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: lh3 me.com

On CentOS5, compiling a simple D2 program with dmd-2.066 will fail with the
following message:

/usr/bin/ld: cannot find -l:libphobos2.a

This is because dmd is calling "gcc -l:libphobos2.a" during the linking phase
(as is seen from "dmd -v"). Such a syntax "-l:libphobos2.a" is only supported
by recent "ld". The system "/usr/bin/ld" on CentOS5 is too old. There are two
solutions on my side:

1. Install "ld" from a more recent GNU-binutils, or

2. Manually link with "gcc -lphobos2" instead of "-l:libphobos2.a".

Both work for me. CentOS5 is still used on some old HPC clusters. I hope the
binary release of DMD could consider this. Thank you.

BTW, the issue is related to this thread:

Dec 08 2014