Thread overview | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
July 07, 2013 Building from source for ubuntu | ||||
---|---|---|---|---|
| ||||
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. |
July 07, 2013 Re: Building from source for ubuntu | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarch_dodra | 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 |
July 07, 2013 Re: Building from source for ubuntu | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | 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: >> 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. Indeed. Looks like I got confused with the message "no cpu specified, assuming X86" >> 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 Hum... Well, I'm not used to doing this. Time for more googlin' I guess :/ |
July 07, 2013 Re: Building from source for ubuntu | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarch_dodra | 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 |
July 07, 2013 Re: Building from source for ubuntu | ||||
---|---|---|---|---|
| ||||
Posted in reply to David | 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 files
Most 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.
|
July 07, 2013 Re: Building from source for ubuntu | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarch_dodra | On Sunday, July 07, 2013 13:17:31 monarch_dodra wrote:
> 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 files
>
> Most 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.
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 Davis
|
July 07, 2013 Re: Building from source for ubuntu | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarch_dodra | 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 directory Hehe, /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 |
July 07, 2013 Re: Building from source for ubuntu | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marco Leise | 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>: > > > 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 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. :) -- Marco |
July 07, 2013 Re: Building from source for ubuntu | ||||
---|---|---|---|---|
| ||||
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: > > 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 files > > > > Most 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. > > 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. [...] 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 Frye |
July 07, 2013 Re: Building from source for ubuntu | ||||
---|---|---|---|---|
| ||||
Attachments:
| On Sun, 2013-07-07 at 07:50 -0700, H. S. Teoh wrote: […] > apt-cache search libcurl | grep dev aptitude search libcurl.*dev surely. :-) -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder@ekiga.net 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 |
Copyright © 1999-2021 by the D Language Foundation