same problem:

$DMDLOC/dmd2/linux/bin64/dmd hello.d
/usr/bin/ld: cannot find -l:libphobos2.a
collect2: ld returned 1 exit status
--- errorlevel 1


$ cat $DMDLOC/dmd2/linux/bin64/dmd.conf

[Environment]

DFLAGS=-I%@P%/../../src/phobos -I%@P%/../../src/druntime/import -L-L%@P%/../lib64 -L-L%@P%/../lib32 -L--export-dynamic

extracted src from dmd.2.064.2.zip and built phobos and dmd from there. fails even on setting LOAD_LIBRARY paths

$ export LD_LOAD_LIBRARY=$DMDLOC/dmd2/linux/lib64
$ export LOAD_LIBRARY=$DMDLOC/dmd2/linux/lib64
$ $DMDLOC/dmd2/linux/bin64/dmd hello.d
/usr/bin/ld: cannot find -l:libphobos2.a
collect2: ld returned 1 exit status
--- errorlevel 1

$ ls $DMDLOC/dmd2/linux/lib64
hello.o libphobos2.a libphobos2.so libphobos2.so.0. libphobos2.so.0..0 libphobos2.so.0..o

$ lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 5.10 (Final)
Release:        5.10
Codename:       Final

am i doing something silly here?



On Wednesday, 4 December 2013 at 01:27:24 UTC, Puming wrote:
On Tuesday, 3 December 2013 at 17:47:47 UTC, Dejan Lekic wrote:
On Tuesday, 3 December 2013 at 10:43:06 UTC, Puming wrote:
Hi:

I followed the steps in http://dlang.org/dmd-linux.html, but when I build a simple hello world program with:

rdmd hello.d

I get the following error:

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

I have copied dmd2/linux/lib64/libphobos2.a to /usr/lib64, but ld still can't find it.

Now I really wish all our servers are using ubuntu server..

Could anybody shed some light on where the problem is? I don't have much experience in linux except using apt-get in ubuntu.

Thanks.

Puming.

What architecture that CentOS box is, and give us your /etc/dmd.conf please.

model name      : Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz

Linux 2.6.18-308.el5 #1 SMP EST 2012 x86_64 x86_64 x86_64 GNU/Linux

I'm using the the dmd.conf in dmd.2.064.2.zip



[Environment]

#DFLAGS=-I%@P%/../../src/phobos -I%@P%/../../src/druntime/import -L-L%@P%/../lib64 -L-L%@P%/../lib32 -L--no-warn-search-mismatch -L--export-dynamic DFLAGS=-I%@P%/../../src/phobos -I%@P%/../../src/druntime/import -L-L%@P%/../lib64 -L-L%@P%/../lib32 -L--export-dynamic

I commented out the -L--no-warn-search-mismatch because when building there's an error:

/usr/bin/ld: unrecognized option '--no-warn-search-mismatch'

Reply via email to