Welcome, Guest
Username: Password: Remember me

TOPIC: GTK2 ScrollBar CrossCompile for ARM

GTK2 ScrollBar CrossCompile for ARM 1 year 4 months ago #3449

  • halmariane
  • halmariane's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
  • Karma: 0
Hi to everybody.

This is my first post.

I have CorssCompiled one simple form application for ARM-Linux with CodeTyphon 4.10.

In a form i drop one scrollbar without any behind code. When the application is executed in the host system(x86-64) works as expected. If i crosscompile the application from x86-64 to ARM then one SIGSEV crash is in the unit gtk2callback.inc only when the scrollbar is clicked:
function Gtk2RangeScrollCB(ARange: PGtkRange; AScrollType: TGtkScrollType; AValue: gdouble; AWidgetInfo: PWidgetInfo): gboolean; cdecl;

AWidgetInfo^.LCLObject is an invalid object. This is the reason of the fail. This problem has been reported to http://forum.lazarus.freepascal.org/index.php/topic,20129.0.html also.

If the application is compiled in the ARM system then works as expected also. The problem with the scrollbar is only if the application is crosscompiled. I have tested the application with GNU toolchain externally to CodeTyphon and the problem persists.

This is a hard problem.

Some erudite please ??
Last Edit: 1 year 4 months ago by halmariane.
The administrator has disabled public write access.

GTK2 ScrollBar CrossCompile for ARM 1 year 4 months ago #3464

  • halmariane
  • halmariane's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
  • Karma: 0
Problem Solved


forum.lazarus.freepascal.org/index.php/topic,19827.15.html

The problem was the compiler options and for this reason errors in the calling conventions.

Regards
The administrator has disabled public write access.
The following user(s) said Thank You: avra

GTK2 ScrollBar CrossCompile for ARM 1 year 4 months ago #3465

  • fredycc
  • fredycc's Avatar
  • OFFLINE
  • Junior Boarder
  • Database/Developer
  • Posts: 49
  • Thank you received: 9
  • Karma: 2
:cheer: great news
the script must be modified on other parts more of the script

Can you suggest the modifications you made for future reference?

please.

thanks
The administrator has disabled public write access.

GTK2 ScrollBar CrossCompile for ARM 1 year 4 months ago #3496

  • halmariane
  • halmariane's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 1
  • Karma: 0
Yes, the script mus be modified in all "make" instructions in their respective OS script. For example in linux could be ln_FPCx_Build_Cross.sh for arm.

Regards
Last Edit: 1 year 4 months ago by halmariane.
The administrator has disabled public write access.

GTK2 ScrollBar CrossCompile for ARM 10 months 4 days ago #4529

  • emailadd
  • emailadd's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
I built an app for raspberry pi using CT 4.5. The app had a scrollbar. Basically, the app was working on the raspberry pi, but the app crashed if I changed the scrollbar.

It looks like this thread is the solution.

Would you teach me how to avoid the app crash when the scrollbar is changed?
Last Edit: 10 months 4 days ago by emailadd.
The administrator has disabled public write access.

GTK2 ScrollBar CrossCompile for ARM 6 months 3 weeks ago #4989

  • DonAlfredo
  • DonAlfredo's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Karma: 0
I had the same problem !!

Please look at:
forum.lazarus.freepascal.org/index.php/topic,23075.0.html
reply #27 and #30

In short:
Make the following changes to the script "x_FPC_Build_Cross.bat" inside "ScriptsWin/Crossbuild":

Inside Stage 1:
START /D C:\codetyphon\fpcsrc\ /B /WAIT C:\codetyphon\fpc\bin\%2\make.exe all CPU_TARGET=%4 OS_TARGET=%5 BINUTILSPREFIX=%4-%5- OPT="-dFPC_ARMHF" FPC=%3.exe

Inside stage 2:
START /D C:\codetyphon\fpcsrc\ /B /WAIT C:\codetyphon\fpc\bin\%2\make.exe -C rtl clean CPU_TARGET=%4 OS_TARGET=%5 BINUTILSPREFIX=%4-%5- OPT="-dFPC_ARMHF" FPC=%6.exe
START /D C:\codetyphon\fpcsrc\ /B /WAIT C:\codetyphon\fpc\bin\%2\make.exe -C packages clean CPU_TARGET=%4 OS_TARGET=%5 BINUTILSPREFIX=%4-%5- OPT="-dFPC_ARMHF" FPC=%6.exe
START /D C:\codetyphon\fpcsrc\ /B /WAIT C:\codetyphon\fpc\bin\%2\make.exe rtl packages CPU_TARGET=%4 OS_TARGET=%5 BINUTILSPREFIX=%4-%5- OPT="-dFPC_ARMHF" FPC=%6.exe

As you can see, in fact, 4 very simple changes: add OPT="-dFPC_ARMHF" to enable hardfloat.
(I use Arch Linux hardfloat for the BBB).

Also include "-dFPC_ARMHF" in your project options (Compiler Options / Other / Custom options).
The administrator has disabled public write access.
Time to create page: 0.161 seconds