| Thread overview | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
August 06, 2015 dmd on ubuntu 64: how to unittest phobos with -m32? | ||||
|---|---|---|---|---|
| ||||
So I am trying to unittest phobos in its 32-bit build on a Ubuntu64 machine. I installed these additional packages: sudo apt-get install libc6-dev-i386 libcurl3:i386 When I try to unittest a phobos module, e.g.: make -f posix.mak MODEL=32 std/conv.test I get: /usr/bin/ld: cannot find -lcurl What do I need to do to link libcurl/32 properly on my 64-bit platform? I've searched around for a while, no avail. Thanks, Andrei | ||||
August 06, 2015 Re: dmd on ubuntu 64: how to unittest phobos with -m32? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 06/08/15 16:18, Andrei Alexandrescu wrote: > So I am trying to unittest phobos in its 32-bit build on a Ubuntu64 > machine. I installed these additional packages: > > sudo apt-get install libc6-dev-i386 libcurl3:i386 > > When I try to unittest a phobos module, e.g.: > > make -f posix.mak MODEL=32 std/conv.test > > I get: > > /usr/bin/ld: cannot find -lcurl > > What do I need to do to link libcurl/32 properly on my 64-bit platform? > I've searched around for a while, no avail. Is the path were the 32bit libraries are installed in the standard search path? Otherwise add them, I'm guessing it's /usr/lib32 or something like that. BTW, the :i386 packages have never worked properly for me (they ended up uninstalling the whole GUI). I install the "ia32-libs" and "gcc-multilib" packages. -- /Jacob Carlborg | |||
August 06, 2015 Re: dmd on ubuntu 64: how to unittest phobos with -m32? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Thursday, 6 August 2015 at 14:18:09 UTC, Andrei Alexandrescu wrote:
> So I am trying to unittest phobos in its 32-bit build on a Ubuntu64 machine. I installed these additional packages:
>
> sudo apt-get install libc6-dev-i386 libcurl3:i386
>
> When I try to unittest a phobos module, e.g.:
>
> make -f posix.mak MODEL=32 std/conv.test
>
> I get:
>
> /usr/bin/ld: cannot find -lcurl
>
> What do I need to do to link libcurl/32 properly on my 64-bit platform? I've searched around for a while, no avail.
>
>
> Thanks,
>
> Andrei
do you have gcc-multilib and g++multilib? It probably includes some necessary libraries for 32 bit compilation.
| |||
August 06, 2015 Re: dmd on ubuntu 64: how to unittest phobos with -m32? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Jacob Carlborg | On 8/6/15 10:30 AM, Jacob Carlborg wrote: > On 06/08/15 16:18, Andrei Alexandrescu wrote: >> So I am trying to unittest phobos in its 32-bit build on a Ubuntu64 >> machine. I installed these additional packages: >> >> sudo apt-get install libc6-dev-i386 libcurl3:i386 >> >> When I try to unittest a phobos module, e.g.: >> >> make -f posix.mak MODEL=32 std/conv.test >> >> I get: >> >> /usr/bin/ld: cannot find -lcurl >> >> What do I need to do to link libcurl/32 properly on my 64-bit platform? >> I've searched around for a while, no avail. > > Is the path were the 32bit libraries are installed in the standard > search path? Otherwise add them, I'm guessing it's /usr/lib32 or > something like that. I've added -L-L/usr/lib/i386-linux-gnu, where the 32-bit libs are on Ubuntu. Ultimately the command that fails is: gcc /tmp/parallelism.o -o /tmp/dmd_runqdeQbJ -g -m32 -L/usr/lib/i386-linux-gnu -lcurl generated/linux/debug/32/libphobos2.a -lpthread -lm -lrt Indeed some but not all of the libcurl paraphernalia does seem to be there: ls /usr/lib/i386-linux-gnu/libcurl* /usr/lib/i386-linux-gnu/libcurl.so.3 /usr/lib/i386-linux-gnu/libcurl.so.4 /usr/lib/i386-linux-gnu/libcurl.so.4.3.0 So the .a file is missing. How do I install it? > BTW, the :i386 packages have never worked properly for me (they ended up > uninstalling the whole GUI). I install the "ia32-libs" and > "gcc-multilib" packages. gcc-multilib was already installed, and: E: Package 'ia32-libs' has no installation candidate Thanks, Andrei | |||
August 06, 2015 Re: dmd on ubuntu 64: how to unittest phobos with -m32? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to rsw0x | On 8/6/15 10:37 AM, rsw0x wrote: > On Thursday, 6 August 2015 at 14:18:09 UTC, Andrei Alexandrescu wrote: >> So I am trying to unittest phobos in its 32-bit build on a Ubuntu64 >> machine. I installed these additional packages: >> >> sudo apt-get install libc6-dev-i386 libcurl3:i386 >> >> When I try to unittest a phobos module, e.g.: >> >> make -f posix.mak MODEL=32 std/conv.test >> >> I get: >> >> /usr/bin/ld: cannot find -lcurl >> >> What do I need to do to link libcurl/32 properly on my 64-bit >> platform? I've searched around for a while, no avail. >> >> >> Thanks, >> >> Andrei > > do you have gcc-multilib and g++multilib? It probably includes some > necessary libraries for 32 bit compilation. Yes to the first. Just installed the second as well. In the meantime I figured I need this: sudo apt-get install libcurl4-openssl-dev:i386 However, when I tried to install it, I got: dpkg: error processing archive /var/cache/apt/archives/libcurl4-openssl-dev_7.37.1-1ubuntu3.4_i386.deb (--unpack): trying to overwrite shared '/usr/bin/curl-config', which is different from other instances of package libcurl4-openssl-dev:i386 Does this mean libcurl cannot have both 32- and 64-bit builds installed on the same machine? Andrei | |||
August 06, 2015 Re: dmd on ubuntu 64: how to unittest phobos with -m32? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On 8/6/15 12:09 PM, Andrei Alexandrescu wrote: > On 8/6/15 10:37 AM, rsw0x wrote: >> On Thursday, 6 August 2015 at 14:18:09 UTC, Andrei Alexandrescu wrote: >>> So I am trying to unittest phobos in its 32-bit build on a Ubuntu64 >>> machine. I installed these additional packages: >>> >>> sudo apt-get install libc6-dev-i386 libcurl3:i386 >>> >>> When I try to unittest a phobos module, e.g.: >>> >>> make -f posix.mak MODEL=32 std/conv.test >>> >>> I get: >>> >>> /usr/bin/ld: cannot find -lcurl >>> >>> What do I need to do to link libcurl/32 properly on my 64-bit >>> platform? I've searched around for a while, no avail. >>> >>> >>> Thanks, >>> >>> Andrei >> >> do you have gcc-multilib and g++multilib? It probably includes some >> necessary libraries for 32 bit compilation. > > Yes to the first. Just installed the second as well. > > In the meantime I figured I need this: > > sudo apt-get install libcurl4-openssl-dev:i386 > > However, when I tried to install it, I got: > > dpkg: error processing archive > /var/cache/apt/archives/libcurl4-openssl-dev_7.37.1-1ubuntu3.4_i386.deb > (--unpack): > trying to overwrite shared '/usr/bin/curl-config', which is different > from other instances of package libcurl4-openssl-dev:i386 > > Does this mean libcurl cannot have both 32- and 64-bit builds installed > on the same machine? Update: I installed libcurl4-gnutls-dev:i386 instead. That seems to not conflict with libcurl4-openssl-dev and did go through. Subsequently things do seem to work. I've updated the intro: http://wiki.dlang.org/Starting_as_a_Contributor#0._Prerequisites Andrei | |||
August 06, 2015 Re: dmd on ubuntu 64: how to unittest phobos with -m32? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Thursday, 6 August 2015 at 16:09:16 UTC, Andrei Alexandrescu wrote:
> On 8/6/15 10:37 AM, rsw0x wrote:
>> On Thursday, 6 August 2015 at 14:18:09 UTC, Andrei Alexandrescu wrote:
>>> [...]
>>
>> do you have gcc-multilib and g++multilib? It probably includes some
>> necessary libraries for 32 bit compilation.
>
> Yes to the first. Just installed the second as well.
>
> In the meantime I figured I need this:
>
> sudo apt-get install libcurl4-openssl-dev:i386
>
> However, when I tried to install it, I got:
>
> dpkg: error processing archive /var/cache/apt/archives/libcurl4-openssl-dev_7.37.1-1ubuntu3.4_i386.deb (--unpack):
> trying to overwrite shared '/usr/bin/curl-config', which is different from other instances of package libcurl4-openssl-dev:i386
>
> Does this mean libcurl cannot have both 32- and 64-bit builds installed on the same machine?
>
>
> Andrei
Sounds weird. Sorry, I don't use ubuntu/debian.
Is your system fully up to date?
| |||
August 07, 2015 Re: dmd on ubuntu 64: how to unittest phobos with -m32? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andrei Alexandrescu | On Thursday, 6 August 2015 at 14:18:09 UTC, Andrei Alexandrescu wrote:
> So I am trying to unittest phobos in its 32-bit build on a Ubuntu64 machine. I installed these additional packages:
>
> sudo apt-get install libc6-dev-i386 libcurl3:i386
>
> When I try to unittest a phobos module, e.g.:
>
> make -f posix.mak MODEL=32 std/conv.test
>
> I get:
>
> /usr/bin/ld: cannot find -lcurl
>
> What do I need to do to link libcurl/32 properly on my 64-bit platform? I've searched around for a while, no avail.
>
>
> Thanks,
>
> Andrei
aptitude install libcurl-dev:i386
You need the 32 bits version of the libs to make that work.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply