Recent

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

TCH

  • Full Member
  • ***
  • Posts: 242
    • Oldschool computer
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #45 on: June 12, 2024, 07:35:36 pm »
I see. Good to know, thanks.

In the meantime i tried to check if Lazarus needs GTK or not: objdump -x startlazarus | grep ' NEEDED '
Code: [Select]
  NEEDED      libiconv.so.7.1
  NEEDED      libpthread.so.27.1
  NEEDED      libgdk-x11-2.0.so.2400.0
  NEEDED      libgtk-x11-2.0.so.2400.0
  NEEDED      libX11.so.18.0
  NEEDED      libgdk_pixbuf-2.0.so.3200.3
  NEEDED      libgobject-2.0.so.4200.18
  NEEDED      libglib-2.0.so.4201.11
  NEEDED      libgthread-2.0.so.4200.18
  NEEDED      libgmodule-2.0.so.4200.18
  NEEDED      libpango-1.0.so.3801.4
  NEEDED      libcairo.so.13.4
  NEEDED      libatk-1.0.so.21810.1
  NEEDED      libc.so.99.0
objdump -x lazarus | grep ' NEEDED '
Code: [Select]
  NEEDED      libpthread.so.27.1
  NEEDED      libiconv.so.7.1
  NEEDED      libgdk-x11-2.0.so.2400.0
  NEEDED      libgtk-x11-2.0.so.2400.0
  NEEDED      libX11.so.18.0
  NEEDED      libgdk_pixbuf-2.0.so.3200.3
  NEEDED      libgobject-2.0.so.4200.18
  NEEDED      libglib-2.0.so.4201.11
  NEEDED      libgthread-2.0.so.4200.18
  NEEDED      libgmodule-2.0.so.4200.18
  NEEDED      libpango-1.0.so.3801.4
  NEEDED      libcairo.so.13.4
  NEEDED      libatk-1.0.so.21810.1
  NEEDED      libpangocairo-1.0.so.3801.3
  NEEDED      libc.so.99.0
Neither gtk3, nor harfbuzz. So the problem might be between pango and harfbuzz, or gtk2 and harfbuzz and not even in Lazarus.

Fred vS

  • Hero Member
  • *****
  • Posts: 3256
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #46 on: June 13, 2024, 06:11:20 am »
Hello.

I did have problems with fpc release 3.2.2 from sourceforge on OpenBSD 7.5.

The trick is to create 2 symlinks:

Code: Bash  [Select][+][-]
  1. # su -
  2. # ln -s /usr/lib/libpthread.so.27.1 /usr/lib/libpthread.so.26.1
  3. # ln -s /usr/lib/libc.so.99.0 /usr/lib/libc.so.96.0

And install fpc from:
https://sourceforge.net/projects/freepascal/files/OpenBSD/3.2.2/

I used "bash" to run the script

Install bash + run install:
Code: Bash  [Select][+][-]
  1. # pkg_add bash
  2. # cd /directory/of/fpc-install
  3. # bash install.sh

To compile the source of fpc I used this script :
Code: Pascal  [Select][+][-]
  1. #!/bin/sh
  2. COMPILER=/usr/local/lib/fpc/3.2.2/ppcx64
  3. gmake clean
  4. gmake all FPC=$COMPILER OPT="-Fl/usr/local/lib"
  5. gmake FPC=$COMPILER install INSTALL_PREFIX=/usr/local/

MSEide-MSEgui + fpc 3.2.2 work perfectly on OpenBSD 7.5 (see picture).
I did not try yet to compile Lazarus but if dependencies are missing, you may check with "find" the libraries missing

Code: Bash  [Select][+][-]
  1. # find /usr -name  libiconv.so.*

And create a link with the correspondent so number.

I hope it helps.

Fre;D
« Last Edit: June 13, 2024, 06:33:57 am 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

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11655
  • FPC developer.
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #47 on: June 13, 2024, 11:47:54 am »
Fred: can you get fixes to work too? It would shed some light in all the confusion.

