Lazarus

Installation => Linux => Topic started by: minsoo on May 15, 2018, 03:48:13 am

Title: install on Ubuntu 16.04 ppc64le
Post by: minsoo on May 15, 2018, 03:48:13 am
Hello,

I'm trying to install Lazarus & FPC on Ubuntu 16.04 - PPC64LE.

Linux ubuntu 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:53:44 UTC 2017 ppc64le ppc64le ppc64le GNU/Linux

$ sudo apt-get install fpc

The following packages have unmet dependencies:
 fpc : Depends: fpc-3.0.0 (= 3.0.0+dfsg-2) but it is not going to be installed
       Recommends: fp-utils-3.0.0 but it is not installable
E: Unable to correct problems, you have held broken packages.

$ sudo apt-get install lazarus

The following packages have unmet dependencies:
 lazarus : Depends: lazarus-1.6 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

And I could not find .deb file for ppc64le.

Could FPC and Lazarus be installed on ppc64le version of ubuntu?

Please help me~~!! Thanks.
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: DonAlfredo on May 15, 2018, 07:57:54 am
You could try to use fpcupdeluxe !

https://github.com/newpascal/fpcupdeluxe/releases/download/v1.6.0q/fpcupdeluxe-powerpc64-linux
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: dbannon on May 15, 2018, 12:47:07 pm
Hi Minsoo, keep trying, its worth the effort !

I am a little unsure just what you are trying to install on.  PPC64LE ?  A PowerPC64 docker image ?  Some IBM hardware perhaps ?

If thats the case, you may have a problem, its possible precompiled binaries may not be available.

First problem, dependencies, - a bad idea to proceed to next step if an early step fails. If you can get FPC on, then you may be able to build Lazarus from source. It looks like a prebuild FPC is available but not the fp-utils ?  Thats strange. Maybe try and install utils first ?

apt install fp-utils <enter>

I'd hate to encourage anyone to 'force' apt, but it might come to that....

Title: Re: install on Ubuntu 16.04 ppc64le
Post by: minsoo on May 16, 2018, 02:38:59 am
Thanks for your kind reply.

PPC64LE is linux on IBM power system but little-endian. (PPC64 is big-endian)

I downloaded FPC source and trying to compile it.
But it seems that precompiled fpc binary is needed to compile fpc, is it correct?
Well I could not find the fpc binary for ppc64le. Dead-end??

And I'm trying to use fpcupdeluxe but there is some problem to configure xrdp.
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: dbannon on May 16, 2018, 04:53:14 am
Quote
PPC64LE is linux on IBM power system but little-endian. (PPC64 is big-endian)
Oh, interesting. Are you saying that the hardware is big-endian but you have a linux that converts it to little-endian ? That sounds crazy to me ...

