install on Ubuntu 16.04 ppc64le lazarus / 1-Linux ---------------------------------------------------------------------- minsoo · 2018-05-15 01:48 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. ---------------------------------------------------------------------- DonAlfredo · 2018-05-15 05:57 You could try to use fpcupdeluxe ! https://github.com/newpascal/fpcupdeluxe/releases/download/v1.6.0q/fpc updeluxe-powerpc64-linux ---------------------------------------------------------------------- dbannon · 2018-05-15 10:47 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 I'd hate to encourage anyone to 'force' apt, but it might come to that.... ---------------------------------------------------------------------- minsoo · 2018-05-16 00:38 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. ---------------------------------------------------------------------- dbannon · 2018-05-16 02:53 QuotePPC64LE 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i 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 ---------------------------------------------------------------------- minsoo · 2018-05-16 04:35 QuoteAre 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 · 2018-05-16 05:23 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/bootstrappe rs_v1.0/fpcup-3_0_4-powerpc64-linux-ppcppc64 https://github.com/newpascal/fpcupdeluxe/releases/download/bootstrappe rs_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 · 2018-05-17 02:42 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 · 2018-05-17 04:55 There is only 3.1.1 (trunk) ! So, you need to use OVERRIDEVERSIONCHECK=1 ---------------------------------------------------------------------- minsoo · 2018-05-17 06:01 Wow, it works!!. successfully compiled with OVERRIDEVERSIONCHECK=1 option. Thank you~~!! ---------------------------------------------------------------------- Thaddy · 2018-05-17 06:48 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. ---------------------------------------------------------------------- minsoo · 2018-05-18 04:58 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? ---------------------------------------------------------------------- DonAlfredo · 2018-05-18 07:09 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][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$ifdef powerpc64}  { default to little endian either when compiling with -dppc64le, or when    compiling on a little endian ppc64 platform } {$if defined(ppc64le) or (defined(cpupowerpc64) and defined(FPC_LITTLE_ENDIAN))}  system_powerpc64_linux_info.endian:=endian_little;  system_powerpc64_linux_info.abi:=abi_powerpc_elfv2; {$endif}  RegisterImport(system_powerpc64_linux,timportliblinux);  RegisterExport(system_powerpc64_linux,texportliblinux);  RegisterTarget(system_powerpc64_linux_info);{$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 · 2018-05-18 07:35 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 · 2018-05-18 07:47 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. ---------------------------------------------------------------------- minsoo · 2018-05-18 07:59 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......... ---------------------------------------------------------------------- DonAlfredo · 2018-05-18 08:01 My mistake: see the edit on my previous post ! Working on it !! ---------------------------------------------------------------------- DonAlfredo · 2018-05-18 10:21 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. ---------------------------------------------------------------------- minsoo · 2018-05-23 01:52 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://githu b.com/newpascal/fpcupdeluxe/releases/download/linuxx64crossbins_v1.0/C rossBinsLinuxPowerPC64.zip fpcupdeluxe: info: Native downloader: Getting CrossBinsLinuxPowerPC64.zip from github.com/newpascal/fpcupdeluxe/rele ases/download/linuxx64crossbins_v1.0/ fpcupdeluxe: info: Native downloader: Getting CrossBinsLinuxPowerPC64.zip from github.com/newpascal/fpcupdeluxe/rele ases/download/linuxx64crossbins_v1.0/ Please wait: Going to download the rar binary-tools from https://githu b.com/newpascal/fpcupdeluxe/releases/download/linuxx64crossbins_v1.0/C rossBinsLinuxPowerPC64.rar fpcupdeluxe: info: Native downloader: Getting CrossBinsLinuxPowerPC64.rar from github.com/newpascal/fpcupdeluxe/rele ases/download/linuxx64crossbins_v1.0/ fpcupdeluxe: info: Native downloader: Getting CrossBinsLinuxPowerPC64.rar from github.com/newpascal/fpcupdeluxe/rele ases/download/linuxx64crossbins_v1.0/ No luck in getting then cross-tools ... aborting. ---------------------------------------------------------------------- DonAlfredo · 2018-05-23 04:49 Try to do it yourself, if fpcupdeluxe fails in getting the tools ! Get the bins: https://github.com/newpascal/fpcupdeluxe/releases/download/linuxx64cro ssbins_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_v 1.1/CrossLibsLinuxPowerPC64LE.zip Put these libs into : /home/mshwang/fpcupdeluxe/cross/lib/powerpc64-linux Run fpcupdeluxe again !