Recent

Author Topic: Installing 32-bit Lazarus on a 64-bit Linux  (Read 3213 times)

fedkad

  • Full Member
  • ***
  • Posts: 176
Installing 32-bit Lazarus on a 64-bit Linux
« on: April 17, 2019, 12:28:54 pm »
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.

 :(
Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

Thaddy

  • Hero Member
  • *****
  • Posts: 14364
  • Sensorship about opinions does not belong here.
Re: Installing 32-bit Lazarus on a 64-bit Linux
« Reply #1 on: April 17, 2019, 12:34:14 pm »
You need to install multi-arch if you want to run 32 bit on 64 bit linux,
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

Handoko

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
Re: Installing 32-bit Lazarus on a 64-bit Linux
« Reply #2 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.
« Last Edit: April 17, 2019, 12:48:02 pm by Handoko »

fedkad

  • Full Member
  • ***
  • Posts: 176
Re: Installing 32-bit Lazarus on a 64-bit Linux
« Reply #3 on: April 17, 2019, 01:20:50 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.)

You 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.
Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

Handoko

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
Re: Installing 32-bit Lazarus on a 64-bit Linux
« Reply #4 on: April 17, 2019, 01:30:24 pm »
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

  • Hero Member
  • *****
  • Posts: 5150
  • My goal: build my own game engine using Lazarus
Re: Installing 32-bit Lazarus on a 64-bit Linux
« Reply #5 on: April 17, 2019, 01:33:34 pm »
I checked it again, I saw it has multiarch-support installed.

fedkad

  • Full Member
  • ***
  • Posts: 176
Re: Installing 32-bit Lazarus on a 64-bit Linux
« Reply #6 on: April 17, 2019, 01:37:14 pm »
Sorry, 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]


« Last Edit: April 17, 2019, 01:41:37 pm by fedkad »
Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Installing 32-bit Lazarus on a 64-bit Linux
« Reply #7 on: April 17, 2019, 01:39:29 pm »
I want to create 32-bit Linux executables.
Have you tried cross compilation? Easiest done via fpcupdeluxe.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

fedkad

  • Full Member
  • ***
  • Posts: 176
Re: Installing 32-bit Lazarus on a 64-bit Linux
« Reply #8 on: April 17, 2019, 01:41:08 pm »
I 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]
Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Installing 32-bit Lazarus on a 64-bit Linux
« Reply #9 on: April 17, 2019, 02:11:20 pm »
I 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 :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

fedkad

  • Full Member
  • ***
  • Posts: 176
Re: Installing 32-bit Lazarus on a 64-bit Linux
« Reply #10 on: April 17, 2019, 02:14:19 pm »
Quote
Not 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.

Lazarus 2.2.6 / FPC 3.2.2 on x86_64-linux-gtk2 (Ubuntu/GNOME) and x86_64-win64-win32/win64 (Windows 11)

 

TinyPortal © 2005-2018