* * *

Author Topic: Cross compiling Linux 64 bit to 32 bit.  (Read 6953 times)

chrnobel

  • Full Member
  • ***
  • Posts: 217
Re: Cross compiling Linux 64 bit to 32 bit.
« Reply #15 on: April 10, 2015, 06:43:43 pm »
Guess I've met this bug before. Oh, well, as a fpc trunk user, I never remember when bugs are found and fixed (except those I report myself). Compile now, it bugs, update later, it's gone. If you wish, you can try trunk.
Tried to start all over, but with Laz 1.4 RC3

Uninstalled all the 1.2.6 stuff, deleted the remains, and deleted .lazarus in my home directory.

Corrected the path in fpc.cfg, and was able to compile FPC as before, but when compiling Lazarus I face an allmost similar problem, except in another file:
Code: [Select]
extctrls.pp(1251,58) Error: Illegal expression
extctrls.pp(1251,58) Error: Error in type definition
extctrls.pp(1251,58) Fatal: Syntax error, ">" expected but "" found
Fatal: Compilation aborted
I am starting to get a little frustrated.

Leledumbo

  • Hero Member
  • *****
  • Posts: 7504
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Cross compiling Linux 64 bit to 32 bit.
« Reply #16 on: April 10, 2015, 08:22:21 pm »
Tried to start all over, but with Laz 1.4 RC3
It's compiler problem, not IDE. It's no use if you use newer IDE with the same compiler.

chrnobel

  • Full Member
  • ***
  • Posts: 217
Re: Cross compiling Linux 64 bit to 32 bit.
« Reply #17 on: April 10, 2015, 08:32:18 pm »
It's compiler problem, not IDE. It's no use if you use newer IDE with the same compiler.
I dont know what it is, the fact is I have installed everything from fresh, and it does not work.

Anyways, I give up, and as it also not is possible to install the 32 bit Lazarus on a 64 bit machine, I have to reinstall my machine with a 32 bit Linux.

But thanks for the help.

Leledumbo

  • Hero Member
  • *****
  • Posts: 7504
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Cross compiling Linux 64 bit to 32 bit.
« Reply #18 on: April 10, 2015, 08:53:59 pm »
I dont know what it is, the fact is I have installed everything from fresh, and it does not work.

Anyways, I give up, and as it also not is possible to install the 32 bit Lazarus on a 64 bit machine, I have to reinstall my machine with a 32 bit Linux.

But thanks for the help.
Well, you've given up, what can I say? Installing 32-bit Lazarus on 64-bit machine is possible, since 64-bit OS is capable of running 32-bit programs. But I won't use that route since my 64-bit Lazarus is perfectly capable of cross compiling to many 32-bit targets and even 1 16-bit target (MSDOS). If you pursue the knowledge and skill, you will have the power. If you give up, you'll stay as you are ;D

chrnobel

  • Full Member
  • ***
  • Posts: 217
Re: Cross compiling Linux 64 bit to 32 bit.
« Reply #19 on: April 10, 2015, 09:42:51 pm »
If you pursue the knowledge and skill, you will have the power. If you give up, you'll stay as you are ;D
You might be right, but I have to see this from a pragmatic angle - the purpose for me is to use Lazarus, not spend days guessing why in heavens name it won't work.

And the fact is, I have installed from absolutely scratch, with both the stable version, and version 1.4RC3, and none of them are working, despite I have followed all the good advices given by you.

So I have no clue in which magical way you have succeeded, but that's good on you - from my point of view I cannot spend days or weeks desperately trying to decipher it, therefore I have to find another solution.

Then in a couple of years, when Lazarus have matured a bit more, I can hope it is possible to get it to work.

Don't misunderstand me, I like Lazarus very much, and I advocate a lot for it, but the setup is overwhelming, and I do only have 24 hours a day to do with.

And we have to be open, that these kind of difficulties will be considered as a show stopper for many new users of Lazarus, albeit a lot of friendly help is to be found here.

parcel

  • Full Member
  • ***
  • Posts: 132
Re: Cross compiling Linux 64 bit to 32 bit.
« Reply #20 on: April 15, 2015, 07:44:07 am »
I also failed on 64bit mint.

How about try to use fpcup at lazarus installation?

Code: [Select]
#!/bin/bash
#
ln -s /usr/lib/x86_64-linux-gnu/libX11.so.6 /usr/lib/libX11.so
ln -s /usr/lib/x86_64-linux-gnu/libgdk-pixbuf-2.0.so.0 /usr/lib/libgdk_pixbuf-2.0.so
ln -s /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 /usr/lib/libgdk-x11-2.0.so
ln -s /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 /usr/lib/libpango-1.0.so
ln -s /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 /usr/lib/libgtk-x11-2.0.so
ln -s /usr/lib/x86_64-linux-gnu/libcairo.so.2 /usr/lib/libcairo.so
ln -s /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 /usr/lib/libatk-1.0.so
ln -s /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 /usr/lib/libpangocairo-1.0.so
ln -s /usr/bin/amd64-mingw32msvc-windres /usr/bin/windres
echo ‘you must install libgdk-pixbuf2.0-dev’

Kepsz

  • New member
  • *
  • Posts: 10
Re: Cross compiling Linux 64 bit to 32 bit.
« Reply #21 on: July 16, 2015, 11:36:56 am »
Do you have something like this in /etc/fpc.cfg ?
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl

And are your i386 units there ?
I have added the following 3 lines:

-Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget
-Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/*
-Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/rtl

Now I am able to compile Lazarus, but now I face a bizarre problems, as the compilation stops with this error:

Compiling treefilteredit.pas
treefilteredit.pas(61,60) Error: Illegal expression
treefilteredit.pas(61,60) Error: Error in type definition
treefilteredit.pas(61,60) Fatal: Syntax error, ">" expected but "" found
Fatal: Compilation aborted

But line 61 in treefilteredit looks exactly as expected:
Code: [Select]
TBranchList = specialize TFPGObjectList<TTreeFilterBranch>;
and the > is in position 60

very stange :o

I can confirm this issue on Debian8 x64 (KDE, Lazarus 1.4.2) to the point of the wrong library folders, but i get no errors on compile. Instead, when i tryd to compile the default empty app, i get a bunch of errors from LD, it misses X11, gtk2, cairo, thread and other librarys.
At this point i gave up and installed a 32 bit Debian8. Now i can compile normally.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus