digitalmars.D.announce - Wishlist: 64 bit on linux
- Russ Lewis (25/25) May 18 2006 I recently upgraded to an Athlon 64, and installed Fedora Core 5 with
I recently upgraded to an Athlon 64, and installed Fedora Core 5 with the AMD64 kernel. This broke my D applications, because Phobos is released as a 32-bit library. I am writing this partly as an FYI for anybody else who hits this problem, and partly as a request to Walter TO MAKE THINGS WORK: You need to pass -m32 to gcc. Most importantly, you need to do that at the link step. So, if you're like me, and you used to use dmd to link, then you'll see something like this: dmd ...FILES... -ofcebu gcc ...FILES... -o cebu -lphobos -lpthread -lm /usr/bin/ld: skipping incompatible /usr/lib/libphobos.a when searching for -lphobos /usr/bin/ld: cannot find -lphobos Basically, you need to change your Makefile to call gcc directly, and pass it the -m32 argument: gcc -m32 ...FILES... -o cebu -lphobos -lpthread -lm Also, if you link with any C files, then you need to pass -m32 to gcc when you build those as well. FOR WALTER: I don't know how much this would take, but it would be really nice if you released a 64-bit version of Phobos, as well as the 32-bit one. I suppose that this would mean that the compiler would need to be able to produce 64-bit ELF files. But, I realize that this is probably low on the priority list. That is probably as it should be.
May 18 2006