#1 2016-11-17 23:25:38

erick
Member
Registered: 2015-09-09
Posts: 109

Win32 compiler cross compiler woes

Hi, I was trying the Lazerus + 1.0.36 for Win32 - compiles perfectly.

I downloaded and tried to compile for Linux i386, FreeBSD i386 and FreeBSD AMD64,
all three gave errors saying something like

Fatal: Cannot find system used by Lazarus. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=C:\NewPascal\fpc\units\i386-linux\rtl\system.ppu..

Which subdirectory should the PPU files be in?  I guess it compiles them to the wrong directory.  I'd move them if it told me where to put them.

Thanks for something REALLY cool.

Erick

Offline

#2 2016-11-18 03:07:41

erick
Member
Registered: 2015-09-09
Posts: 109

Re: Win32 compiler cross compiler woes

I used the IDE’s Tools | Configure Build Lazarus and select the appropriate GUI,  operating system and processor.  I think that's the right way to cross compile.

Offline

#3 2016-11-18 13:04:56

erick
Member
Registered: 2015-09-09
Posts: 109

Re: Win32 compiler cross compiler woes

I figured out how to do it with the FPC command line compiler: -Tfreebsd -Px86_64

The native freebsd  TestSQL3 compiled, but had several assertions fail, then several exceptions, then it coredumped.

I will investigate further, but that's for a different section of this board.

Erick

Offline

#4 2016-11-18 13:58:37

AOG
Member
Registered: 2014-02-24
Posts: 346

Re: Win32 compiler cross compiler woes

You do not need to Configure Build Lazarus or to build Lazarus.
All is ready made for you.

Just select the right target in Project -> Project Options -> Config and Target -> Target platform

And TestSQL3 will not run for 100% on FreeBSD.
To many differences in its system.

Your offer for bug-hunting is welcome !

Last edited by AOG (2016-11-18 13:59:58)

Offline

#5 2016-11-18 14:06:19

erick
Member
Registered: 2015-09-09
Posts: 109

Re: Win32 compiler cross compiler woes

Ahhh, that's what I was doing wrong.  Thanks.

I don't know how successful I'll be in bug hunting, FreeBSD programming is not my forte, but I'll give it a try amidst all my other projects.

Offline

#6 2016-11-18 14:20:39

erick
Member
Registered: 2015-09-09
Posts: 109

Re: Win32 compiler cross compiler woes

The newpascal web pages are mistaken about a few things:

http://newpascal.org/download.html
The Windows distro points to the Linux Distro
The Linux distro should point to the  Linux Distro but says coming soon

OR - get rid of those distro links and just point to :

https://github.com/newpascal/newpascal/releases

which has everything.

Offline

#7 2016-11-18 14:54:49

hnb
Member
Registered: 2015-06-15
Posts: 246

Re: Win32 compiler cross compiler woes

Thanks for report, Linux distro is new so page is not updated yet. I will fix that.


best regards,
Maciej Izak

Offline

#8 2016-11-18 19:46:30

erick
Member
Registered: 2015-09-09
Posts: 109

Re: Win32 compiler cross compiler woes

FYI, after it failing miserably under FreeBSD 64 bit Intel native, I compiled a Linux 64 bit Intel version and tried that under new FreeBSD 11's Linux compatibility layer.  The linux emulator test failed numerous assertions and looked like it would never complete (stayed at 0.03% for a few minutes) so I gave up on that.

I will probably fire up a Linux VM or a Windows VM and use that.

Erick

Offline

Board footer

Powered by FluxBB