Welcome, Guest
Username: Password: Remember me
CodeTyphon Cross-Build Development, discussions and problems
  • Page:
  • 1

TOPIC:

GTK2 ScrollBar CrossCompile for ARM 11 years 8 months ago #3449

  • Juanjo
  • Juanjo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 15
  • Thank you received: 1
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 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 ??

Please Log in or Create an account to join the conversation.

Last edit: by Juanjo.

GTK2 ScrollBar CrossCompile for ARM 11 years 8 months ago #3464

  • Juanjo
  • Juanjo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 15
  • Thank you received: 1
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

Please Log in or Create an account to join the conversation.

GTK2 ScrollBar CrossCompile for ARM 11 years 8 months ago #3465

  • FredyCC
  • FredyCC's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Database/Developer
  • Posts: 60
  • Thank you received: 10
: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

Please Log in or Create an account to join the conversation.

GTK2 ScrollBar CrossCompile for ARM 11 years 8 months ago #3496

  • Juanjo
  • Juanjo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 15
  • Thank you received: 1
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

Please Log in or Create an account to join the conversation.

Last edit: by Juanjo.

GTK2 ScrollBar CrossCompile for ARM 11 years 1 month ago #4529

  • chulwoong
  • chulwoong's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 15
  • Thank you received: 2
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?

Please Log in or Create an account to join the conversation.

Last edit: by chulwoong.

GTK2 ScrollBar CrossCompile for ARM 10 years 10 months ago #4989

  • Alfred
  • Alfred's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 21
  • Thank you received: 5
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).

Please Log in or Create an account to join the conversation.

  • Page:
  • 1