Recent

Author Topic: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5  (Read 26146 times)

BSaidus

  • Hero Member
  • *****
  • Posts: 619
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #135 on: November 14, 2024, 10:34:12 pm »
I have installed fpc-3.2.2-x64-openbsd64 first, I compiled simple console program to display "Hello" with ReadLn() as last instruction.
 OpenBSD 7.6 came's with libc.so.100.3 and libpthread.so.27.1 whereas fpc needs libc.so.96.1 and libpthread.so.26.2 (I think). I've made soft links to these libraries.
  ./test compile & executes, but with crash.

I reinstalled fpc-3.2.2-x32-openbsd64, it even do not run.

Thanks.
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1805
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #136 on: November 15, 2024, 10:24:42 am »
Sidenote.
Found the bugger that caused gtk2 apps to crash on OpenBSD. If the patch is used, gtk2 apps run as expected again on OpenBSD.
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41244


DonAlfredo

  • Hero Member
  • *****
  • Posts: 1805
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #137 on: November 15, 2024, 10:54:23 am »
And, finally, some luck in building trunk on OpenBSD 7.6 !
Still need to investigate a bit more.

Fred vS

  • Hero Member
  • *****
  • Posts: 3629
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #138 on: November 15, 2024, 12:43:19 pm »
And, finally, some luck in building trunk on OpenBSD 7.6 !
Still need to investigate a bit more.

WOW!  ;D
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3629
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #139 on: May 05, 2025, 12:58:40 pm »
Great news!

Our friends from CodeTyphon project found the solution: https://www.pilotlogic.com/sitejoom/index.php/forum/ct-lab-news/6331-ct-lab-ver-8-70.html

 ;D
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1805
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #140 on: May 05, 2025, 01:23:14 pm »
Can you show us the code ?
From his message.
codetyphon\fpcsrc\rtl\openbsd\x86_64\si_g.inc
codetyphon\fpcsrc\rtl\openbsd\x86_64\si_c.inc

Fred vS

  • Hero Member
  • *****
  • Posts: 3629
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #141 on: May 05, 2025, 01:28:19 pm »
Can you show us the code ?
From his message.
codetyphon\fpcsrc\rtl\openbsd\x86_64\si_g.inc
codetyphon\fpcsrc\rtl\openbsd\x86_64\si_c.inc

https://www.pilotlogic.com/sitejoom/index.php/downloads/category/14-codetyphon.html + "upgrade to last commit"

 :)
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1805
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #142 on: May 05, 2025, 01:30:44 pm »
I am not going to install CodeTyphon.
I was hoping you had !
;-)

Fred vS

  • Hero Member
  • *****
  • Posts: 3629
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #143 on: May 05, 2025, 01:33:51 pm »
I am not going to install CodeTyphon.
I was hoping you had !
;-)

Yes I did but it's fair play that you do it too...  :P
« Last Edit: May 05, 2025, 05:45:47 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3629
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #144 on: May 06, 2025, 04:47:36 pm »
I am not going to install CodeTyphon.
I was hoping you had !
;-)

Well his fixes, oddly enough, have perfect similarities with the patch you proposed here:
https://gitlab.com/freepascal.org/fpc/source/-/issues/41017

 :-[

Even though it maybe like a work-around, I can confirm that it works. I tested it on OpenBSD 77 64-bit.
And, in my opinion, it's better than a completely non-working fpc-OpenBSD.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs


Fred vS

  • Hero Member
  • *****
  • Posts: 3629
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #146 on: May 10, 2025, 04:43:26 pm »
Well his fixes, oddly enough, have perfect similarities with the patch you proposed here:
https://gitlab.com/freepascal.org/fpc/source/-/issues/41017

Why doesn't anyone reply to your posts and mine?

Who is the dev.-maintainer of fpc-OpenBSD?

And is it necessary for this dev to be so pretentious and haughty?

 >:D  >:( x 1000
« Last Edit: May 10, 2025, 04:46:44 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

PascalDragon

  • Hero Member
  • *****
  • Posts: 6039
  • Compiler Developer
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #147 on: May 11, 2025, 04:06:59 pm »
Who is the dev.-maintainer of fpc-OpenBSD?

There is no dedicated maintainer for the OpenBSD port.

Fred vS

  • Hero Member
  • *****
  • Posts: 3629
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #148 on: May 11, 2025, 04:32:56 pm »
Who is the dev.-maintainer of fpc-OpenBSD?

There is no dedicated maintainer for the OpenBSD port.

Thanks Sven for this very welcome response.

And what are you going to do?
DonAlfredo's patch works perfectly, so only CodeTyphon can benefit from it?

I did check _FPC_proc_haltproc() asm method for Linux x84_64 and no cxa_finalize or similar finalization is called.
Also in Delphi, the halt procedure does a abrupt termination, without any finalization.

So why calling exit vs _exit in the haltproc for OpenBSD?

Imho that  exit  (so with call to cxa_finalize) should be used only at end of FPC_proc___start

FPC, like Ariane, launches a comet every few years.
It might be interesting to follow SpaceX's method, with a new release every three months.
If there are any bugs, they will be fixed in the next release.
« Last Edit: May 11, 2025, 04:59:16 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 3629
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #149 on: May 11, 2025, 05:08:47 pm »
And here are my predictions:

Linux for desktops will soon die, assassinated by Wayland/IBM, who will destroy its initial concept of freedom.

And the most innovative candidate, the one who had the courage to resume development of X11, which is more secure for servers and will take over, is of course OpenBSD.

Amen.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

 

TinyPortal © 2005-2018