PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Raspberry PI specific forum
PeDe
Enthusiast
Enthusiast
Posts: 313
Joined: Sun Nov 26, 2017 3:13 pm

PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by PeDe »

I use PB v6.30 beta versions with Raspberry Pi OS (Debian 13, Trixie, arm64) without any problems.
Now I wanted to use PB v6.21, but when running code in the IDE, I always get an error message.

Code: Select all

MessageRequester("Test", "Test")

;PureBasic - Assembler error
;error: implicit declaration of function 'PB_FreeGtkBase' [-Wimplicit-function-declaration]
; 341 | PB_FreeGtkBase();
Is PB v6.21 no longer compatible with Trixie?

Peter
Fred
Administrator
Administrator
Posts: 18372
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by Fred »

May be it was a bug fixed in 6.30. We didn't changed the build system for 6.30, it still build on raspberry debian 12, so it shouldn't have any impacts between 6.21 and 6.30
User avatar
mk-soft
Always Here
Always Here
Posts: 6356
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by mk-soft »

I have also installed Debian 13 (Trixie) for ARM64 on my Raspberry PI5 desktop.
PB v6.21 and PB v6.30

It works for me.

Perhaps not all required developer packages are installed. Simple Install of PureBasic ...

The WebGadget or WebViewGadget is currently not working because we need different versions of PureBasic v6.30 for Debian 12 (libwebkit2gtk-4.0-dev) and Debian 13 (libwebkit2gtk-4.1-dev).
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PeDe
Enthusiast
Enthusiast
Posts: 313
Joined: Sun Nov 26, 2017 3:13 pm

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by PeDe »

I installed everything that is possible and available according to the instructions. This did not change the error message.
I have the ‘Raspberry Pi OS Full’ version, but have not installed any other programs except Grsync and Gpartet.

Peter
PeDe
Enthusiast
Enthusiast
Posts: 313
Joined: Sun Nov 26, 2017 3:13 pm

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by PeDe »

When I disable the compiler option ‘Create threadsave executable’, I can run the code in the IDE. With the option enabled, I get the error message.

Peter
User avatar
mk-soft
Always Here
Always Here
Posts: 6356
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by mk-soft »

Stimmt.

PB v6.21:
Bug Linux C-backend Intel and ARM with ThreadSafe in PB_EndFunctions

Code: Select all

/ 
void PB_EndFunctions() {
PB_Event_Free();
PB_FreeGtkBase(); // <--- Must be PB_FreeGtkBase_THREAD();
PB_FreeObjects();
PB_FreeMemorys();
}
// 
Fixed in PB v6.30
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
mk-soft
Always Here
Always Here
Posts: 6356
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by mk-soft »

Bugfix for PB v6.21 Linux C-Backend and ThreadSafe.

Code: Select all

;-TOP by mk-soft, v1.01.1, 12.11.2025

; PB v6.21 (Debian 13) Fix C-Backend PB_FreeGtkBase over C-Macro
CompilerIf #PB_Compiler_OS = #PB_OS_Linux And #PB_Compiler_Version = 621
  CompilerIf #PB_Compiler_Thread And #PB_Compiler_Backend = #PB_Backend_C
    Procedure FixFreeGtkBaseThread()
      !#define PB_FreeGtkBase() PB_FreeGtkBase_THREAD()
    EndProcedure : FixFreeGtkBaseThread()
  CompilerEndIf
CompilerEndIf

MessageRequester("Test", "Test")
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PeDe
Enthusiast
Enthusiast
Posts: 313
Joined: Sun Nov 26, 2017 3:13 pm

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by PeDe »

Thanks, that works.
But why does ‘!#define...’ have to be in a procedure? And is the call there so that the procedure isn't optimized away?

Peter
User avatar
mk-soft
Always Here
Always Here
Posts: 6356
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by mk-soft »

PeDe wrote: Thu Nov 13, 2025 6:54 am Thanks, that works.
But why does ‘!#define...’ have to be in a procedure? And is the call there so that the procedure isn't optimized away?

Peter
It was a little tricky to ensure that the C macro was defined before PB_EndFunctions. Therefore, it was implemented as a procedure.
The call is really there to prevent it from being optimised away.
;)
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Fred
Administrator
Administrator
Posts: 18372
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by Fred »

This should work, I don't think the procedure is needed here

Code: Select all

; PB v6.21 (Debian 13) Fix C-Backend PB_FreeGtkBase over C-Macro
CompilerIf #PB_Compiler_OS = #PB_OS_Linux And #PB_Compiler_Version = 621
  CompilerIf #PB_Compiler_Thread And #PB_Compiler_Backend = #PB_Backend_C
      !#define PB_FreeGtkBase PB_FreeGtkBase_THREAD
  CompilerEndIf
CompilerEndIf
PeDe
Enthusiast
Enthusiast
Posts: 313
Joined: Sun Nov 26, 2017 3:13 pm

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by PeDe »

No, without the procedure, the error occurs again.

Peter
User avatar
mk-soft
Always Here
Always Here
Posts: 6356
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by mk-soft »

Hallo Fred,
The C macro is otherwise only defined after PB_EndFunctions. As a procedure beforehand.
See "purebasic.c" file ;)
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Fred
Administrator
Administrator
Posts: 18372
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: PBv6.21 arm64 Trixie - Assembler error 'PB_FreeGtkBase'

Post by Fred »

I see ! Or use HeaderSection from 6.30 :lol:
Post Reply