Re: ld issues again
Hello all, Thanx for the assistance rendered before. I've removed all my previous installation attempt and installed D 2.0 under Ubuntu with the one click installer. Now when compiling I get the following, which is different from what I was getting before: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib32/libphobos2.a(getopt_714_340.o): `_D3std6getopt10optionCharw' accessed both as normal and thread local symbol /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib32/libphobos2.a: could not read symbols: Success collect2: ld returned 1 exit status --errorlevel 1 I edited my dmd.conf because it seems to be trying to find libphobos2.a in the lib32 directory, and I think it needs to find it in the lib64 directory. Don't know what the getopt error is about. Here is my dmd.conf: [Environment] DFLAGS= -I/usr/include/d/dmd/phobos -I/usr/include/d/dmd/druntime/import -L-L/usr/lib64 -L- L/usr/lib32 -L--no-warn-search-mismatch -L--export-dynamic -L-lrt Should I change the -L-L to just /usr/lib since that's linked to /usr/lib64? Thanx again Brian
Re: dmd2 on Ubuntu
So I removed the executables from /usr/local/bin and rather than adding them to my path, I sym linked them to the dmd2/linux/bin directory in my home directory. I did this because I'd like to have the compiler and tools available system wide. I then moved the dmd.conf file from /etc to the linux/bin directory where dmd resides. When I do this I get different messages from dmd, but it still can't make ld find -lphobos2. The two messages I get, however, are: /usr/bin/ld: skipping incompatible /usr/lib/libphobos2.a when searching for -lphobos2 The other message is also about libphobos2.a, it's just finding it relative to the gcc library path. I even extracted all the object files from libphobos2.a and verified that they were 64 bit ELF format. Is it really that libphobos2.a is messed up, or is this message a red herring? Thanx again Brian
dmd2 on Ubuntu
Hello all, It's been a while since I've worked with D, but I'm coming back to it now since it has 64 bit support for Windows, Linux and Mac. I'm developing on 64 bit Ubuntu. Here's the output of uname -a: Linux jetty 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:25:51 UTC 2011 x86_64 GNU/Linux I've done a partial installation leaving the source libraries in my user directory, but moving phobos and the executables to /usr/local/bin and /usr/lib. dmd seems to run fine. I was able to compile some old projects I had into libraries. Now I'm trying to build the executable to use them. When I issue: dmd -ofbin/Debug/d_txtflt obj/Debug/d_txtflt.o ../d_libcsv/bin/Debug/libd_libcsv.a ../strptime/internalDate/bin/Debug/libinternalDate.a I get /usr/bin/ld: cannot find -lphobos2. Here is the contents of my dmd.conf file which is in /etc: [Environment] DFLAGS=-I/home/tarka/dmd2/src/phobos -I/home/tarka/dmd2/src/druntime/import -L-L/usr/lib -L--no-warn-search-mismatch -L-- export-dynamic -L-lrt The compilation seems to work fine; it's the link that fails. When I tried to run ld directly with: ld -o bin/Debug/d_txtflt obj/Debug/d_txtflt.o -l :../strptime/internalDate/bin/libinternalDate.a -l :../d_libcsv/bin/Debug/libd_libcsv.a -l :/usr/lib/libphobos2.a -E -lrt -lc I get a warning: ld: warning: cannot find entry symbol _start; defaulting to 004562d0 But it does generate output that the file commands claims is a 64 bit executable. The file will not run however. Any ideas what's going on here? Thanx Brian