[fpc-pascal] getting cross with the cross compiler

pascalX at piments.com pascalX at piments.com
Tue Oct 10 06:51:37 CEST 2017


On 08/10/17 10:12, Tomas Hajny wrote:
> On Sat, October 7, 2017 22:13, pascalX at piments.com wrote:
> 
> 
> Hi,
> 
>   .
>   .
>> Can you offer any insights into what is going on with Lazarus not
>> locating the system unit and friends.  As you acknowledge they are
>> treated somewhat differently due to problems with the underlying
>> platforms.
>>
>> I am wondering whether this enforced inconsistency with the generally
>> well organised structure could be leading to the problem.
>>
>> It seems odd that fpc is finding them OK and Lazarus not.
>>
>> It seems that fedora are doing something a little different in terms of
>> installation dirs, presumably a result of their way of providing
>> multilib 32/64 functionality where they install 64b libs in /usr/lib64
>> rather than /usr/lib.
>>
>> I am wondering whether this has highlighted some assumption implicit in
>> the code about different version of libs being in the same place.
>>
>> Do you have any ideas why the fpc can find the system.ppu etc and not
>> Lazarus?
> 
> Have you looked at FPC FAQ (in particular,
> https://www.freepascal.org/faq.var#systemnotfound), or FPC documentation
> (https://www.freepascal.org/docs-html/user/usersu7.html#x21-280003.1.2)?
> 
> FPC Wiki is an additional resource, there is some information related to
> Lazarus as well - see
> http://wiki.freepascal.org/Unit_not_found_-_How_to_find_units.
> 
> All of this might help you in finding differences; note that installation
> packages created for specific Linux distributions may decide to modify the
> default unit locations.
> 
> Hope this helps
> 
> Tomas
> 


OK, I have got somewhere is finding out what is going wrong.


The trunk cross-compiler is installed and correctly linked. distro fpc 
will use it when the appropriate flags are supplied, however, Lazarus is 
not looking is the right place for the system libs and is NOT building 
them when they are are required. Which it claims to be able to do.

I was able to get cross compilation from Lazarus by installing and 
symlinkg  trunk ppcx64  but of course this breaks the ability of build 
anything else from the svn pull because of versions block.

$make all         NOGDB=1 OS_TARGET=linux CPU_TARGET=x86_64 
INSTALL_PREFIX=/usr
Makefile:2914: *** The only supported starting compiler version is 
3.0.0. You are trying to build with 3.1.1..  Stop.

BTW is  that msg  is correct? I just built with 3.0.2 , it seems that 
the version block is not specific enough or the message missed a version 
bump.


There  are two conflicting conditions: fpc requires the system fpc to be 
older in order to build trunk but Lazarus is not smart enough to find ( 
or build ) the libs if ppc and ppcross are from different versions.

I don't know the mechanics of that but it would seem that there is an 
implicit assumption somewhere that ppc and ppcross are of the same 
version and this leads to it not finding the libs ( which are present  ) 
but not even trying to build them when they are "missing".

Were it not for the version restrictions in building fpc one could 
arguably say this was a reasonable assumption.  As it is, it leads to a 
very confused and confusing state which has taken several days to 
understand and untangle.


Maybe that could be addressed.

Thanks for the help along the way.









More information about the fpc-pascal mailing list