LongDirtyAnimAlf / fpcupdeluxe

A GUI based installer for FPC and Lazarus
490 stars 89 forks source link

Problem at linking for NetBSD i386 #614

Closed fredvs closed 1 year ago

fredvs commented 1 year ago

Hello.

First of all congratulation for this marvelous project. Cross-compilation from Linux 64 bit to ARM 32 bit and aarch64 was out of the box, WoW.

I did install also cross-compiler for NetBSD from linux 64 bit to NetBSD i386. The installation was ok but I was not able to use the cross-compiler (maybe I missed something).

Anyway I installed fpc 3.2.2 for NetBSD i386 from souceforge release on a VM NetBSD i386. But when I try to compile something, there are lot of error message at linking for some libp*.a (done by fpc) that are missing. Like:

 usr/bin/ld: cannot find libpdateutils.a
 usr/bin/ld: cannot find libpvariants.a
 usr/bin/ld: cannot find libpvarutils.a
...

So I downloaded source of fpc 3.3.1. and recompiled fpc but compilation fails when trying to link fp-ide.

So I downloaded source of fpc 3.2.3 and recompiled fpc. This time fpc compiled ok and installed ok.

But if trying to compile a application using fpc 3.2.3, same errors like for 3.2.2 some libp*.a (done by fpc) are missing.

Is there a way to make fpc work-link on NetBSD i386 (32 bit) or must I wait a little bit?

Thanks.

Fre;D

LongDirtyAnimAlf commented 1 year ago

I have uploaded new libs. You might give these a try. https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/crosslibs_all/NetBSD_i386_NetBSD_0903.zip Please delete the old libs and replace them with the new libs. Rebuild the cross-compiler. Rebuild your application.

fredvs commented 1 year ago

Hello Don. Many thanks, I will do it asap (not possible today). Write you later.

Fre;D

fredvs commented 1 year ago

Hello.

(I cannot resist, even important things to do today).

Not sure if it is the good way, first I run _FPCUPdeluxe V2.4.0a for x8664-linux-gtk2. Then, in "Cross" tab, select "i386" and "netbsd" --> "Remove compiler". Then, "Install compiler", it first download the 77,5 zip and did recompilation of the compiler. It ended with "SUCCESS: installation by fpcupdeluxe complete !"

Then, I did try to cross-compile the application using the new cross-compiler. But here I am blocked, in /fpcupdeluxe/fpc/bin/x86_64-linux/ there are:

ppccrossa64 ppcrossarm ppcrossx64 ppcross386

But all those binaries date from 23-08-17.

If I select ppcross386 as compiler for the program, there is that error at compilation:

Free Pascal Compiler version 3.2.2-r0d122c49 [2023/08/17] for i386
...
Fatal: (10022) Can't find unit dateutils used by msesysintf1

I suppose I have to replace the old fpc.cfg that is in /etc/fpc.cfg. But did I miss something with the choice of the ppcross386 compiler? Note that I use command line (not Lazarus).

Fre;D

LongDirtyAnimAlf commented 1 year ago

Well. I hope fpcupdeluxe does not use nor changes the fpc.cfg in /etc !! To me ore clear: /etc/fpc.cfg is not used by a local, isolated install by fpcupdeluxe (I hope). Second. The ppcross386 will not be updated is the FPC sources are not changed. This saves some time. Only the RTL is compiled again.

Fatal: (10022) Can't find unit dateutils used by msesysintf1

This is a strange error. At the moment, I have no clue.

fredvs commented 1 year ago

Some news from the front...

OK, I think I get it: Using this crosscompiler: /home/fred/fpcupdeluxe/fpc/bin/x86_64-linux/ppcross386

and adding this parameter: -Tnetbsd

I get this:

Hint: (11030) Start of reading config file /etc/fpc.cfg
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.2.2-r0d122c49 [2023/08/17] for i386
Copyright (c) 1993-2021 by Florian Klaempfl and others
(1002) Target OS: NetBSD for i386
(3104) Compiling ideU.pas
...
995019 lines compiled, 21.9 sec
(1021) 569 warning(s) issued
(1022) 6332 hint(s) issued
(1023) 93 note(s) issued

Magnifique! And linking is OK too, WOW.

This fpcupdeluxe is magic, all will be much easier now.

I will test the binary asap (I have NetBSD 9.2 i386, I hope it will run too on it otherwise I will install NetBSD 9.3 i386).

Maybe fpc could commit your fixes because the fpc for NetBSD i386 is not working.

Very impressed.

Fre;D

fredvs commented 1 year ago

Tested on NetBSD 9.2 i386:

mseide_netbsd32

WoooooW, and this totally out-of-the-box.

Don, you are the Hero.

Many, many, many thanks.

Fre;D