Recent

Author Topic: Cross compiling Linux 64 to Linux 32 ?  (Read 6305 times)

patyi

  • Full Member
  • ***
  • Posts: 168
Cross compiling Linux 64 to Linux 32 ?
« on: July 27, 2014, 07:42:41 pm »
Hi all !

I just installed Linux Mint Cinnamon (LMDE) AMD64 rolling release, Lazarus 64bit with fpcup_linux_x64 utility.
Everything is perfect on 64bit, but now need to build Linux 32bit application.
I study cross compiling on wiki, googling the net, but I don't find any sample how to do this when it is installed with fpcup.
I mean dir structure, the way how fpcup is done the local installation.
I try methods described on wiki, but this is for standard fpc installation ... (adopted to my dir paths, and  got bunch of errors)

What have to do to build 32bit cross compiler, pleas if possible step by step instruction !

Thanks, Patyi. 

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Cross compiling Linux 64 to Linux 32 ?
« Reply #1 on: July 28, 2014, 09:52:21 am »
Interesting!

I try methods described on wiki, but this is for standard fpc installation ... (adopted to my dir paths, and  got bunch of errors)
1. You'll see in the table on the fpcup page that linux x64=>x32 is not supported. It may work, no idea.
2. Make sure you have the 32 bit libs and binutils in the right place. Otherwise, "get a bunch of errors" is so vague that nobody can even try to help you based on that. See the first link in my signature.

What have to do to build 32bit cross compiler, pleas if possible step by step instruction !
http://wiki.lazarus.freepascal.org/Cross_compiling
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Cross compiling Linux 64 to Linux 32 ?
« Reply #2 on: July 28, 2014, 01:19:47 pm »
1. You'll see in the table on the fpcup page that linux x64=>x32 is not supported. It may work, no idea.
Certainly it is, I'm on x86_64-linux and I can compile i386-linux just fine. Remember you must have ALL required lib32 version of the libraries, though.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Cross compiling Linux 64 to Linux 32 ?
« Reply #3 on: July 28, 2014, 01:45:02 pm »
1. You'll see in the table on the fpcup page that linux x64=>x32 is not supported. It may work, no idea.
Certainly it is, I'm on x86_64-linux and I can compile i386-linux just fine. Remember you must have ALL required lib32 version of the libraries, though.
Yes, so you used fpcup? If so, I'm happy to update the wiki.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Cross compiling Linux 64 to Linux 32 ?
« Reply #4 on: July 29, 2014, 02:35:20 am »
1. You'll see in the table on the fpcup page that linux x64=>x32 is not supported. It may work, no idea.
Certainly it is, I'm on x86_64-linux and I can compile i386-linux just fine. Remember you must have ALL required lib32 version of the libraries, though.
Yes, so you used fpcup? If so, I'm happy to update the wiki.
Err...no. I'm talking from the general point of view.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Cross compiling Linux 64 to Linux 32 ?
« Reply #5 on: July 29, 2014, 09:12:14 am »
Thanks. That's what I suspected ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

patyi

  • Full Member
  • ***
  • Posts: 168
Re: Cross compiling Linux 64 to Linux 32 ?
« Reply #6 on: August 03, 2014, 11:03:03 pm »
Leledumbo, BigChimp !

Thank you for your feedback, but this does not solve the problem. Now I'm back to 32bit linux (xubunti 04.14 LTS i386) ...

It would be nice to extend the fpcup utility to install the required libraries and build 64=>32 bit Linux cross compiler,
such as on the Win64 platform, as I see it.

Guys, you two have power, you can do it !  :D

Thanks, Patyi.
« Last Edit: August 03, 2014, 11:05:00 pm by patyi »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Cross compiling Linux 64 to Linux 32 ?
« Reply #7 on: August 04, 2014, 08:13:14 am »
Guys, you two have power, you can do it !  :D
Great news! Let me know where I can download your patch for fpcup so I (and Leledeumbo if he wants to), can review it.

Glad you're not one of those guys that justs asks, asks, asks, from people who freely give open source software and write documentation without contributing a single thing themselves, and not one of those guys that cannot even be bothered to read the documentation and act on it.

Thanks!
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018