./test_wayland
Connected. Calling wl_display_dispatch_pending...
dispatch_pending OK

Starting program: /tmp/demo_input 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
wlgui input demo
[wlgui] EventManager created
[xkb] libxkbcommon loaded
[xkb] context created
[wlgui] Wayland initialized
[font] sizeof(FT_FaceRec)=160 offset(glyph)=152 offset(units_per_EM)=136 offset(ascender)=138
[font] file=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf name=DejaVuSans height=20 valid=TRUE builtin=FALSE ascent=19 descent=5 units_per_EM=2048
[font] sizeof(FT_FaceRec)=160 offset(glyph)=152 offset(units_per_EM)=136 offset(ascender)=138
[font] file=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf name=DejaVuSans height=14 valid=TRUE builtin=FALSE ascent=13 descent=3 units_per_EM=2048
[wlgui] window created: "wlgui input demo" 640x480
[events] seat name: default
[events] seat capabilities=3
[events] pointer attached
[events] keyboard attached
[wlgui] 2 buffers created: 640x480 stride=2560
Fatal glibc error: tpp.c:83 (__pthread_tpp_change_priority): assertion failed: new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)

Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
⚠ warning: 44  ./nptl/pthread_kill.c: Нет такого файла или каталога
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007ffff7d1906f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
#2  0x00007ffff7cc2582 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff7caa507 in __GI_abort () at ./stdlib/abort.c:77
#4  0x00007ffff7cab540 in __libc_message_impl (vma_name=vma_name@entry=0x7ffff7e2cf7b "glibc: assert", 
    fmt=fmt@entry=0x7ffff7e31728 "Fatal glibc error: %s:%s (%s): assertion failed: %s\n") at ../sysdeps/posix/libc_fatal.c:138
#5  0x00007ffff7cbaba8 in __libc_message_wrapper (vmaname=0x7ffff7e2cf7b "glibc: assert", 
    fmt=0x7ffff7e31728 "Fatal glibc error: %s:%s (%s): assertion failed: %s\n") at ../include/stdio.h:203
#6  __libc_assert_fail (assertion=assertion@entry=0x7ffff7e329c8 "new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)", 
    file=file@entry=0x7ffff7e2e25a "tpp.c", line=line@entry=83, 
    function=function@entry=0x7ffff7e36a70 <__PRETTY_FUNCTION__.0> "__pthread_tpp_change_priority") at ./assert/__libc_assert_fail.c:31
#7  0x00007ffff7d1f5aa in __GI___pthread_tpp_change_priority (previous_prio=previous_prio@entry=-1, new_prio=new_prio@entry=0)
    at ./nptl/tpp.c:83
#8  0x00007ffff7d19f6d in __pthread_mutex_lock_full (mutex=0x7ffff7f9c428) at ./nptl/pthread_mutex_lock.c:543
#9  0x00007ffff7f57414 in wl_display_dispatch_queue_pending () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#10 0x000000000047f00d in DISPATCHWITHTIMEOUT (this=0x7ffff7f84040, ATIMEOUTMS=10) at wlgui_context.pas:180
#11 0x000000000047ff2e in PROCESSEVENTS (this=0x7ffff7f9c280) at wlgui_app.pas:199
#12 0x000000000040272d in main () at demo_input.pas:211


./test_wayland_fpc
Connected. Calling dispatch_pending...
Fatal glibc error: tpp.c:83 (__pthread_tpp_change_priority): assertion failed: new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)
Аварийный останов      ./test_wayland_fpc


./test_wayland_fpc2
Connecting...
Connected. Calling dispatch_pending...
OK


Compiling test_sched.pas
test_sched.pas(4,10) Error: Identifier not found "TSchedParam"
test_sched.pas(4,21) Error: Error in type definition
test_sched.pas(6,6) Error: Identifier not found "sched_getparam"
test_sched.pas(7,34) Error: Illegal qualifier
test_sched.pas(8,27) Error: Identifier not found "sched_getscheduler"
test_sched.pas(9,4) Fatal: There were 5 errors compiling module, stopping