Anyway, even though its little-endian, its not machine code compatible with Intel/AMD so you may well have problems finding pre-compiled binaries for everything. And, yep, to compile FPC, first you must have FPC installed (yeah, that sounds crazy too doesn't it ?).

Maybe this is what you need ?
Code: Pascal  [Select][+][-]
  1. ftp://ftp.freepascal.org/pub/fpc/dist/3.0.4/powerpc64-linux/
I'd have a look at it at least. I am currently away from home and with limited bandwidth so don't want to download just to see whats in there...
If that does not look right, go up a directory or two and see some alternatives.

David
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: minsoo on May 16, 2018, 06:35:43 am
Quote
Are you saying that the hardware is big-endian but you have a linux that converts it to little-endian ?

IBM says that the Power architecture is bi-endian in that it supports accessing data in both little endian and big endian modes. I'm not sure but it supports bi-endian mode from POWER8.

I tried both fpc-3.0.4.powerpc-linux.tar and fpc-3.0.4.powerpc64-linux.tar but failed. It seems that both files are compiled from big-endian linux.

Thanks.
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: DonAlfredo on May 16, 2018, 07:23:17 am
Fpcupdeluxe has some bootstrappers for PowerPC64. You could try using them to build your own FPC and Lazarus:

https://github.com/newpascal/fpcupdeluxe/releases/download/bootstrappers_v1.0/fpcup-3_0_4-powerpc64-linux-ppcppc64

https://github.com/newpascal/fpcupdeluxe/releases/download/bootstrappers_v1.0/fpcup-3_1_1-powerpc64le-linux-ppcppc64

AFAIK, you need trunk to use LE on PPC64 with FPC ! So, the second bootstrapper should suit your needs to compile FPC.

Besides, if fpcupdeluxe runs on your PPC64-system, that is a good sign: it has been build by crossing from Windows towards PPC64LE.
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: minsoo on May 17, 2018, 04:42:58 am
Thansk DonAlfredo,

I tried second file(fpcup-3_1_1-powerpc64le-linux-ppcppc64 ) but it failed.

$MAKE all OPT='-gl' PP=~/fpcup-3_1_1-powerpc64le-linux-ppcppc64.txt
Makefile:2779: *** The only supported starting compiler version is 3.0.4. You are trying to build with 3.1.1..  Stop.

Fourtunately, it can be executed on ppc64le system, but it is higher version than source from SVN.

$ ./fpcup-3_1_1-powerpc64le-linux-ppcppc64.txt
Free Pascal Compiler version 3.1.1-r37797 [2017/12/27] for powerpc64
Copyright (c) 1993-2017 by Florian Klaempfl and others

I could not find the older version of fpcupdelux file from github for ppc64le. Only 3.1.1 is available.

Title: Re: install on Ubuntu 16.04 ppc64le
Post by: DonAlfredo on May 17, 2018, 06:55:26 am
There is only 3.1.1 (trunk) ! So, you need to use OVERRIDEVERSIONCHECK=1
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: minsoo on May 17, 2018, 08:01:56 am
Wow, it works!!.

successfully compiled with OVERRIDEVERSIONCHECK=1 option.

Thank you~~!!
Title: Re: [Solved] install on Ubuntu 16.04 ppc64le
Post by: Thaddy on May 17, 2018, 08:48:35 am
OVERRIDEVERSIONCHECK=1  is use at your own risk: there are times that a trunk from an older trunk revision can not compile the latest trunk revision.
This will happen every so often and is not a bug...
In principle the only starting compiler is the latest release version, not trunk.
So be warned: OVERRIDEVERSIONCHECK=1  does not always work.
There are many examples of this scenario on the bug tracker, always resolved as no change required.

OVERRIDEVERSIONCHECK=1 is used here as an unsupported stop-gap for lazy people.
It should be: build 3.0.4 with 3.0.2, maybe 3.0.2 with 3.0.0 and even first 3.0.0 with 2.6.4 and so on. If there is a missing binary you can restore this from the last compiler known to your system and repeat until 3.0.4. is correctly compiled. Then build trunk. This scenario is fully supported. You do not need everything from a standard distribution, usually just compiler sources and rtl from the next version after your compiler version.
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: minsoo on May 18, 2018, 06:58:05 am
Well, I compiled fpc with OVERRIDEVERSIONCHECK=1 option and compiled lazarus but lazarus is failed to start without error. Just returned prompt without any message.(startlazarus is same result)

So I installed fpc 3.0.4 on CentOS 7 and trying to crosscompile fpc for ppc64le from CentOS. But there is no example like this on wiki.

How can I cross-compile fcp from Linux to ppc64le?
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: DonAlfredo on May 18, 2018, 09:09:34 am
I did encounter the same problem with Lazarus: compiles fine, but fails to start.
As I could only work remotely on the PPC64LE system, I was not (yet) able to debug Lazarus.

About cross-compiling: see the TRUNK-compiler-code below (from t_linux.pas); AFAIK, ppc64le is only available in trunk. So I think you will fail with 3.0.4.

Code: Pascal  [Select][+][-]
  1. {$ifdef powerpc64}
  2.   { default to little endian either when compiling with -dppc64le, or when
  3.     compiling on a little endian ppc64 platform }
  4.  {$if defined(ppc64le) or (defined(cpupowerpc64) and defined(FPC_LITTLE_ENDIAN))}
  5.   system_powerpc64_linux_info.endian:=endian_little;
  6.   system_powerpc64_linux_info.abi:=abi_powerpc_elfv2;
  7.  {$endif}
  8.   RegisterImport(system_powerpc64_linux,timportliblinux);
  9.   RegisterExport(system_powerpc64_linux,texportliblinux);
  10.   RegisterTarget(system_powerpc64_linux_info);
  11. {$endif powerpc64}

Again, you could try to use fpcupdeluxe to install an isolated trunk version of FPC and Lazarus on your normal Linux system. Followed by an installation (also by fpcupdeluxe) of a cross-compiler towards PPC64(LE).
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: minsoo on May 18, 2018, 09:35:40 am
Thanks, DonAlfredo.

I installed trunk version (3.1.1) compiler on my linux system. Sorry, I couldn't understand your last sentense.
Quote
Followed by an installation (also by fpcupdeluxe) of a cross-compiler towards PPC64(LE).

Do you mean that I need to install cross-compiler on linux system? Could you tell me where can I find the install guide?
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: DonAlfredo on May 18, 2018, 09:47:32 am
Edit:
I just remembered that there are only ppc64le binaries for Windows.
I will make some tools for linux 32 and 64 bit Intel also. Please stay tuned !

Choose ppc64 and Linux, followed by a button-click.
See included screenshot.
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: minsoo on May 18, 2018, 09:59:47 am
Hmm, I tried but it failed.

ERROR: Tried to get FPC version from verion.pas, but no version.pas found
ERROR: TAny_linux-powerpc64: searched but did not find any binary utilites!!
...
Missing correct cross binary utilities
...
ERROR : TAny_linux-powerpc64: searched but did not find any library!!

 %) very difficult to install.........
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: DonAlfredo on May 18, 2018, 10:01:41 am
My mistake: see the edit on my previous post !
Working on it !!
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: DonAlfredo on May 18, 2018, 12:21:00 pm
I have added the PPC64 tools for Linux both 32 and 64 bit Intel.
Please run the fpcupdeluxe cross-install again. Perhaps you have to run it twice (or trice), if the first try fails.
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: minsoo on May 23, 2018, 03:52:07 am
Sorry for late update.

