Forum > Linux

Running Ubuntu 64 bit but trying to target 32?

<< < (2/3) > >>

jdredd:
i looked for one earlier, but could not find one that did what it was suppose to do.

there seems to be multiple different ways to install FPC and Lazarus over the years.

Ive done it from codetyphoon, apt-get, downloading svn's ... but things don't seem to go right. Kind of a headache. I got it so FPC was in there and had a ppc for i386 and x86_64
 but lazarus couldn't find things so couldn't compile anything. Always missing units?

With the latest Ubuntu... what is the current "recommended" way to get FPC 64bit/32bit for linux installed and then Lazarus for it installed.

--- Edit ---

I went through and located and removed all instances of FPC and Lazarus that was installed by the different methods... stuff was just everywhere.

Thus why I need a step by step on how to "properly" do it, as i think some older posts out there, isn't the proper way anymore. ?

Leledumbo:
Prerequisites: ld from binutils compiled with x86_64 to i386 cross linking

* Install your 64-bit FPC and Lazarus as usual (i.e. from your repo). You should have FPC sources somewhere. I don't really remember, /usr/share/fpc perhaps, it should (at least) consist of these folders: compiler, ide, rtl, packages
* Now open your terminal and go to that folder
* Type make all CPU_TARGET=i386, if everything went OK, now call make cross_install CPU_TARGET=i386 INSTALL_PREFIX=<fpc base dir, usually /usr>. Make sure it's the directory where your 64-bit FPC exists
* Make ppcross386 symlink in <fpc base dir>/bin directory (you can check with ls -l to ppcx64 to see that it's also a symlink to <fpc base dir>/lib/fpc/<fpc version>/ppcx64
* Open Lazarus, Build LCL for i386, use the configure build Lazarus dialog
* Done

jdredd:

--- Quote from: Leledumbo on March 12, 2011, 06:45:25 am ---Prerequisites: ld from binutils compiled with x86_64 to i386 cross linking

* Install your 64-bit FPC and Lazarus as usual (i.e. from your repo). You should have FPC sources somewhere. I don't really remember, /usr/share/fpc perhaps, it should (at least) consist of these folders: compiler, ide, rtl, packages
* Now open your terminal and go to that folder
* Type make all CPU_TARGET=i386, if everything went OK, now call make cross_install CPU_TARGET=i386 INSTALL_PREFIX=<fpc base dir, usually /usr>. Make sure it's the directory where your 64-bit FPC exists
* Make ppcross386 symlink in <fpc base dir>/bin directory (you can check with ls -l to ppcx64 to see that it's also a symlink to <fpc base dir>/lib/fpc/<fpc version>/ppcx64
* Open Lazarus, Build LCL for i386, use the configure build Lazarus dialog
* Done
--- End quote ---

Thanks for the help, it got a bit further.. I am not sure trying to use CodeTyphoon is my best route or not.

The make cross_install CPU_TARGET=i386 INSTALL_PREFIX=<fpc base dir, usually /usr>
would not work for me. i get this

"make: *** No rule to make target 'cross_install'. Stop. "

from the wiki I did do the  bash $ su -c "make install CPU_TARGET=i386"

and that worked it seemed... when i loaded codetyphon, it now showed FPC 64bit and 32bit.
i have a ppc386 executable now that runs.

in Lazarus i built the LCL with i386 target... and no errors. and in my test project i put the target to i386. It compiled and ran. But it still seems to build it as a 64bit app.

When i do "file project1." it shows it being a x86-64 .

If CodeTyphoon is not the way to go, i can attempt to clear it all out again.

If go that route, got any tips on how to get these things both installed and compiled properly? I still struggle with linux, plus when i keep finding different instructions for this process, it throws me for a loop  :(

Sternas Stefanos:
My suggestion is to use VirtualBox emulation to
build 32bit linux applications on 64bit linux System

We don't start CodeTyphon cross build ability for linux yet...

Leledumbo:

--- Quote ---The make cross_install CPU_TARGET=i386 INSTALL_PREFIX=<fpc base dir, usually /usr>
would not work for me. i get this

"make: *** No rule to make target 'cross_install'. Stop. "
--- End quote ---
Sorry, it should be crossinstall (no underscore)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version