Can't get 32 bit packages installed lazarus / 1-Linux ---------------------------------------------------------------------- geraldholdsworth · 2021-01-06 11:19 Hi all, First of all, I know pretty much nothing about Linux and have only recently begun to use it. Even then, I mostly use it for compiling my project for Linux (I mainly use macOS and Windows). So, I've installed Linux Mint Cinnamon (version 20) 64 bit on Oracle VirtualBox on my Mac (host OS is High Sierra), and installed Lazarus 2.0.10 64 bit (plus the appropriate FPC packages...3.2.0, I think). On my three Lazarus installs (the host OS, macOS, another VB install, Windows, and Linux) I'm trying to cross compile so I get 64 bit and 32 bit binaries of my project, on all three platforms. OK for macOS and Windows, but not for Linux. I've followed the guide here but whenever I try (under Project options, Config and Target, Target OS: Linux, Target CPU: i386, eveything else left default for Release) it complains 'Compiler "/usr/bin/fpc" does not support target i386-linux'. I have managed to find out how to be in Terminal as root, but that still didn't help. Thanks in advance, Gerald. ---------------------------------------------------------------------- dbannon · 2021-01-06 12:21 Please type the following command to see if you have whats needed - which ppcross386 which i386-linux-ld which i386-linux-as The first one is the actual compiler, fpc is just a command that chooses the right compiler for the job you are doing.  If ppcross32 is not found, then we need to see which step in those instructions has gone wrong. D ---------------------------------------------------------------------- geraldholdsworth · 2021-01-06 13:09 Hi, The first command returns nothing, while the second two return: /usr/bin/i386-linux-ld and /usr/bin/i386-linux-as I actually had to manually create those two as the commands given did not do it for me automatically. Cheers, Gerald. ---------------------------------------------------------------------- lucamar · 2021-01-06 14:05 Quote from: geraldholdsworth on January 06, 2021, 02:09:46 pmI actually had to manually create those two as the commands given did not do it for me automatically. You shouldn't have to manually create anything: if which gives you nothing it means that it's not there, as it does here (since I don't have 32bit binutils here). You can make double sure by trying to find any as (or ld) in your computer with:Code: [Select]find / -iname "*-as" 2> /dev/nullMake sure to redirect errors, since there will be quite a lot of them due to unreachable directories (unless you're root, o.c.) In my case that outputs (logically enough):Code: [Select]/usr/bin/x86_64-linux-gnu-as ---------------------------------------------------------------------- geraldholdsworth · 2021-01-06 16:31 I get: Code: [Select]/usr/bin/x86_64-linux-gnu-as /usr/bin/i386-linux-as ---------------------------------------------------------------------- Martin_fr · 2021-01-06 17:02 Quote from: geraldholdsworth on January 06, 2021, 12:19:19 pmFirst of all, I know pretty much nothing about Linux and have only recently begun to use it. Even then, I mostly use it for compiling my project for Linux (I mainly use macOS and Windows). You are coming from Mac. On Mac (afaik) fpc is by default installed in such a way that it can build 64 and 32 bit binaries. On the other Platforms this in not the case. That gives 2 options. - You have 2 independent fpc installs (rather tricky on linux). - You use a cross compiler On Windows there are installers for cross compilers. Once the cross compiler is installed you can change the "target" settings for the project. If you use 2 independent fpc then you need to change compiler in Tools >Options. I am not sure, if there is an installer for a cross compiler on linux. If there is => good. If not... You could install an independent 32 bit fpc, but then the 2 fpc will have a fight for /etc/fpc.cfg That can be solved, but needs a bit of knowlegde. You can build a cross compiler yourself. You can try fpcupdeluxe (I have not used it myself, but many people seem to think it is really good). ---------------------------------------------------------------------- MarkMLl · 2021-01-06 17:03 Quote from: geraldholdsworth on January 06, 2021, 02:09:46 pmThe first command returns nothing, while the second two return: /usr/bin/i386-linux-ld and /usr/bin/i386-linux-as I actually had to manually create those two as the commands given did not do it for me automatically. Create them /how/ exactly? You've not done something terminally lackwitted like symlinking a 64-bit to a 32-bit assembler have you? MarkMLl ---------------------------------------------------------------------- geraldholdsworth · 2021-01-06 18:21 Quote from: MarkMLl on January 06, 2021, 06:03:33 pmCreate them /how/ exactly? You've not done something terminally lackwitted like symlinking a 64-bit to a 32-bit assembler have you?I created them in the text editor, exactly as they are shown on the page, then saved them to the location specified. ---------------------------------------------------------------------- lucamar · 2021-01-06 20:20 Quote from: geraldholdsworth on January 06, 2021, 05:31:47 pmI get: Code: [Select]/usr/bin/x86_64-linux-gnu-as /usr/bin/i386-linux-as Try this:Code: [Select]ls -l /usr/bin/i386-linux-asif it tells you something like: Code: [Select]lrwxrwxrwx 1 root root 19 jun 18  2020 /usr/bin/i386-linux-as -> x86_64-linux-gnu-asthen you did what Mark so delicately termed "something terminally lackwitted" ... though I don't think that's the case here If what you did was to create create both scripts (as the wiki says to do) then tryCode: [Select]as --target-helpand see if the option --32 is supported (you might have to scroll up the view a little: there are quite some target-specific options: Shift+PgUp is your friend for that) Conversely, for ld try:Code: [Select]ld -VIt should give something like:Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $ ld -VGNU ld (GNU Binutils for Ubuntu) 2.30  Emulaciones admitidas:   elf_x86_64   elf32_x86_64   elf_i386   elf_iamcu   i386linux   elf_l1om   elf_k1om   i386pep   i386peAll those lines with "i386" mean that ld is capable of generating 32bit targets (o.c. if it finds 32bit static libs and objects). ---------------------------------------------------------------------- MarkMLl · 2021-01-06 20:40 Quote from: lucamar on January 06, 2021, 09:20:13 pm...what Mark so delicately termed "something terminally lackwitted" ... though I don't think that's the case here I was certainly /hoping/ it wasn't the case, but it appeared to be a possibility that nobody'd considered in earlier messages. And, of course, is the sort of trap that probably all of us here fell into when Linux (and unix in general) was much less mature, and Google wasn't ready with faux-documentation. MarkMLl ---------------------------------------------------------------------- geraldholdsworth · 2021-01-06 22:29 Quote from: lucamar on January 06, 2021, 09:20:13 pmTry this:Code: [Select]ls -l /usr/bin/i386-linux-asif it tells you something like: Code: [Select]lrwxrwxrwx 1 root root 19 jun 18  2020 /usr/bin/i386-linux-as -> x86_64-linux-gnu-asI get: Code: [Select]-rwxrwxrwx 1 root root 23 Jan  2 18:54 /usr/bin/i386-linux-asSo it does look like I've done what Mark had suggested. Quote from: lucamar on January 06, 2021, 09:20:13 pmCode: [Select]as --target-helpreturns: Code: [Select]  -Qy, -Qn                ignored   -V                      print assembler version number   -k                      ignored   -n                      Do not optimise code alignment   -q                      quieten some warnings   -s ignored   --32/--64/--x32         generate 32bit/64bit/x32 code   --divide ignored   -march=CPU[,+EXTENSION...]                           generate code for CPU and EXTENSION, CPU is one of:                            generic32, generic64, i386, i486, i586, i686,                            pentium, pentiumpro, pentiumii, pentiumiii, pentium4,                            prescott, nocona, core, core2, corei7, l1om, k1om,                            iamcu, k6, k6_2, athlon, opteron, k8, amdfam10,                            bdver1, bdver2, bdver3, bdver4, znver1, znver2,                            btver1, btver2                           EXTENSION is combination of:                            8087, 287, 387, 687, cmov, fxsr, mmx, sse, sse2,                            sse3, ssse3, sse4.1, sse4.2, sse4, avx, avx2,                            avx512f, avx512cd, avx512er, avx512pf, avx512dq,                            avx512bw, avx512vl, vmx, vmfunc, smx, xsave,                            xsaveopt, xsavec, xsaves, aes, pclmul, fsgsbase,                            rdrnd, f16c, bmi2, fma, fma4, xop, lwp, movbe, cx16,                            ept, lzcnt, hle, rtm, invpcid, clflush, nop, syscall,                            rdtscp, 3dnow, 3dnowa, padlock, svme, sse4a, abm,                            bmi, tbm, adx, rdseed, prfchw, smap, mpx, sha,                            clflushopt, prefetchwt1, se1, clwb, avx512ifma,                            avx512vbmi, avx512_4fmaps, avx512_4vnniw,                            avx512_vpopcntdq, avx512_vbmi2, avx512_vnni,                            avx512_bitalg, clzero, mwaitx, ospke, rdpid, ptwrite,                            ibt, shstk, gfni, vaes, vpclmulqdq, wbnoinvd,                            pconfig, waitpkg, cldemote, movdiri, movdir64b,                            avx512_bf16, avx512_vp2intersect, enqcmd, rdpru,                            mcommit, no87, no287, no387, no687, nocmov, nofxsr,                            nommx, nosse, nosse2, nosse3, nossse3, nosse4.1,                            nosse4.2, nosse4, noavx, noavx2, noavx512f,                            noavx512cd, noavx512er, noavx512pf, noavx512dq,                            noavx512bw, noavx512vl, noavx512ifma, noavx512vbmi,                            noavx512_4fmaps, noavx512_4vnniw, noavx512_vpopcntdq,                            noavx512_vbmi2, noavx512_vnni, noavx512_bitalg,                            noibt, noshstk, nomovdiri, nomovdir64b,                            noavx512_bf16, noavx512_vp2intersect, noenqcmd   -mtune=CPU              optimise for CPU, CPU is one of:                            generic32, generic64, i8086, i186, i286, i386, i486,                            i586, i686, pentium, pentiumpro, pentiumii,                            pentiumiii, pentium4, prescott, nocona, core, core2,                            corei7, l1om, k1om, iamcu, k6, k6_2, athlon, opteron,                            k8, amdfam10, bdver1, bdver2, bdver3, bdver4, znver1,                            znver2, btver1, btver2   -msse2avx               encode SSE instructions with VEX prefix   -msse-check=[none|error|warning] (default: warning)                           check SSE instructions   -moperand-check=[none|error|warning] (default: warning)                           check operand combinations for validity   -mavxscalar=[128|256] (default: 128)                           encode scalar AVX instructions with specific vector                            length   -mvexwig=[0|1] (default: 0)                           encode VEX instructions with specific VEX.W value                            for VEX.W bit ignored instructions   -mevexlig=[128|256|512] (default: 128)                           encode scalar EVEX instructions with specific vector                            length   -mevexwig=[0|1] (default: 0)                           encode EVEX instructions with specific EVEX.W value                            for EVEX.W bit ignored instructions   -mevexrcig=[rne|rd|ru|rz] (default: rne)                           encode EVEX instructions with specific EVEX.RC value                            for SAE-only ignored instructions   -mmnemonic=[att|intel] (default: att)                           use AT&T/Intel mnemonic   -msyntax=[att|intel] (default: att)                           use AT&T/Intel syntax   -mindex-reg             support pseudo index registers   -mnaked-reg             don't require `%' prefix for registers   -madd-bnd-prefix        add BND prefix for all valid branches   -mshared                disable branch optimisation for shared code   -mx86-used-note=[no|yes] (default: no)                           generate x86 used ISA and feature properties   -momit-lock-prefix=[no|yes] (default: no)                           strip all lock prefixes   -mfence-as-lock-add=[no|yes] (default: no)                           encode lfence, mfence and sfence as                            lock addl $0x0, (%{re}sp)   -mrelax-relocations=[no|yes] (default: yes)                           generate relax relocations   -malign-branch-boundary=NUM (default: 0)                           align branches within NUM byte boundary   -malign-branch=TYPE[+TYPE...] (default: jcc+fused+jmp)                           TYPE is combination of jcc, fused, jmp, call, ret,                            indirect                           specify types of branches to align   -malign-branch-prefix-size=NUM (default: 5)                           align branches with NUM prefixes per instruction   -mbranches-within-32B-boundaries                           align branches within 32 byte boundary   -mamd64                 accept only AMD64 ISA [default]   -mintel64               accept only Intel64 ISAQuote from: lucamar on January 06, 2021, 09:20:13 pmCode: [Select]ld -Vgives: Code: [Select]  Supported emulations:    elf_x86_64    elf32_x86_64    elf_i386    elf_iamcu    elf_l1om    elf_k1om    i386pep    i386pe ---------------------------------------------------------------------- dbannon · 2021-01-06 22:38 Hi geraldholdsworth, welcome back ! That looks pretty much as I expected, no reason to think you have made a syn link.  I should have asked you to cat out those two files just to be sure. An apparently insignificant error can be quite important. ls   -l  /usr/bin/i386-linux-* cat /usr/bin/i386-linux-as cat /usr/bin/i386-linux-ld Assuming they are OK, then I think you need to try rebuilding the compiler and then retry installing it. You will need to watch very carefull for error messages, you do see a lot of lines that are not all that bad but look pretty much the same as an error, especially to an inexperienced eye. Sad but true. But lets see content of those two files first. Davo ---------------------------------------------------------------------- lucamar · 2021-01-07 03:45 Quote from: geraldholdsworth on January 06, 2021, 11:29:13 pmSo it does look like I've done what Mark had suggested. No, no, look the crucial difference: in my example ls lists a symlink from one file to the other (note the "->") while yours lists a normal executable script, as was expected, and all the rest is OK Follow Davo's (dbannon's) instructions above and let's hope it now works. ---------------------------------------------------------------------- geraldholdsworth · 2021-01-07 08:37 Quote from: dbannon on January 06, 2021, 11:38:40 pmHi geraldholdsworth, welcome back ! Hi Davo, Results are: Quote from: dbannon on January 06, 2021, 11:38:40 pmls   -l  /usr/bin/i386-linux-* Code: [Select]-rwxrwxrwx 1 root root 23 Jan  2 18:54 /usr/bin/i386-linux-as -rwxrwxrwx 1 root root 32 Jan  2 18:54 /usr/bin/i386-linux-ldQuote from: dbannon on January 06, 2021, 11:38:40 pmcat /usr/bin/i386-linux- as Code: [Select]#!/bin/bash as --32 $@Quote from: dbannon on January 06, 2021, 11:38:40 pmcat /usr/bin/i386-linux-ld Code: [Select]#!/bin/bash ld -A elf32-i386 $@ I have thought about doing a complete uninstall and reinstall. I originally installed all three DEB packages found on the downloads section. Cheers, Gerald. ---------------------------------------------------------------------- dbannon · 2021-01-07 11:02 No mate, a full reinstall will probably give exactly the same issue. Now, those two little file have both correct permissions and content. I need you to re run the command to build the 32bit compiler -  Now, here I assume you have fpc installed from debs (downloaded from the Lazarus site) ? and I'm guessing that its fpc320, I am unsure of exactly the name of the dir in /usr/share/fpcsrc  so you will need to look before using in place of Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $ cd /usr/share/fpcsrc/$ sudo make clean all CPU_TARGET=i386 Thats should make the compiler for us, it will take a few seconds to minutes depending on your system. Stop now and have a look at the text dumped on the screen, anything look like an error ?  if not, the next one Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  $ sudo make crossinstall CPU_TARGET=i386 INSTALL_PREFIX=/usr After that, you should be able to see /usr/bin/ppcross386  Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ls -la /usr/bin/ppcross386 It might be a symlink. If its not there, scroll back and really check over those lines of text, there must be an indication of what went wrong in there.  Maybe take a scrape and post it here ? Anyway, we will get there ! Davo ---------------------------------------------------------------------- geraldholdsworth · 2021-01-07 13:07 Because of the length of the output, I've attached it as a text file. I can't see any Errors, but there are 344 warnings. But these don't look too troublesome. On doing the ls -la /usr/bin/ppcross386 command I was told that the folder does not exist (it's in the log), so I went to Finder and created the folder. I now get a couple of different errors when trying to switch to 32 bit: Code: [Select]The current FPC has no config file. It will probably miss some units. Check your installation of fpc.and then Code: [Select]The project uses target OS=linux and CPU=i386. The system.ppu for this project was not found in the FPC binary directories. Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories. And, yes, you are correct - I used 3.2.0 of the FPC. In fact, the three DEB files I have are: fpc-laz_3.2.0-1_amd64.deb fpc-src_3.2.0-1_amd64.deb lazarus-project_2.0.10-0_amd64.deb They were actually downloaded through Safari on the Mac, but I can't see that making any difference. Cheers, Gerald. ---------------------------------------------------------------------- geraldholdsworth · 2021-01-07 16:20 I've done a bit more investigating...haven't got anywhere, but I've got some info that might help - or might be irrelevant. First, I did a search for system.ppu and found it in: /usr/lib/fpc/3.2.0/units/i386-linux/rtl /usr/lib/fpc/3.2.0/units/x86_64-linux/rtl /usr/local/lib/fpc/3.2.0/units/i386-linux/rtl /usr/share/fpcsrc/3.2.0/rtl/units/i386-linux /usr/share/fpcsrc/3.2.0/rtl/units/x86_64-linux I also went back to the instructions. Right at the start it mentions editing the fpc.cfg file, but also mentions to check that the files are in there - screen shot attached. I've also attached the fpc.cfg file. Again, probably irrelevant. Cheers, Gerald. ---------------------------------------------------------------------- dbannon · 2021-01-08 00:35 OK, about your note that the folder does not exist and you created it ? Do you mean the message Cannot access '/usr/bin/ppcross386': No such file or directory ?  I believe that message is telling you that the file (binary or symlink) ppcross386 does not exist. But if you then had to create /usr/bin its a whole new ball game !  Linux mint ?  Based on Debian ?  I believe you should already have a /usr/bin and it should already have a heap of binaries in it.  If now, then your main bin dir is /usr/local/bin  We can easily check, please type echo $PATH and send the output. Or look in /usr/bin and see if there are lots of files there that are dated before you ran the install. If your system does not use /usr/bin then the install command should have been - Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $ sudo make crossinstall CPU_TARGET=i386 Now, continuing on incase the above is a non issue - Everything seems to work fine, its just that you don't end up with ppcross386 in your /usr/bin directory.  I am petty sure that it should be a symlink but not certain (I install mine a bit differently). I see clearly where ppcross386 is built, its in /usr/share/fpcsrc/3.2.0/compiler/ppcross386 It gets 'installed' to /usr/lib/fpc/3.2.0/ppcross386 (which is a strange FPC-ism, we should not have executables under /usr/lib but thats what they do!) Can you please check to see if those files are there ? If so, lets cheat a bit and see if you can create the necessary symlink ? Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo ln -s  /usr/lib/fpc/3.2.0/ppcross386    /usr/bin/ppcross386 Another issue is the fashionable alternative directory, please run this command - Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ls -l /etc/alternatives/pp* Its a means of easily swapping which versions of things you use. You should see a symlink to our ppcross386 there too, interesting to see where it points. Sorry this is becoming such a epic task, it really should not be !  It will be usefull to see why its such a problem for you and correct the wiki .... Davo some notes as I look through your log - Interesting stuff starts at #813, ppcross386 seems to be built without issues. Install starts at #2909 #2924 copies /usr/share/fpcsrc/3.2.0/compiler/ppcross386 to /usr/lib/fpc/3.2.0/ppcross386 ---------------------------------------------------------------------- geraldholdsworth · 2021-01-08 08:37 Quote from: dbannon on January 08, 2021, 01:35:36 amOK, about your note that the folder does not exist and you created it ? The folder 'ppcross386' did not exist, so I created it. I've removed it now. Quote from: dbannon on January 08, 2021, 01:35:36 amIf now, then your main bin dir is /usr/local/bin  We can easily check, please type echo $PATH and send the output. Or look in /usr/bin and see if there are lots of files there that are dated before you ran the install. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i gerald@gerald-VirtualBox:~$ echo $PATH/usr/local/sbin:/usr/local/bin:/ usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/binTher e were loads of files dated before I installed Lazarus. The two I created where the newest, while the rest appeared to be dated before I installed Linux. Quote from: dbannon on January 08, 2021, 01:35:36 amCode: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $ sudo make crossinstall CPU_TARGET=i386Failed with 'No rule to make target crossinstall'. Quote from: dbannon on January 08, 2021, 01:35:36 amIt gets 'installed' to /usr/lib/fpc/3.2.0/ppcross386 (which is a strange FPC-ism, we should not have executables under /usr/lib but thats what they do!) Can you please check to see if those files are there ? Yep, there are there. Quote from: dbannon on January 08, 2021, 01:35:36 amIf so, lets cheat a bit and see if you can create the necessary symlink ? Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo ln -s  /usr/lib/fpc/3.2.0/ppcross386    /usr/bin/ppcross386Ran, no problems and no output. Quote from: dbannon on January 08, 2021, 01:35:36 amAnother issue is the fashionable alternative directory, please run this command - Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ls -l /etc/alternatives/pp* Its a means of easily swapping which versions of things you use. You should see a symlink to our ppcross386 there too, interesting to see where it points. Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ls: cannot access '/etc/alternatives/pp*': No such file or directoryThe /etc/alternatives/ folder is there, just nothing starting with pp inside. Quote from: dbannon on January 08, 2021, 01:35:36 amSorry this is becoming such a epic task, it really should not be !  It will be usefull to see why its such a problem for you and correct the wiki .... Needs be. If I have problems, someone else also might. After doing the above, I tried cross compiling in Lazarus again and it worked. If there's any more tests you'd like me to run, I'm happy to do so. Many thanks, Gerald. ---------------------------------------------------------------------- dbannon · 2021-01-08 09:17 OK, so it worked because you created an appropriate symlink with the - Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo ln -s  /usr/lib/fpc/3.2.0/ppcross386    /usr/bin/ppcross386 command.  That should have happened during the install phase, I cannot see why it did not.  If you now run ls -la /usr/bin/ppc* you will see it there. I guess I will build a Mint VM and see if I can replicate this issue. In the mean time, use it by all means if its working but do keep in mind that 'something' went wrong during the initial install. Davo ---------------------------------------------------------------------- MarkMLl · 2021-01-08 09:25 Well done Gerald, and thanks for keeping people updated with your conclusions. MarkMLl ---------------------------------------------------------------------- geraldholdsworth · 2021-01-08 12:53 Quote from: dbannon on January 08, 2021, 10:17:47 am I guess I will build a Mint VM and see if I can replicate this issue. In the mean time, use it by all means if its working but do keep in mind that 'something' went wrong during the initial install.Thank you for all your help Davo. I'll probably also try and replicate this on another machine - I've got a laptop I installed Mint on, and have installed Lazarus but hardly used it, so I'll see if it does the same thing. Cheers, Gerald. ---------------------------------------------------------------------- geraldholdsworth · 2021-01-17 13:55 Just as a 'FYI'...I fired up my Linux laptop, which had a fresh, hardly used, install of Lazarus 64 bit on it and tried installing the same cross compiler with the same result. I did note that it produced a couple of errors after the first command, which I typed in what it suggested (which didn't work). Anyway, I pressed on and found, as before, that Lazarus wouldn't compile in 32 bit mode. So I ran the extra line Davo suggested and it now works. I've attached the logs, for information. Cheers, Gerald. ---------------------------------------------------------------------- MarkMLl · 2021-01-17 14:03 So for completeness, what fp* and ppc* files do you have in your /usr/bin and /usr/local/bin directories and what is your PATH? I suggest appending the output of Code: [Select]ls -l /usr/bin/fp* ls -l /usr/bin/ppc* ls -l /usr/local/bin/fp* ls -l /usr/local/bin/ppc* echo $PATH MarkMLl ---------------------------------------------------------------------- geraldholdsworth · 2021-01-17 17:36 I get: Code: Bash  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i gerald@Laptop2:~$ ls -l /usr/bin/fp*-rwxr-xr-x 1 root root 4771200 Jul  7  2020 /usr/bin/fp-rw-r--r-- 1 root root    4515 May 16  2005 /usr/bin/fp.ans-rwxr-xr-x 1 root root  508112 Jul  7  2020 /usr/bin/fpc-rwxr-xr-x 1 root root 1061488 Jul  7  2020 /usr/bin/fpcjres-rwxr-xr-x 1 root root 1436032 Jul  7  2020 /usr/bin/fpclasschart-rwxr-xr-x 1 root root 1010928 Jul  7  2020 /usr/bin/fpcmake-rwxr-xr-x 1 root root 1269456 Jul  7  2020 /usr/bin/fpcmkcfg-rwxr-xr-x 1 root root 1062272 Jul  7  2020 /usr/bin/fpcres-rwxr-xr-x 1 root root  855552 Jul  7  2020 /usr/bin/fpcsubst-rwxr-xr-x 1 root root 2570080 Jul  7  2020 /usr/bin/fpdoc-rwxr-xr-x 1 root root 2414864 Jul  7  2020 /usr/bin/fppkg-rwxr-xr-x 1 root root  873472 Jul  7  2020 /usr/bin/fprcp-rwxr-xr-x 1 root root   14640 Apr 16  2020 /usr/bin/fprintd-delete-rwxr-xr-x 1 root root   23408 Apr 16  2020 /usr/bin/fprintd-enroll-rwxr-xr-x 1 root root   14640 Apr 16  2020 /usr/bin/fprintd-list-rwxr-xr-x 1 root root   14720 Apr 16  2020 /usr/bin/fprintd-verifygerald@Laptop2:~$ ls -l /usr/bin/ppc*lrwxrwxrwx 1 root root 29 Jan 17 11:15 /usr/bin/ppcross386 -> /usr/lib/fpc/3.2.0/ppcross386lrwxrwxrwx 1 root root 25 Dec 10 15:45 /usr/bin/ppcx64 -> /usr/lib/fpc/3.2.0/ppcx64gerald@Laptop2:~$ ls -l /usr/local/bin/fp*-rw-r--r-- 1 root root 4515 May 16  2005 /usr/local/bin/fp.ansgerald@Laptop2:~$ ls -l /usr/local/bin/ppc*ls: cannot access '/usr/local/bin/ppc*': No such file or directorygerald@Laptop2:~$ echo $PATH/usr/local/sbin:/usr/local/bin:/u sr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin ---------------------------------------------------------------------- geraldholdsworth · 2022-02-20 19:06 OK, back to square one, almost, again. Having upgraded to Lazarus 2.2, and I can no longer cross compile to Linux 32 bit again. So, I followed the Wiki again, which improved matters, but I still get the error (on compilation): lclproc.pas(29,35) Fatal: Cannot find Laz_AVL_Tree used by LCLProc, incompatible ppu=/home/gerald/.lazarus/lib/LazUtils/lib/i386- linux/laz_avl_tree.ppu, package LazUtils