pthreads, unixtype

test_sched.pas(6,6) Error: Identifier not found "sched_getparam"
test_sched.pas(8,27) Error: Identifier not found "sched_getscheduler"

fpSched_GetScheduler

./test_wayland_fpc3
Connecting...
Calling dispatch_pending...
OK




./test_wayland_fpc4
OK

first@my:/tmp$ ./test_wayland_fpc6
OK
first@my:/tmp$ ./test_wayland_fpc7
Connecting via our unit...
Calling dispatch_pending...
OK
first@my:/tmp$ ./test_wayland_fpc8
OK


fpc -B -g test_sched_param.pas 
Free Pascal Compiler version 3.2.2+dfsg-51 [2026/07/09] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling test_sched_param.pas
test_sched_param.pas(9,10) Error: Identifier not found "TSchedParam"
test_sched_param.pas(9,21) Error: Error in type definition
test_sched_param.pas(12,8) Error: Identifier not found "sched_getscheduler"
test_sched_param.pas(15,6) Error: Identifier not found "sched_getparam"
test_sched_param.pas(16,34) Error: Illegal qualifier


Starting program: /tmp/demo_input 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
wlgui input demo
[wlgui] EventManager created
[wlgui] Wayland initialized
[font] sizeof(FT_FaceRec)=160 offset(glyph)=152 offset(units_per_EM)=136 offset(ascender)=138
[font] file=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf name=DejaVuSans height=20 valid=TRUE builtin=FALSE ascent=19 descent=5 units_per_EM=2048
[font] sizeof(FT_FaceRec)=160 offset(glyph)=152 offset(units_per_EM)=136 offset(ascender)=138
[font] file=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf name=DejaVuSans height=14 valid=TRUE builtin=FALSE ascent=13 descent=3 units_per_EM=2048
[wlgui] window created: "wlgui input demo" 640x480
[events] seat name: default
[events] seat capabilities=3
[events] pointer attached
[events] keyboard attached
[wlgui] 2 buffers created: 640x480 stride=2560
*
>
>-
Fatal glibc error: tpp.c:83 (__pthread_tpp_change_priority): assertion failed: new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)

Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
⚠ warning: 44  ./nptl/pthread_kill.c: Нет такого файла или каталога
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007ffff7d1906f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
#2  0x00007ffff7cc2582 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff7caa507 in __GI_abort () at ./stdlib/abort.c:77
#4  0x00007ffff7cab540 in __libc_message_impl (vma_name=vma_name@entry=0x7ffff7e2cf7b "glibc: assert", 
    fmt=fmt@entry=0x7ffff7e31728 "Fatal glibc error: %s:%s (%s): assertion failed: %s\n") at ../sysdeps/posix/libc_fatal.c:138
#5  0x00007ffff7cbaba8 in __libc_message_wrapper (vmaname=0x7ffff7e2cf7b "glibc: assert", 
    fmt=0x7ffff7e31728 "Fatal glibc error: %s:%s (%s): assertion failed: %s\n") at ../include/stdio.h:203
#6  __libc_assert_fail (assertion=assertion@entry=0x7ffff7e329c8 "new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)", 
    file=file@entry=0x7ffff7e2e25a "tpp.c", line=line@entry=83, 
    function=function@entry=0x7ffff7e36a70 <__PRETTY_FUNCTION__.0> "__pthread_tpp_change_priority") at ./assert/__libc_assert_fail.c:31
#7  0x00007ffff7d1f5aa in __GI___pthread_tpp_change_priority (previous_prio=previous_prio@entry=-1, new_prio=new_prio@entry=0)
    at ./nptl/tpp.c:83
