Installing 32-bit Lazarus on a 64-bit Linux lazarus / 1-Linux ---------------------------------------------------------------------- fedkad · 2019-04-17 10:28 I am running Ubuntu 18.10 (64-bit). For some reason, I want to create 32-bit Linux executables. So, I tried to install 32-bit Lazarus on this 64-bit Linux machine. I downloaded the following: fpc-laz_3.0.4-1_i386.deb          23158450 fpc-src_3.0.4-1_i386.deb          23541216 lazarus-project_2.0.2-0_i386.deb  110352126 While trying to install fpc-laz_3.0.4-1_i386.deb, I get the following error: # dpkg -i fpc-laz_3.0.4-1_i386.deb dpkg: regarding fpc-laz_3.0.4-1_i386.deb containing fpc-laz:i386, pre- dependency problem:  fpc-laz:i386 pre-depends on binutils   binutils is not installed. binutils is installed in the system; however, I think it needs 32-bit binutils. But, there is no 32-bit binutils installation candidate in Ubuntu repository. ---------------------------------------------------------------------- Thaddy · 2019-04-17 10:34 You need to install multi-arch if you want to run 32 bit on 64 bit linux, ---------------------------------------------------------------------- Handoko · 2019-04-17 10:45 @fedkad I checked my Ubuntu Mate 64-bit using Synaptic Package Manager. I saw I have binutils-common:i386 and binutils-i686-linux-gnu installed. Those packages are provided by Ubuntu because we can see the icon on the right of the names. ---------------------------------------------------------------------- fedkad · 2019-04-17 11:20 Quote from: Handoko on April 17, 2019, 12:45:24 pm@fedkad I checked my Ubuntu Mate 64-bit using Synaptic Package Manager. I saw I have binutils-common:i386 and binutils-i686-linux-gnu installed. Those packages are provided by Ubuntu because we can see the icon on the right of the names. I tried to install binutils:i386. But, while doing this, the system tried to uninstall the 64-bit version of binutils and eventually the 64-bit gcc environment, up to the point that ubuntu-desktop was no longer working. I had to reinstall them back, which forced a removal of 32-bit binutils. So, it seems to me, that it is not possible to install 32-bit Lazarus on a 64-bit Linux. (This was not the case with Windows though, were I could install 32-bit Lazarus on a 64-bit Windows.) Quote from: Thaddy on April 17, 2019, 12:34:14 pmYou need to install multi-arch if you want to run 32 bit on 64 bit linux, I will try to go this path. Some pointers will be highly appreciated. Thanks. ---------------------------------------------------------------------- Handoko · 2019-04-17 11:30 Sorry, that caused trouble to you. I've just checked my system, it has these installed: - binutils - binutils-common - binutils-common:i386 - binutils-i686-linux-gnu - binutils-x86-64-linux-gnu - libbinutils - libbinutils:386 It seems I have both 32 and 64 bit of binutils installed on the same machine and it is working good. I don't know why. Need someone more experience in Linux. ---------------------------------------------------------------------- Handoko · 2019-04-17 11:33 I checked it again, I saw it has multiarch-support installed. ---------------------------------------------------------------------- fedkad · 2019-04-17 11:37 Quote from: Handoko on April 17, 2019, 01:30:24 pmSorry, that caused trouble to you. No problem. I am just testing!  This is the output I get while trying to install binutils:i386: root@fedubu:~# apt install  binutils:i386 Reading package lists... Done Building dependency tree      Reading state information... Done The following packages were automatically installed and are no longer required:   binutils-x86-64-linux-gnu libasan5 libatomic1 libbinutils libc-dev- bin libc6-dev libgcc-8-dev libitm1 liblsan0 libmpx2   libquadmath0 libtsan0 libubsan1 manpages-dev Use 'apt autoremove' to remove them. The following additional packages will be installed:   binutils-i686-linux-gnu libbinutils:i386 Suggested packages:   binutils-doc:i386 binutils-doc The following packages will be REMOVED:   binutils gcc gcc-8 The following NEW packages will be installed:   binutils:i386 binutils-i686-linux-gnu libbinutils:i386 0 upgraded, 3 newly installed, 3 to remove and 0 not upgraded. Need to get 2,793 kB of archives. After this operation, 11.3 MB disk space will be freed. Do you want to continue? [Y/n] ---------------------------------------------------------------------- avra · 2019-04-17 11:39 Quote from: fedkad on April 17, 2019, 12:28:54 pmI want to create 32-bit Linux executables.Have you tried cross compilation? Easiest done via fpcupdeluxe. ---------------------------------------------------------------------- fedkad · 2019-04-17 11:41 Quote from: Handoko on April 17, 2019, 01:33:34 pmI checked it again, I saw it has multiarch-support installed. Even after installing binutils-multiarch*, I still get a similar output: root@fedubu:~# apt install  binutils:i386 Reading package lists... Done Building dependency tree      Reading state information... Done The following packages were automatically installed and are no longer required:   binutils-x86-64-linux-gnu libasan5 libatomic1 libbinutils libc-dev- bin libc6-dev libgcc-8-dev libitm1 liblsan0 libmpx2   libquadmath0 libtsan0 libubsan1 manpages-dev Use 'apt autoremove' to remove them. The following additional packages will be installed:   binutils-i686-linux-gnu libbinutils:i386 Suggested packages:   binutils-doc:i386 binutils-doc The following packages will be REMOVED:   binutils binutils-dev binutils-multiarch binutils-multiarch-dbg binutils-multiarch-dev gcc gcc-8 The following NEW packages will be installed:   binutils:i386 binutils-i686-linux-gnu libbinutils:i386 0 upgraded, 3 newly installed, 7 to remove and 0 not upgraded. Need to get 2,793 kB of archives. After this operation, 49.8 MB disk space will be freed. Do you want to continue? [Y/n] ---------------------------------------------------------------------- lucamar · 2019-04-17 12:11 Quote from: fedkad on April 17, 2019, 01:41:08 pmQuote from: Handoko on April 17, 2019, 01:33:34 pmI checked it again, I saw it has multiarch-support installed. Even after installing binutils-multiarch*, I still get a similar output: Not just binutils-multiarch: you must install the package multiarch- support. It should be pulled automatically but apparently it isn't. Note: The image is from Ubuntu 12.04; you should have a more modern version ---------------------------------------------------------------------- fedkad · 2019-04-17 12:14 QuoteNot just binutils-multiarch: you must install the package multiarch-support. It should be pulled automatically but apparently it isn't. I already had: root@fedubu:~# apt install multiarch-support Reading package lists... Done Building dependency tree      Reading state information... Done multiarch-support is already the newest version (2.28-0ubuntu1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.