TCH

  • Full Member
  • ***
  • Posts: 242
    • Oldschool computer
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #48 on: June 13, 2024, 12:47:12 pm »
Fred: Thanks for the tips. It is interesting, it seems i have multiple versions of both libraries.
ls /usr/lib | grep libpthread.so:
Code: [Select]
-r--r--r--  1 root  bin      121184 Apr 12  2022 libpthread.so.26.1
-r--r--r--  1 root  bin      121184 Sep 27  2022 libpthread.so.26.2
-r--r--r--  1 root  bin      121832 Mar 25  2023 libpthread.so.27.0
-r--r--r--  1 root  bin      124200 Mar 20 22:16 libpthread.so.27.1
ls /usr/lib | grep libc.so
Code: [Select]
-r--r--r--  1 root  bin     3617008 Nov 26  2022 libc.so.96.1
-r--r--r--  1 root  bin     3615112 Apr 22  2023 libc.so.96.2
-r--r--r--  1 root  bin     3645384 Dec 24 15:59 libc.so.97.0
-r--r--r--  1 root  bin     3680832 Jun 10 19:00 libc.so.97.1
-r--r--r--  1 root  bin     3702088 Jun 13 14:20 libc.so.99.0
/usr/lib/libc.so.96.0 did not exist, so i've made the symlink you've suggested. /usr/lib/libpthread.so.26.1 was already there, so first, i've tried to compile the fixed 3.2.2 with just the first symlink. Still crashed. Then i've backed up the original pthread lib and then made the symlink. The compilation still crashed. Also objdump -x /usr/bin/ppcx64 | grep ' NEEDED ' reported only libc:
Code: [Select]
  NEEDED      libc.so.96.0Weird that it ran with that dependency missing (before i've made the symlink).

Lazarus compiles here, there are no missing dependencies, it is just crashing at start, because of harfbuzz.

TCH

  • Full Member
  • ***
  • Posts: 242
    • Oldschool computer
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #49 on: June 13, 2024, 01:55:16 pm »
I tried to step further after the SIGFPE. startlazarus:
Code: [Select]
[?1034hGNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd7.5"...
(gdb) run
Starting program: /tmp/lazarus/startlazarus
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]

Program received signal SIGFPE, Arithmetic exception.
0x000004ece859c39b in hb_font_t::mults_changed () from /usr/local/lib/libharfbuzz.so.18.7
(gdb) step
Single stepping until exit from function _ZN9hb_font_t13mults_changedEv,
which has no line number information.

(startlazarus:90838): GLib-GObject-CRITICAL **: 15:51:00.795: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Program received signal SIGSEGV, Segmentation fault.
0x000004ed991c9768 in signal_emit_unlocked_R.123 () from /usr/local/lib/libgobject-2.0.so.4200.18
(gdb) step
Single stepping until exit from function signal_emit_unlocked_R.123,
which has no line number information.
Die: DW_TAG_set_type (abbrev = 36, offset = 3065644)
has children: FALSE
attributes:
DW_AT_name (DW_FORM_string) string: "TCOMPONENTSTATE"
DW_AT_byte_size (DW_FORM_data2) constant: 4
DW_AT_type (DW_FORM_ref4) constant ref: 3065667 (adjusted)
Dwarf Error: Cannot find type of die [in module /tmp/lazarus/startlazarus]
(gdb) step
Die: DW_TAG_set_type (abbrev = 36, offset = 3065644)
has children: FALSE
attributes:
DW_AT_name (DW_FORM_string) string: "TCOMPONENTSTATE"
DW_AT_byte_size (DW_FORM_data2) constant: 4
DW_AT_type (DW_FORM_ref4) constant ref: 3065667 (adjusted)
Dwarf Error: Cannot find type of die [in module /tmp/lazarus/startlazarus]
(gdb) quit
The program is running.  Exit anyway? (y or n)
lazarus
Code: [Select]
[?1034hGNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd7.5"...
(gdb) run
Starting program: /tmp/lazarus/lazarus
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]

Program received signal SIGFPE, Arithmetic exception.
0x00000e3d7d8c439b in hb_font_t::mults_changed () from /usr/local/lib/libharfbuzz.so.18.7
(gdb) step
Single stepping until exit from function _ZN9hb_font_t13mults_changedEv,
which has no line number information.

(lazarus:63295): GLib-GObject-CRITICAL **: 15:52:21.185: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Program received signal SIGSEGV, Segmentation fault.
0x00000e3d00d46768 in signal_emit_unlocked_R.123 () from /usr/local/lib/libgobject-2.0.so.4200.18
(gdb) step
Single stepping until exit from function signal_emit_unlocked_R.123,
which has no line number information.
Die: DW_TAG_set_type (abbrev = 36, offset = 6462400)
has children: FALSE
attributes:
DW_AT_name (DW_FORM_string) string: "TCOMPONENTSTATE"
DW_AT_byte_size (DW_FORM_data2) constant: 4
DW_AT_type (DW_FORM_ref4) constant ref: 6462423 (adjusted)
Dwarf Error: Cannot find type of die [in module /tmp/lazarus/lazarus]
(gdb) step
Die: DW_TAG_set_type (abbrev = 36, offset = 6462400)
has children: FALSE
attributes:
DW_AT_name (DW_FORM_string) string: "TCOMPONENTSTATE"
DW_AT_byte_size (DW_FORM_data2) constant: 4
DW_AT_type (DW_FORM_ref4) constant ref: 6462423 (adjusted)
Dwarf Error: Cannot find type of die [in module /tmp/lazarus/lazarus]
(gdb) quit
The program is running.  Exit anyway? (y or n)
I also built an empty project on OpenBSD 7.4 with Lazarus 2.2.6, but with debug information. Then i tried to run that on OpenBSD 7.5:
Code: [Select]
[?1034hGNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd7.5"...
(gdb) run
Starting program: /root/project1
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]
Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /usr/libexec/ld.so]