#8  0x00007ffff7d19f6d in __pthread_mutex_lock_full (mutex=0x7ffff7f9c428) at ./nptl/pthread_mutex_lock.c:543
#9  0x00007ffff7f57414 in wl_display_dispatch_queue_pending () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#10 0x0000000000480443 in DISPATCHWITHTIMEOUT (this=0x7ffff7f8d1c0, ATIMEOUTMS=10) at wlgui_context.pas:144
#11 0x000000000048109f in PROCESSEVENTS (this=0x7ffff7f9c280) at wlgui_app.pas:200
#12 0x00000000004025f9 in main () at demo_input.pas:211



./test_step0
Roundtrip...
dispatch_pending...
Fatal glibc error: tpp.c:83 (__pthread_tpp_change_priority): assertion failed: new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)
Аварийный останов      ./test_step0
first@my:/tmp$ ./test_step1
Roundtrip...
binding compositor
dispatch_pending...
Fatal glibc error: tpp.c:83 (__pthread_tpp_change_priority): assertion failed: new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)
Аварийный останов      ./test_step1



fpc -B -gl test_A.pas 
Free Pascal Compiler version 3.2.2+dfsg-51 [2026/07/09] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling test_A.pas
Compiling wayland_client_core.pas
Compiling wayland_util.pas
wayland_client_core.pas(83,15) Warning: An inherited method is hidden by "Dispatch:LongInt;"
Compiling wayland_protocol.pas
Compiling wayland_shared_buffer.pas
wayland_shared_buffer.pas(83,3) Note: Local variable "flags" not used
wayland_client_core.pas(229,3) Note: Local variable "flags" not used
Linking test_A
/usr/bin/x86_64-linux-gnu-ld.bfd: test_A.o: в функции «main»:
/tmp//test_A.pas:17:(.text.n_main+0x1d): undefined reference to `wl_display_connect_ext'
/usr/bin/x86_64-linux-gnu-ld.bfd: /tmp//test_A.pas:20:(.text.n_main+0x7c): undefined reference to `wl_display_dispatch_pending_ext'
/usr/bin/x86_64-linux-gnu-ld.bfd: /tmp//test_A.pas:22:(.text.n_main+0xba): undefined reference to `wl_display_disconnect_ext'
test_A.pas(23,1) Error: Error while linking
test_A.pas(23,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
first@my:/tmp$ fpc -B -gl test_B.pas 
Free Pascal Compiler version 3.2.2+dfsg-51 [2026/07/09] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling test_B.pas
Compiling wayland_util.pas
Linking test_B
/usr/bin/x86_64-linux-gnu-ld.bfd: test_B.o: в функции «main»:
/tmp//test_B.pas:17:(.text.n_main+0x1d): undefined reference to `wl_display_connect_ext'
/usr/bin/x86_64-linux-gnu-ld.bfd: /tmp//test_B.pas:20:(.text.n_main+0x7c): undefined reference to `wl_display_dispatch_pending_ext'
/usr/bin/x86_64-linux-gnu-ld.bfd: /tmp//test_B.pas:22:(.text.n_main+0xba): undefined reference to `wl_display_disconnect_ext'
test_B.pas(23,1) Error: Error while linking
test_B.pas(23,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
first@my:/tmp$ fpc -B -gl test_C.pas 
Free Pascal Compiler version 3.2.2+dfsg-51 [2026/07/09] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling test_C.pas
Linking test_C
/usr/bin/x86_64-linux-gnu-ld.bfd: test_C.o: в функции «main»:
/tmp//test_C.pas:17:(.text.n_main+0x1d): undefined reference to `wl_display_connect_ext'
/usr/bin/x86_64-linux-gnu-ld.bfd: /tmp//test_C.pas:19:(.text.n_main+0x4b): undefined reference to `wl_display_dispatch_pending_ext'
/usr/bin/x86_64-linux-gnu-ld.bfd: /tmp//test_C.pas:21:(.text.n_main+0x89): undefined reference to `wl_display_disconnect_ext'
test_C.pas(22,1) Error: Error while linking
test_C.pas(22,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode


./test_wayland_fpc2
Connecting...
Connected. Calling dispatch_pending...
OK

./test_A
connecting
calling dispatch_pending
OK

first@my:/tmp$ ./test_B
calling
OK

first@my:/tmp$ ./test_C
OK






./test_E
connecting
calling
OK
first@my:/tmp$ ./test_F
OK
first@my:/tmp$ ./test_G
OK
first@my:/tmp$ ./test_H
OK
first@my:/tmp$ ./test_I
OK


./test_J
Step 1: TWlDisplay.Connect
Step 2: Roundtrip
Step 3: dispatch_pending
Fatal glibc error: tpp.c:83 (__pthread_tpp_change_priority): assertion failed: new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)
Аварийный останов      ./test_J
first@my:/tmp$ ./test_K
Step 1: TWlDisplay.Connect
Step 2: dispatch_pending
Fatal glibc error: tpp.c:83 (__pthread_tpp_change_priority): assertion failed: new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)
Аварийный останов      ./test_K
first@my:/tmp$ ./test_L
Roundtrip
dispatch_pending
OK



Starting program: /tmp/test_J 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/x86_64-linux-gnu/libthread_db.so.1".
Step 1: TWlDisplay.Connect
Step 2: Roundtrip
Step 3: dispatch_pending
Fatal glibc error: tpp.c:83 (__pthread_tpp_change_priority): assertion failed: new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)

