* * *

Author Topic: install on Ubuntu 16.04 ppc64le  (Read 815 times)

minsoo

  • New member
  • *
  • Posts: 8
install on Ubuntu 16.04 ppc64le
« 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.
« Last Edit: May 17, 2018, 10:42:34 am by minsoo »


dbannon

  • Full Member
  • ***
  • Posts: 231
Re: install on Ubuntu 16.04 ppc64le
« Reply #2 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....

Lazarus 1.8, Linux (and reluctantly Win10, OSX)

minsoo

  • New member
  • *
  • Posts: 8
Re: install on Ubuntu 16.04 ppc64le
« Reply #3 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.
« Last Edit: May 16, 2018, 02:43:20 am by minsoo »

dbannon

  • Full Member
  • ***
  • Posts: 231
Re: install on Ubuntu 16.04 ppc64le
« Reply #4 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
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

minsoo

  • New member
  • *
  • Posts: 8
Re: install on Ubuntu 16.04 ppc64le
« Reply #5 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.

DonAlfredo

  • Hero Member
  • *****
  • Posts: 875
Re: install on Ubuntu 16.04 ppc64le
« Reply #6 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.

minsoo

  • New member
  • *
  • Posts: 8
Re: install on Ubuntu 16.04 ppc64le
« Reply #7 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.


DonAlfredo

  • Hero Member
  • *****
  • Posts: 875
Re: install on Ubuntu 16.04 ppc64le
« Reply #8 on: May 17, 2018, 06:55:26 am »
There is only 3.1.1 (trunk) ! So, you need to use OVERRIDEVERSIONCHECK=1

minsoo

  • New member
  • *
  • Posts: 8
Re: install on Ubuntu 16.04 ppc64le
« Reply #9 on: May 17, 2018, 08:01:56 am »
Wow, it works!!.

successfully compiled with OVERRIDEVERSIONCHECK=1 option.

Thank you~~!!

Thaddy

  • Hero Member
  • *****
  • Posts: 5974
Re: [Solved] install on Ubuntu 16.04 ppc64le
« Reply #10 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.
recommends {$macro on}{$define Silly:=ObjFpc}

minsoo

  • New member
  • *
  • Posts: 8
Re: install on Ubuntu 16.04 ppc64le
« Reply #11 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?
« Last Edit: May 18, 2018, 07:00:08 am by minsoo »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 875
Re: install on Ubuntu 16.04 ppc64le
« Reply #12 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).

minsoo

  • New member
  • *
  • Posts: 8
Re: install on Ubuntu 16.04 ppc64le
« Reply #13 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?

DonAlfredo

  • Hero Member
  • *****
  • Posts: 875
Re: install on Ubuntu 16.04 ppc64le
« Reply #14 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.
« Last Edit: May 18, 2018, 10:00:49 am by DonAlfredo »

 

Recent

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