I tried but the result is same.( TAny_linux-powerpc64 : searched but did not find any binary utilities !!)

I installed trunk version of fpc and lazarus by command, and ran fpcupdelux.
- Checked ppc64 from CPU and checked linux from OS --> click "Install cross-compiler"

Do I miss something?

Code: [Select]
fpcupdeluxe: info: FPCCrossInstaller (BuildModule: FPC): Building module FPC...
fpcupdeluxe: info: FPCCrossInstaller (BuildModule: FPC): We have a FPC source (@ /home/mshwang/fpcupdeluxe/fpcsrc) with version: 3.1.1
fpcupdeluxe: ERROR: TAny_linux-powerpc64: searched but did not find any binary utilities !!
fpcupdeluxe: ERROR: Failed to get crossbinutils
fpcupdeluxe: ERROR: TAny_linux-powerpc64: searched but did not find any library !!
fpcupdeluxe: info: TAny_linux-powerpc64: Libspath ignored; it is optional for this cross compiler.


Fpcupdeluxe failed due to missing cross binary tools.
Looking for fpcupdeluxe cross-tools on GitHub (if any).
Going to download the right cross-bins. Can (will) take some time !
Please wait: Going to download the zip binary-tools from https://github.com/newpascal/fpcupdeluxe/releases/download/linuxx64crossbins_v1.0/CrossBinsLinuxPowerPC64.zip
fpcupdeluxe: info: Native downloader: Getting CrossBinsLinuxPowerPC64.zip from github.com/newpascal/fpcupdeluxe/releases/download/linuxx64crossbins_v1.0/
fpcupdeluxe: info: Native downloader: Getting CrossBinsLinuxPowerPC64.zip from github.com/newpascal/fpcupdeluxe/releases/download/linuxx64crossbins_v1.0/
Please wait: Going to download the rar binary-tools from https://github.com/newpascal/fpcupdeluxe/releases/download/linuxx64crossbins_v1.0/CrossBinsLinuxPowerPC64.rar
fpcupdeluxe: info: Native downloader: Getting CrossBinsLinuxPowerPC64.rar from github.com/newpascal/fpcupdeluxe/releases/download/linuxx64crossbins_v1.0/
fpcupdeluxe: info: Native downloader: Getting CrossBinsLinuxPowerPC64.rar from github.com/newpascal/fpcupdeluxe/releases/download/linuxx64crossbins_v1.0/
No luck in getting then cross-tools ... aborting.
Title: Re: install on Ubuntu 16.04 ppc64le
Post by: DonAlfredo on May 23, 2018, 06:49:21 am
Try to do it yourself, if fpcupdeluxe fails in getting the tools !

Get the bins:
https://github.com/newpascal/fpcupdeluxe/releases/download/linuxx64crossbins_v1.0/CrossBinsLinuxPowerPC64.zip
Put these bins into : /home/mshwang/fpcupdeluxe/cross/bin/powerpc64-linux

Get the libs:
https://github.com/newpascal/fpcupdeluxe/releases/download/crosslibs_v1.1/CrossLibsLinuxPowerPC64LE.zip
Put these libs into : /home/mshwang/fpcupdeluxe/cross/lib/powerpc64-linux

Run fpcupdeluxe again !
TinyPortal © 2005-2018