Program received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
⚠ warning: 44  ./nptl/pthread_kill.c: Нет такого файла или каталога
(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007ffff7df006f in __pthread_kill_internal (threadid=<optimized out>, signo=6) at ./nptl/pthread_kill.c:89
#2  0x00007ffff7d99582 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007ffff7d81507 in __GI_abort () at ./stdlib/abort.c:77
#4  0x00007ffff7d82540 in __libc_message_impl (vma_name=vma_name@entry=0x7ffff7f03f7b "glibc: assert", 
    fmt=fmt@entry=0x7ffff7f08728 "Fatal glibc error: %s:%s (%s): assertion failed: %s\n") at ../sysdeps/posix/libc_fatal.c:138
#5  0x00007ffff7d91ba8 in __libc_message_wrapper (vmaname=0x7ffff7f03f7b "glibc: assert", 
    fmt=0x7ffff7f08728 "Fatal glibc error: %s:%s (%s): assertion failed: %s\n") at ../include/stdio.h:203
#6  __libc_assert_fail (assertion=assertion@entry=0x7ffff7f099c8 "new_prio == -1 || (new_prio >= fifo_min_prio && new_prio <= fifo_max_prio)", 
    file=file@entry=0x7ffff7f0525a "tpp.c", line=line@entry=83, 
    function=function@entry=0x7ffff7f0da70 <__PRETTY_FUNCTION__.0> "__pthread_tpp_change_priority") at ./assert/__libc_assert_fail.c:31
#7  0x00007ffff7df65aa in __GI___pthread_tpp_change_priority (previous_prio=previous_prio@entry=-1, new_prio=new_prio@entry=0)
    at ./nptl/tpp.c:83
#8  0x00007ffff7df0f6d in __pthread_mutex_lock_full (mutex=0x7ffff7f9c368) at ./nptl/pthread_mutex_lock.c:543
#9  0x00007ffff7f57414 in wl_display_dispatch_queue_pending () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#10 0x000000000040152d in main () at test_J.pas:17


ldd ./test_J
ldd ./test_L


first@my:/tmp$ ldd ./test_J
        linux-vdso.so.1 (0x00007f3039134000)
        libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f30390b6000)
        libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007f3038ebe000)
        libffi.so.8 => /usr/lib/x86_64-linux-gnu/libffi.so.8 (0x00007f3038ea6000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3039136000)
first@my:/tmp$ ldd ./test_L
        linux-vdso.so.1 (0x00007f8abd024000)
        libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f8abcfa6000)
        libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007f8abcdae000)
        libffi.so.8 => /usr/lib/x86_64-linux-gnu/libffi.so.8 (0x00007f8abcd96000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8abd026000)
