digitalmars.D.learn - DMD on linux?
- Sean Eskapp (16/16) Mar 02 2011 I'm trying to work with D on Ubuntu, but I keep having this issue:
- Jonathan M Davis (22/41) Mar 02 2011 1. I never bother installing the zip anywhere. If you just unzip it and ...
- Sean Eskapp (18/59) Mar 02 2011 lphobos2
- Sean Eskapp (15/15) Mar 02 2011 I'm still having issues with the linux dmd. Here's the relevant part
- Jesse Phillips (3/20) Mar 02 2011 I think the part LD is tripping up on is "-m32 -l -Xlinker"
- Sean Eskapp (8/28) Mar 03 2011 mismatch
- Jacob Carlborg (4/19) Mar 02 2011 You can give this a try: https://bitbucket.org/doob/dvm/wiki/Home
- Robert Clipsham (6/22) Mar 02 2011 See also: http://ftp.digitalmars.com/dmd_2.052-0_i386.deb for everything...
I'm trying to work with D on Ubuntu, but I keep having this issue: ... function func function func gcc Nullimorphism.o -o Nullimorphism.exe -g -m32 -l -Xlinker -L/usr/bin/../lib32 -Xlinker - L/usr/bin/../lib64 -Xlinker --no-warn-search-mismatch -Xlinker --export-dynamic -lrt - lphobos2 -lpthread -lm /usr/bin/ld: cannot find -l-Xlinker /usr/bin/ld: cannot find -lphobos2 collect2: ld returned 1 exit status --- errorlevel 1 make[1]: *** [all] Error 1 ... I downloaded the DMD v2.052 ZIP from the download page, extracted the linux/bin folder into /usr/bin, the linux/lib64 folder into /usr/lib64, and the src folder into /usr/src. Can somebody please help?
Mar 02 2011
On Wednesday, March 02, 2011 13:52:29 Sean Eskapp wrote:I'm trying to work with D on Ubuntu, but I keep having this issue: ... function func function func gcc Nullimorphism.o -o Nullimorphism.exe -g -m32 -l -Xlinker -L/usr/bin/../lib32 -Xlinker - L/usr/bin/../lib64 -Xlinker --no-warn-search-mismatch -Xlinker --export-dynamic -lrt - lphobos2 -lpthread -lm /usr/bin/ld: cannot find -l-Xlinker /usr/bin/ld: cannot find -lphobos2 collect2: ld returned 1 exit status --- errorlevel 1 make[1]: *** [all] Error 1 ... I downloaded the DMD v2.052 ZIP from the download page, extracted the linux/bin folder into /usr/bin, the linux/lib64 folder into /usr/lib64, and the src folder into /usr/src. Can somebody please help?1. I never bother installing the zip anywhere. If you just unzip it and add /path/to/unzipped/dmd2/linux/bin to your path, then you should be fine. I don't see any real reason to actual try and install dmd into your system folders (though you obviously can if you want to). 2. Assuming that you _do_ move files around, you need to adjust your dmd.conf so that it points to the appropriate places. 3. If you just moved files around, then you might not _have_ a dmd.conf, and you're doubly screwed. Take a look at the documentation page for dmd on linux: http://www.digitalmars.com/d/2.0/dmd-linux.html It's slightly out of date, since with the last release, 64-bit support was added, and the 32-bit version of libphobos.a is in /path/to/unzipped/dmd2/linux/lib32 and the 64-bit version is in /path/to/unzipped/dmd2/linux/lib64, but the instructions should be correct otherwise. You need to make sure that dmd is on your path and that a version of dmd.conf which points to the place where libphobos2.a is is in one of the places that dmd looks for dmd.conf (as described on that page). Also, make sure that you're using a dmd.conf based on the most recent version, or you could be missing necessary linker flags. - Jonathan M Davis
Mar 02 2011
== Quote from Jonathan M Davis (jmdavisProg gmx.com)'s articleOn Wednesday, March 02, 2011 13:52:29 Sean Eskapp wrote:issue:I'm trying to work with D on Ubuntu, but I keep having thislphobos2... function func function func gcc Nullimorphism.o -o Nullimorphism.exe -g -m32 -l -Xlinker -L/usr/bin/../lib32 -Xlinker - L/usr/bin/../lib64 -Xlinker --no-warn-search-mismatch -Xlinker --export-dynamic -lrt -extracted the-lpthread -lm /usr/bin/ld: cannot find -l-Xlinker /usr/bin/ld: cannot find -lphobos2 collect2: ld returned 1 exit status --- errorlevel 1 make[1]: *** [all] Error 1 ... I downloaded the DMD v2.052 ZIP from the download page,/usr/lib64,linux/bin folder into /usr/bin, the linux/lib64 folder intoit and addand the src folder into /usr/src. Can somebody please help?1. I never bother installing the zip anywhere. If you just unzip/path/to/unzipped/dmd2/linux/bin to your path, then you should befine. I don'tsee any real reason to actual try and install dmd into your systemfolders(though you obviously can if you want to). 2. Assuming that you _do_ move files around, you need to adjustyour dmd.conf sothat it points to the appropriate places. 3. If you just moved files around, then you might not _have_ admd.conf, andyou're doubly screwed. Take a look at the documentation page for dmd on linux: http://www.digitalmars.com/d/2.0/dmd-linux.html It's slightly out of date, since with the last release, 64-bitsupport wasadded, and the 32-bit version of libphobos.a is in /path/to/unzipped/dmd2/linux/lib32 and the 64-bit version is in /path/to/unzipped/dmd2/linux/lib64, but the instructions should becorrectotherwise. You need to make sure that dmd is on your path and that a versionof dmd.confwhich points to the place where libphobos2.a is is in one of theplaces that dmdlooks for dmd.conf (as described on that page). Also, make surethat you'reusing a dmd.conf based on the most recent version, or you could bemissingnecessary linker flags. - Jonathan M DavisHmm my dmd.conf seems fine, but since the .deb has been updated, I can just use that. Thanks!
Mar 02 2011
I'm still having issues with the linux dmd. Here's the relevant part of the output: ... function func function func gcc Nullimorphism.o -o Nullimorphism.exe -g -m32 -l -Xlinker - L/usr/lib32 -Xlinker -L/usr/lib64 -Xlinker --no-warn-search-mismatch -Xlinker --export-dynamic -lrt -lphobos2 -lpthread -lm /usr/bin/ld: cannot find -l-Xlinker collect2: ld returned 1 exit status --- errorlevel 1 make[1]: *** [all] Error 1 make[1]: Leaving directory ... Any help is appreciated.
Mar 02 2011
Sean Eskapp Wrote:I'm still having issues with the linux dmd. Here's the relevant part of the output: ... function func function func gcc Nullimorphism.o -o Nullimorphism.exe -g -m32 -l -Xlinker - L/usr/lib32 -Xlinker -L/usr/lib64 -Xlinker --no-warn-search-mismatch -Xlinker --export-dynamic -lrt -lphobos2 -lpthread -lm /usr/bin/ld: cannot find -l-Xlinker collect2: ld returned 1 exit status --- errorlevel 1 make[1]: *** [all] Error 1 make[1]: Leaving directory ... Any help is appreciated.I think the part LD is tripping up on is "-m32 -l -Xlinker" So it seems you are calling dmd incorrectly or modified dmd.conf incorrectly as there is no argument after -l so LD thinks you want to link against lib-Xlinker.
Mar 02 2011
== Quote from Jesse Phillips (jessekphillips+D gmail.com)'s articleSean Eskapp Wrote:partI'm still having issues with the linux dmd. Here's the relevantmismatchof the output: ... function func function func gcc Nullimorphism.o -o Nullimorphism.exe -g -m32 -l -Xlinker - L/usr/lib32 -Xlinker -L/usr/lib64 -Xlinker --no-warn-search-incorrectly as there is no argument after -l so LD thinks you want to link against lib-Xlinker. Oops yeah, there was some obsolete in the makefile in my project. Don't know how it managed to compile on windows, though.. Thanks, though, problem solved.-Xlinker --export-dynamic -lrt -lphobos2 -lpthread -lm /usr/bin/ld: cannot find -l-Xlinker collect2: ld returned 1 exit status --- errorlevel 1 make[1]: *** [all] Error 1 make[1]: Leaving directory ... Any help is appreciated.I think the part LD is tripping up on is "-m32 -l -Xlinker" So it seems you are calling dmd incorrectly or modified dmd.conf
Mar 03 2011
On 2011-03-03 00:43, Sean Eskapp wrote:I'm still having issues with the linux dmd. Here's the relevant part of the output: ... function func function func gcc Nullimorphism.o -o Nullimorphism.exe -g -m32 -l -Xlinker - L/usr/lib32 -Xlinker -L/usr/lib64 -Xlinker --no-warn-search-mismatch -Xlinker --export-dynamic -lrt -lphobos2 -lpthread -lm /usr/bin/ld: cannot find -l-Xlinker collect2: ld returned 1 exit status --- errorlevel 1 make[1]: *** [all] Error 1 make[1]: Leaving directory ... Any help is appreciated.You can give this a try: https://bitbucket.org/doob/dvm/wiki/Home -- /Jacob Carlborg
Mar 02 2011
On 02/03/11 21:52, Sean Eskapp wrote:I'm trying to work with D on Ubuntu, but I keep having this issue: ... function func function func gcc Nullimorphism.o -o Nullimorphism.exe -g -m32 -l -Xlinker -L/usr/bin/../lib32 -Xlinker - L/usr/bin/../lib64 -Xlinker --no-warn-search-mismatch -Xlinker --export-dynamic -lrt - lphobos2 -lpthread -lm /usr/bin/ld: cannot find -l-Xlinker /usr/bin/ld: cannot find -lphobos2 collect2: ld returned 1 exit status --- errorlevel 1 make[1]: *** [all] Error 1 ... I downloaded the DMD v2.052 ZIP from the download page, extracted the linux/bin folder into /usr/bin, the linux/lib64 folder into /usr/lib64, and the src folder into /usr/src. Can somebody please help?See also: http://ftp.digitalmars.com/dmd_2.052-0_i386.deb for everything to work out of the box. -- Robert http://octarineparrot.com/
Mar 02 2011