Program received signal SIGFPE, Arithmetic exception.
0x00000e0cbd24c39b in hb_font_t::mults_changed () from /usr/local/lib/libharfbuzz.so.18.7
(gdb) step
Single stepping until exit from function _ZN9hb_font_t13mults_changedEv,
which has no line number information.

(project1:30649): GLib-GObject-CRITICAL **: 15:55:31.918: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Program received signal SIGSEGV, Segmentation fault.
0x00000e0cda9bd768 in signal_emit_unlocked_R.123 () from /usr/local/lib/libgobject-2.0.so.4200.18
(gdb) step
Single stepping until exit from function signal_emit_unlocked_R.123,
which has no line number information.
[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $00000E0CDA9BD768
  $00000E0CDA9BB80E
  $00000E0CDA9BC02F
  $00000E0D9826DDCE
  $00000E0CDA9A744D
  $00000E0D9826C226
  $00000E0A9B0D8BD2  FREESTYLEOBJECT,  line 7715 of gtk2proc.inc
  $00000E0A9B0D8CF7  RELEASEALLSTYLES,  line 7742 of gtk2proc.inc
  $00000E0A9AF395F1  FREEALLSTYLES,  line 1650 of gtk2widgetset.inc
  $00000E0A9AF396FF  GTK2DESTROY,  line 1712 of gtk2widgetset.inc
  $00000E0A9AF380AF  DESTRODie: DW_TAG_set_type (abbrev = 36, offset = 1173321)
has children: FALSE
attributes:
DW_AT_name (DW_FORM_string) string: "TCOMPONENTSTATE"
DW_AT_byte_size (DW_FORM_data2) constant: 4
DW_AT_type (DW_FORM_ref4) constant ref: 1173344 (adjusted)
Dwarf Error: Cannot find type of die [in module /root/project1]
(gdb) step
Die: DW_TAG_set_type (abbrev = 36, offset = 1173321)
has children: FALSE
attributes:
DW_AT_name (DW_FORM_string) string: "TCOMPONENTSTATE"
DW_AT_byte_size (DW_FORM_data2) constant: 4
DW_AT_type (DW_FORM_ref4) constant ref: 1173344 (adjusted)
Dwarf Error: Cannot find type of die [in module /root/project1]
(gdb) step
Die: DW_TAG_set_type (abbrev = 36, offset = 1173321)
has children: FALSE
attributes:
DW_AT_name (DW_FORM_string) string: "TCOMPONENTSTATE"
DW_AT_byte_size (DW_FORM_data2) constant: 4
DW_AT_type (DW_FORM_ref4) constant ref: 1173344 (adjusted)
Dwarf Error: Cannot find type of die [in module /root/project1]
(gdb) quit
The program is running.  Exit anyway? (y or n)

Fred vS

  • Hero Member
  • *****
  • Posts: 3256
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #50 on: June 13, 2024, 02:18:24 pm »
Fred: can you get fixes to work too? It would shed some light in all the confusion.

Hello Marco.

I downloaded source of fpc fixes from there:
https://gitlab.com/freepascal.org/fpc/source/-/tree/fixes_3_2?ref_type=heads

And compiled with the script from my previous post:
Code: Bash  [Select][+][-]
  1.     #!/bin/sh
  2.     COMPILER=/usr/local/lib/fpc/3.2.2/ppcx64
  3.     gmake clean
  4.     gmake all FPC=$COMPILER OPT="-Fl/usr/local/lib"
  5.     gmake FPC=$COMPILER install INSTALL_PREFIX=/usr/local/

Sadly the compilation failed, see picture.
But I did not found yet problems using fpc 3.2.2 for all my fpc-msegui applications. (only for the compilation of fpc himself with last fixes).

[EDIT] The fpc-msegui apps compiled on previous release of OpenBSD work on OpenBSD 7.5.
           But apps compiled on OpenBSD 7.5 does not run anymore.  :(
« Last Edit: June 13, 2024, 05:28: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

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11655
  • FPC developer.
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #51 on: June 13, 2024, 02:40:03 pm »
Thank you. I can't really see any differences in OpenBSD specific parts since 3.2.2, so either it is something global and new (but then I would have encountered it with FreeBSD?), or 3.2.2 was modified while release building, or works because linked to older libs.

Fred vS

  • Hero Member
  • *****
  • Posts: 3256
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #52 on: June 13, 2024, 02:59:51 pm »
Thank you. I can't really see any differences in OpenBSD specific parts since 3.2.2, so either it is something global and new (but then I would have encountered it with FreeBSD?), or 3.2.2 was modified while release building, or works because linked to older libs.

I don't see it either.
Note that OpenBSD is developing its own libc version (all other Unix operating systems use "official with symbol table" libc.so.6 and OpenBSD uses its own libc.so.99.0 at the moment).
I guess they abandoned the great magic feature of the signed symbol table which ensures perfect backwards compatibility but of course requires a lot more work than just creating a library with a new so number (without a symbol table signed, I find it a sad idea)
But I don't know if that could be a problem.
OpenBSD is also developing its own libX11 version (they don't trust Wayland and prefer to keep updating-upgrading X11, I find it a excellent idea).
« Last Edit: June 13, 2024, 03:18:08 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

dsiders

  • Hero Member
  • *****
  • Posts: 1180
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #53 on: June 13, 2024, 03:30:48 pm »
OpenBSD is also developing its own libX11 version (they don't trust Wayland and prefer to keep updating-upgrading X11, I find it a excellent idea).

Having used Wayland for over a month, I can only question the distros that are pushing it as "the" replacement for X11. Too many things don't work... by design. But hey, they're great at writing specs that other people have to deal with.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

Fred vS

  • Hero Member
  • *****
  • Posts: 3256
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #54 on: June 13, 2024, 03:38:50 pm »
OpenBSD is also developing its own libX11 version (they don't trust Wayland and prefer to keep updating-upgrading X11, I find it a excellent idea).

Having used Wayland for over a month, I can only question the distros that are pushing it as "the" replacement for X11. Too many things don't work... by design. But hey, they're great at writing specs that other people have to deal with.

https://gist.github.com/probonopd/9feb7c20257af5dd915e3a9f2d1f2277
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: 3256
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #55 on: June 13, 2024, 10:32:14 pm »
Using the crosscompiler fpc 3.2.2 of fpcupdeluxe linux-amd64 to openbsd-amd64 gives working apps under OpenBSD 7.5.

But using the release version of fpc 3.2.2 on OpenBSD 7.5. and compiling this:
Code: Pascal  [Select][+][-]
  1. program test1;
  2. begin
  3. // Nothing!
  4. end.

The compilation is ok but at running with gdb (or without) there is that error: (see picture).
« Last Edit: June 13, 2024, 10:36:17 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

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11655
  • FPC developer.
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #56 on: June 13, 2024, 10:46:31 pm »
Could you run "ldd" on those binaries to see to which libraries they were linked ?

Fred vS

  • Hero Member
  • *****
  • Posts: 3256
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #57 on: June 13, 2024, 10:59:15 pm »
Could you run "ldd" on those binaries to see to which libraries they were linked ?

Sure. The result of the empty program of previous post is:
/usr/lib/libc.so.99.0 and /usr/libexec/ld.so (see picture).

[EDIT] Working application compiled with fpcupdeluxe needs this:
/usr/lib/libc.so.96.0

Strange that it work with a link to .so.99 (I did it) but does not work with direct to so.99.
« Last Edit: June 13, 2024, 11:11: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

TCH

  • Full Member
  • ***
  • Posts: 242
    • Oldschool computer
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #58 on: June 14, 2024, 05:28:04 pm »
Using the crosscompiler fpc 3.2.2 of fpcupdeluxe linux-amd64 to openbsd-amd64 gives working apps under OpenBSD 7.5.
Can you please tell me where can i download this Linux-OpenBSD crosscompiler? Here i only can download a native OpenBSD version, which does not work on my OpenBSD at all. Instead of printing the help or compilation results, i got only this line:
Code: [Select]
(ppcx64:37545): GLib-GObject-CRITICAL **: 19:27:54.402: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

Fred vS

  • Hero Member
  • *****
  • Posts: 3256
    • StrumPract is the musicians best friend
Re: Building Lazarus 3.4 with FreePascal 3.2.2 fails under OpenBSD 7.5
« Reply #59 on: June 14, 2024, 06:12:33 pm »
Using the crosscompiler fpc 3.2.2 of fpcupdeluxe linux-amd64 to openbsd-amd64 gives working apps under OpenBSD 7.5.
Can you please tell me where can i download this Linux-OpenBSD crosscompiler? Here i only can download a native OpenBSD version, which does not work on my OpenBSD at all. Instead of printing the help or compilation results, i got only this line:
Code: [Select]
(ppcx64:37545): GLib-GObject-CRITICAL **: 19:27:54.402: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

I used the previous release of fpcupdeluxe (new dont have yet OpenBSD amd64 cross-comp):
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.4.0d
[EDIT] Just tested the last release of fpcupdeluxe and it has the OpenBSD cross-compiler.

But I only tried with (complicated) MSEgui apps, I did not try for Lazarus apps.
MSEgui apps link only few libs.
Code: Pascal  [Select][+][-]
  1. $ objdump -x ideU | grep ' NEEDED '
  2.   NEEDED               libpthread.so.26.2
  3.   NEEDED               libX11.so.18.6
  4.   NEEDED               libiconv.so.7.1
  5.   NEEDED               libm.so.10.1
  6.   NEEDED               libc.so.96.2

The cross-compilation is ok but to run it on OpenBSD 7.5, I needed to add the symlinks, as explained in previous post:
Code: Pascal  [Select][+][-]
  1. # ln -s /usr/lib/libpthread.so.27.1 /usr/lib/libpthread.so.26.1
  2. # ln -s /usr/lib/libc.so.99.0 /usr/lib/libc.so.96.2

And also add symlinks to the new installed version of libX11, libiconv, libm.so.10.1 and libc, conforming the needed libs.
Of course it is only a workaround before some fpc fixes.
« Last Edit: June 14, 2024, 10:37:49 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

 

TinyPortal © 2005-2018