digitalmars.D - dmd on ubuntu 64: how to unittest phobos with -m32?
- Andrei Alexandrescu (11/11) Aug 06 2015 So I am trying to unittest phobos in its 32-bit build on a Ubuntu64
- Jacob Carlborg (9/18) Aug 06 2015 Is the path were the 32bit libraries are installed in the standard
- Andrei Alexandrescu (16/38) Aug 06 2015 I've added -L-L/usr/lib/i386-linux-gnu, where the 32-bit libs are on
- rsw0x (4/15) Aug 06 2015 do you have gcc-multilib and g++multilib? It probably includes
- Andrei Alexandrescu (13/36) Aug 06 2015 Yes to the first. Just installed the second as well.
- Andrei Alexandrescu (6/42) Aug 06 2015 Update: I installed libcurl4-gnutls-dev:i386 instead. That seems to not
- rsw0x (4/24) Aug 06 2015 Sounds weird. Sorry, I don't use ubuntu/debian.
- deadalnix (4/15) Aug 06 2015 aptitude install libcurl-dev:i386
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
Aug 06 2015
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
Aug 06 2015
On 8/6/15 10:30 AM, Jacob Carlborg wrote:On 06/08/15 16:18, Andrei Alexandrescu wrote: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?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.gcc-multilib was already installed, and: E: Package 'ia32-libs' has no installation candidate Thanks, Andrei
Aug 06 2015
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, Andreido you have gcc-multilib and g++multilib? It probably includes some necessary libraries for 32 bit compilation.
Aug 06 2015
On 8/6/15 10:37 AM, rsw0x wrote:On Thursday, 6 August 2015 at 14:18:09 UTC, Andrei Alexandrescu wrote: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? AndreiSo 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, Andreido you have gcc-multilib and g++multilib? It probably includes some necessary libraries for 32 bit compilation.
Aug 06 2015
On 8/6/15 12:09 PM, Andrei Alexandrescu wrote:On 8/6/15 10:37 AM, rsw0x wrote: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: AndreiOn Thursday, 6 August 2015 at 14:18:09 UTC, Andrei Alexandrescu wrote: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?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, Andreido you have gcc-multilib and g++multilib? It probably includes some necessary libraries for 32 bit compilation.
Aug 06 2015
On Thursday, 6 August 2015 at 16:09:16 UTC, Andrei Alexandrescu wrote:On 8/6/15 10:37 AM, rsw0x wrote:Sounds weird. Sorry, I don't use ubuntu/debian. Is your system fully up to date?On Thursday, 6 August 2015 at 14:18:09 UTC, Andrei Alexandrescu wrote: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[...]do you have gcc-multilib and g++multilib? It probably includes some necessary libraries for 32 bit compilation.
Aug 06 2015
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, Andreiaptitude install libcurl-dev:i386 You need the 32 bits version of the libs to make that work.
Aug 06 2015