digitalmars.D.learn - Building from source for ubuntu
- monarch_dodra (19/19) Jul 07 2013 I'm building a nix environment for dmd, and am having problems
- Jonathan M Davis (8/31) Jul 07 2013 make -f posix MODEL=64
- monarch_dodra (5/42) Jul 07 2013 Indeed. Looks like I got confused with the message "no cpu
- David (3/3) Jul 07 2013 http://packages.ubuntu.com/de/precise/libcurl-dev
- monarch_dodra (7/12) Jul 07 2013 Most awesome. Got it to work installing "libcurl-dev".
- Jonathan M Davis (6/21) Jul 07 2013 I would have suggested searching the list of packages for anything conta...
- H. S. Teoh (9/30) Jul 07 2013 [...]
- Russel Winder (14/15) Jul 07 2013 aptitude search libcurl.*dev
- John Colvin (5/10) Jul 07 2013 to be honest, most of the time I would just write "apt-get
- Russel Winder (15/28) Jul 07 2013 But libcurl and libcurl-dev are likely different packages. Also apt-get
- John Colvin (4/19) Jul 07 2013 yes...?? If you type "apt-get install libcurl" and then press
- H. S. Teoh (14/33) Jul 07 2013 [...]
- monarch_dodra (11/11) Jul 10 2013 More questions related to running on ubuntu. I'd like to have
- H. S. Teoh (8/22) Jul 10 2013 [...]
- monarch_dodra (6/31) Jul 10 2013 Didn't know that's where it was. I think it also reads the one
- John Colvin (11/22) Jul 10 2013 The way i manage this sort of thing is by having symbolic links
- Jonathan M Davis (18/21) Jul 10 2013 To quote the website (http://dlang.org/dmd-linux.html):
- Marco Leise (51/61) Jul 07 2013 Hehe, /usr/bin/ld is the linker. It said that it cannot find
- Marco Leise (12/25) Jul 07 2013 P.S.: The curl package on Debian and Ubuntu only contains the
I'm building a nix environment for dmd, and am having problems buiding dmd from source on it. I'm following the instructions on the wiki: http://wiki.dlang.org/Building_DMD The first thing I've run into seems that the X64 instructions are out of date? it says to do "make -f posix.mak MODEL=64", but that doesn't seem to do anything... Anyways, that's just minor detail. I'm hitting a wall at building phobos, because of curl: make -f posix.mak DMD=../dmd/src/dmd /usr/bin/ld: cannot find -lcurl I've isntalled curl via apt-get ("sudo apt-get curl"), and it seems to be installed. Just not in ld: which curl /usr/bin/curl cd /usr/bin/ld bash: cd: /usr/bin/ld: Not a directory Bit of help on either of these two isues? Then I'll update the wiki.
Jul 07 2013
On Sunday, July 07, 2013 12:25:50 monarch_dodra wrote:I'm building a nix environment for dmd, and am having problems buiding dmd from source on it. I'm following the instructions on the wiki: http://wiki.dlang.org/Building_DMD The first thing I've run into seems that the X64 instructions are out of date? it says to do "make -f posix.mak MODEL=64", but that doesn't seem to do anything... Anyways, that's just minor detail.make -f posix MODEL=64 is correct.I'm hitting a wall at building phobos, because of curl: make -f posix.mak DMD=../dmd/src/dmd /usr/bin/ld: cannot find -lcurl I've isntalled curl via apt-get ("sudo apt-get curl"), and it seems to be installed. Just not in ld: which curl /usr/bin/curl cd /usr/bin/ld bash: cd: /usr/bin/ld: Not a directory Bit of help on either of these two isues? Then I'll update the wiki.I don't use Ubuntu, but my guess is that it has a separate package (probably with devel in the name) which includes the static lib. Many distros don't include all of the stuff required to build against a library in the main package for a library - just the stuff required to dynamically link against it. - Jonathan M Davis
Jul 07 2013
On Sunday, 7 July 2013 at 10:40:51 UTC, Jonathan M Davis wrote:On Sunday, July 07, 2013 12:25:50 monarch_dodra wrote:Indeed. Looks like I got confused with the message "no cpu specified, assuming X86"I'm building a nix environment for dmd, and am having problems buiding dmd from source on it. I'm following the instructions on the wiki: http://wiki.dlang.org/Building_DMD The first thing I've run into seems that the X64 instructions are out of date? it says to do "make -f posix.mak MODEL=64", but that doesn't seem to do anything... Anyways, that's just minor detail.make -f posix MODEL=64 is correct.Hum... Well, I'm not used to doing this. Time for more googlin' I guess :/I'm hitting a wall at building phobos, because of curl: make -f posix.mak DMD=../dmd/src/dmd /usr/bin/ld: cannot find -lcurl I've isntalled curl via apt-get ("sudo apt-get curl"), and it seems to be installed. Just not in ld: which curl /usr/bin/curl cd /usr/bin/ld bash: cd: /usr/bin/ld: Not a directory Bit of help on either of these two isues? Then I'll update the wiki.I don't use Ubuntu, but my guess is that it has a separate package (probably with devel in the name) which includes the static lib. Many distros don't include all of the stuff required to build against a library in the main package for a library - just the stuff required to dynamically link against it. - Jonathan M Davis
Jul 07 2013
http://packages.ubuntu.com/de/precise/libcurl-dev Should do it, on Ubuntu/Debian you always need the "-dev" or "-devel" packages if you want to link against something or use the header files
Jul 07 2013
On Sunday, 7 July 2013 at 10:57:08 UTC, David wrote:http://packages.ubuntu.com/de/precise/libcurl-dev Should do it, on Ubuntu/Debian you always need the "-dev" or "-devel" packages if you want to link against something or use the header filesMost awesome. Got it to work installing "libcurl-dev". I wasted about 30 minutes after trying every flavor of "curllib-[dev|devel]", then typoing the work "instal" without reading the exact error message :D In any case, I got it to work. I'll update the wiki to be a bit more hand-holding in respect to a few things.
Jul 07 2013
On Sunday, July 07, 2013 13:17:31 monarch_dodra wrote:On Sunday, 7 July 2013 at 10:57:08 UTC, David wrote:I would have suggested searching the list of packages for anything containing curl, in which case, it should have been easy enough to figure out which one you needed. I'm sure that Ubuntu has a command for searching the list of packages rather than having to try and guess what a package is called. - Jonathan M Davishttp://packages.ubuntu.com/de/precise/libcurl-dev Should do it, on Ubuntu/Debian you always need the "-dev" or "-devel" packages if you want to link against something or use the header filesMost awesome. Got it to work installing "libcurl-dev". I wasted about 30 minutes after trying every flavor of "curllib-[dev|devel]", then typoing the work "instal" without reading the exact error message :D In any case, I got it to work. I'll update the wiki to be a bit more hand-holding in respect to a few things.
Jul 07 2013
On Sun, Jul 07, 2013 at 04:26:06AM -0700, Jonathan M Davis wrote:On Sunday, July 07, 2013 13:17:31 monarch_dodra wrote:[...] apt-cache search libcurl | grep dev :) T -- Doubtless it is a good thing to have an open mind, but a truly open mind should be open at both ends, like the food-pipe, with the capacity for excretion as well as absorption. -- Northrop FryeOn Sunday, 7 July 2013 at 10:57:08 UTC, David wrote:I would have suggested searching the list of packages for anything containing curl, in which case, it should have been easy enough to figure out which one you needed. I'm sure that Ubuntu has a command for searching the list of packages rather than having to try and guess what a package is called.http://packages.ubuntu.com/de/precise/libcurl-dev Should do it, on Ubuntu/Debian you always need the "-dev" or "-devel" packages if you want to link against something or use the header filesMost awesome. Got it to work installing "libcurl-dev". I wasted about 30 minutes after trying every flavor of "curllib-[dev|devel]", then typoing the work "instal" without reading the exact error message :D In any case, I got it to work. I'll update the wiki to be a bit more hand-holding in respect to a few things.
Jul 07 2013
On Sun, 2013-07-07 at 07:50 -0700, H. S. Teoh wrote: [=E2=80=A6]apt-cache search libcurl | grep devaptitude search libcurl.*dev surely. :-) --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jul 07 2013
On Sunday, 7 July 2013 at 17:04:24 UTC, Russel Winder wrote:On Sun, 2013-07-07 at 07:50 -0700, H. S. Teoh wrote: […]to be honest, most of the time I would just write "apt-get install licurl" and then look through the rest using tab completion. Doesn't work for more complex cases, but it's often enough.apt-cache search libcurl | grep devaptitude search libcurl.*dev surely. :-)
Jul 07 2013
On Sun, 2013-07-07 at 19:51 +0200, John Colvin wrote:On Sunday, 7 July 2013 at 17:04:24 UTC, Russel Winder wrote:But libcurl and libcurl-dev are likely different packages. Also apt-get really is not as good as aptitude. And aptitude is way better than any of the fancy graphics UI abominations. One up for ncurses and properly managed dependencies so as to get automated removal. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winderOn Sun, 2013-07-07 at 07:50 -0700, H. S. Teoh wrote: [=E2=80=A6]=20 to be honest, most of the time I would just write "apt-get=20 install licurl" and then look through the rest using tab=20 completion. Doesn't work for more complex cases, but it's often=20 enough.apt-cache search libcurl | grep devaptitude search libcurl.*dev surely. :-)
Jul 07 2013
On Sunday, 7 July 2013 at 18:02:03 UTC, Russel Winder wrote:On Sun, 2013-07-07 at 19:51 +0200, John Colvin wrote:yes...?? If you type "apt-get install libcurl" and then press tab, it prints out a list of all package names that start with libcurl.On Sunday, 7 July 2013 at 17:04:24 UTC, Russel Winder wrote:But libcurl and libcurl-dev are likely different packages.On Sun, 2013-07-07 at 07:50 -0700, H. S. Teoh wrote: […]to be honest, most of the time I would just write "apt-get install licurl" and then look through the rest using tab completion. Doesn't work for more complex cases, but it's often enough.apt-cache search libcurl | grep devaptitude search libcurl.*dev surely. :-)
Jul 07 2013
On Sun, Jul 07, 2013 at 07:01:40PM +0100, Russel Winder wrote:On Sun, 2013-07-07 at 19:51 +0200, John Colvin wrote:[...] Apt-get manages autoremovals too. Though granted, it's not as obvious how to operate it. But then again, I'm a CLI type of person, so reading manpages is second nature to me. YMMV. :) But yeah, for package management, I say a resounding No to GUI apps... what happens if, for example, you need to fix a broken X11 installation? Over an SSH link? I still find CLI most reliable, not demanding on bandwidth, and still far more expressive than GUIs. (Well, I guess that's why I'm a programmer. :-P Most "normal" people don't think like that.) T -- Тише едешь, дальше будешь.On Sunday, 7 July 2013 at 17:04:24 UTC, Russel Winder wrote:But libcurl and libcurl-dev are likely different packages. Also apt-get really is not as good as aptitude. And aptitude is way better than any of the fancy graphics UI abominations. One up for ncurses and properly managed dependencies so as to get automated removal.On Sun, 2013-07-07 at 07:50 -0700, H. S. Teoh wrote: […]to be honest, most of the time I would just write "apt-get install licurl" and then look through the rest using tab completion. Doesn't work for more complex cases, but it's often enough.apt-cache search libcurl | grep devaptitude search libcurl.*dev surely. :-)
Jul 07 2013
More questions related to running on ubuntu. I'd like to have side by side installs of dmd. Eg 2.060, 2.061 ... I installed using the downloadable packages. dmd and rdmd are in /usr/bin druntime and phobos are in dmd, which is in /usr/include Currently, I have 2.063 installed, and would like to install 2.063.2 alongside. Is there a procedure for this? I was thinking of moving the "dmd" dir into a versioned subdir, move dmd and rdmd into some other subdir too. Then, I'd have to write a corresponding dmd.conf for each. Or... is there something easier?
Jul 10 2013
On Wed, Jul 10, 2013 at 09:40:57PM +0200, monarch_dodra wrote:More questions related to running on ubuntu. I'd like to have side by side installs of dmd. Eg 2.060, 2.061 ... I installed using the downloadable packages. dmd and rdmd are in /usr/bin druntime and phobos are in dmd, which is in /usr/include Currently, I have 2.063 installed, and would like to install 2.063.2 alongside. Is there a procedure for this? I was thinking of moving the "dmd" dir into a versioned subdir, move dmd and rdmd into some other subdir too. Then, I'd have to write a corresponding dmd.conf for each.[...] How do you coax different versions of dmd to pick up a different dmd.conf file? The last time I tried it, all of them insisted on reading /etc/dmd.conf, which, of course, only actually works for one. T -- "640K ought to be enough" -- Bill G., 1984. "The Internet is not a primary goal for PC usage" -- Bill G., 1995. "Linux has no impact on Microsoft's strategy" -- Bill G., 1999.
Jul 10 2013
On Wednesday, 10 July 2013 at 20:21:10 UTC, H. S. Teoh wrote:On Wed, Jul 10, 2013 at 09:40:57PM +0200, monarch_dodra wrote:Didn't know that's where it was. I think it also reads the one that is in the same directory as it, no? That's how the zip packages work in any case. That's what I decided to do anyways, just use the zips, and add a simlink to the latest version in /usr/binMore questions related to running on ubuntu. I'd like to have side by side installs of dmd. Eg 2.060, 2.061 ... I installed using the downloadable packages. dmd and rdmd are in /usr/bin druntime and phobos are in dmd, which is in /usr/include Currently, I have 2.063 installed, and would like to install 2.063.2 alongside. Is there a procedure for this? I was thinking of moving the "dmd" dir into a versioned subdir, move dmd and rdmd into some other subdir too. Then, I'd have to write a corresponding dmd.conf for each.[...] How do you coax different versions of dmd to pick up a different dmd.conf file? The last time I tried it, all of them insisted on reading /etc/dmd.conf, which, of course, only actually works for one. T
Jul 10 2013
On Wednesday, 10 July 2013 at 19:40:58 UTC, monarch_dodra wrote:More questions related to running on ubuntu. I'd like to have side by side installs of dmd. Eg 2.060, 2.061 ... I installed using the downloadable packages. dmd and rdmd are in /usr/bin druntime and phobos are in dmd, which is in /usr/include Currently, I have 2.063 installed, and would like to install 2.063.2 alongside. Is there a procedure for this? I was thinking of moving the "dmd" dir into a versioned subdir, move dmd and rdmd into some other subdir too. Then, I'd have to write a corresponding dmd.conf for each. Or... is there something easier?The way i manage this sort of thing is by having symbolic links for all the usual dmd things (i.e. dmd, rdmd, catdoc, dmd.conf etc.), then have a script dmd_select that switches which versions they all point to (which are held in different directories). Alternatively, you could create separate symbolic links for each version, with different names. Or just rename the executables (not a good solution). The advantage of all of these is that you don't have to rewrite dmd.conf because the relative paths will be the same for all versions.
Jul 10 2013
On Wednesday, July 10, 2013 13:19:33 H. S. Teoh wrote:How do you coax different versions of dmd to pick up a different dmd.conf file? The last time I tried it, all of them insisted on reading /etc/dmd.conf, which, of course, only actually works for one.To quote the website (http://dlang.org/dmd-linux.html): ------- dmd will look for the initialization file dmd.conf in the following se quence of directories: 1. current working directory 2. directory specified by the HOME environment variable 3. directory dmd resides in 4. /etc/ ------- So, if you put dmd.conf in the same directory with the dmd binary, then it'll be specific that particular version. The bigger problem is your path. If you have multiple versions of dmd in your path, the first will always win. If you want to be able to switch between dmd binaries, you end either having to explicitly give the path to dmd or having to set up some way to switch the version of dmd which is currently in your path (probably by having it be a symlink which you change). - Jonathan M Davis
Jul 10 2013
Am Sun, 07 Jul 2013 12:25:50 +0200 schrieb "monarch_dodra" <monarchdodra gmail.com>:I'm hitting a wall at building phobos, because of curl: make -f posix.mak DMD=../dmd/src/dmd /usr/bin/ld: cannot find -lcurl I've isntalled curl via apt-get ("sudo apt-get curl"), and it seems to be installed. Just not in ld: which curl /usr/bin/curl cd /usr/bin/ld bash: cd: /usr/bin/ld: Not a directoryHehe, /usr/bin/ld is the linker. It said that it cannot find the curl library. E.g. when you say -lcurl, it is prefixed with "lib" and followed by ".so" and looked up in your system's library directory which would be usr/lib/. Now 64-bit made it more complicated. You basically have 2 systems installed. A 32-bit one and a 64-bit one, which cannot share any libraries of course, since 32-bit code isn't compatible with 64-bit code. You will thus find /usr/lib64/ (for which /usr/lib/ is an alternative name) and /usr/lib32/. When I type: ls /usr/lib{32,64}/libcurl.so* I see that I have curl as 32-bit in version 4.2.0 and as 64-bit in version 4.3.0: /usr/lib32/libcurl.so /usr/lib32/libcurl.so.4 /usr/lib32/libcurl.so.4.2.0 /usr/lib64/libcurl.so /usr/lib64/libcurl.so.4 /usr/lib64/libcurl.so.4.3.0 Not that the full version is the corresponding actual file, while the others are links to it. These "so-names" are used to link against the library in general, a specific major or even minor version. If you do NOT have a 32-bit installation of curl in /usr/lib32 AND compile Phobos in 32-bit, it will fail. Ok, now you know that "ld" is the linker program and not a directory. "which" is on the other hand a tool that looks up the location of a program as it would be found by just typing its name on the command-line. It doesn't list libraries, just executables in the directories given in the $PATH environment variable. You can quickly take a look at it by typing echo $PATH The curl library actually comes with a program (/usr/bin/curl) that is both a nice demo of what the library can do and useful to download stuff from the command line or in a shell script. You may have noticed that all executables are in some */bin/ and all libraries in some */lib/ directory. You can rely on that convention. The split between /bin, /lib and /usr/bin, /usr/lib comes from a time when fast storage was expensive and very limited in capacity. The fast medium was mounted in the root "/" directory with only the most commonly used programs and libraries in /bin and /lib (that you can still find there today) and a magnetic tape was mounted into /usr which had abundant storage capacity but terrible seek times. I hope that made Linux a bit less mysterious. -- Marco
Jul 07 2013
Am Sun, 7 Jul 2013 14:45:56 +0200 schrieb Marco Leise <Marco.Leise gmx.de>:Am Sun, 07 Jul 2013 12:25:50 +0200 schrieb "monarch_dodra" <monarchdodra gmail.com>:P.S.: The curl package on Debian and Ubuntu only contains the executable, not the library. That's why it didn't work: http://packages.debian.org/wheezy/amd64/curl/filelist libcurl3 contains the libraries for versions 3 and 4: http://packages.debian.org/wheezy/amd64/libcurl3/filelist Also from that list it looks like Debian uses /usr/lib/x86_64-linux-gnu/ where I said /usr/lib64/ earlier. I'm on Gentoo Linux. Sorry for any confusion. :) -- MarcoI'm hitting a wall at building phobos, because of curl: make -f posix.mak DMD=../dmd/src/dmd /usr/bin/ld: cannot find -lcurl I've isntalled curl via apt-get ("sudo apt-get curl"), and it seems to be installed. Just not in ld: which curl /usr/bin/curl cd /usr/bin/ld bash: cd: /usr/bin/ld: Not a directory
Jul 07 2013