Pascal + AxRuntime

deadwood · 5030

magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #60 on: March 21, 2022, 01:49:41 AM
What I wanted to say is that this change does not affect current applications that I tested, so there is no immediate need for re-compilation. It might be just luck that applications don't access the effected fields of affected structures.
Like that, yes indeed.


Therefor it is good to know (for sure) if anything goes wrong (if at all) that there is a possible cause, especially in case the code depends on these structures.


Quote
As for second part of your question: this change was already present in AxRuntime from beginning and now its synchronized to ABIv11. It will not make it to official aros.org build - it's specific to my builds.
That is good to know as well. In case it does have issues, then a change must be made to FPC in order to support all targets.


Thank you for clearing that up !


deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #61 on: March 24, 2022, 02:41:42 AM
@magorium

I pushed an update to alt-runtime branch. It is now possible to pass command line arguments to your program when started from linux console. For this I had to change the signature of __kick_start function (https://github.com/deadw00d/AROS/blob/4ac824e890b4ed0f623e16bb30a4818c5c835066/arch/all-runtime/axrt/startup/startup.c#L107). You will also need to create empty C, Libs and S directories in your ~/.axrt/ directory or Shell will flash each time you start a program.



magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #62 on: July 04, 2022, 01:42:42 AM
@magorium

I pushed an update to alt-runtime branch. It is now possible to pass command line arguments to your program when started from linux console. For this I had to change the signature of __kick_start function (https://github.com/deadw00d/AROS/blob/4ac824e890b4ed0f623e16bb30a4818c5c835066/arch/all-runtime/axrt/startup/startup.c#L107). You will also need to create empty C, Libs and S directories in your ~/.axrt/ directory or Shell will flash each time you start a program.
Thank you for the update and sorry for the delay.

I'm still waiting for some merge requests to come through but thought i gave it another whirl nonetheless (at least the changes are in my local repo).

Upfront: i did not create the directories as instructed (i wanted to see what happens  :) ) and used a custom AXRT_ROOT which resulted for me in:
Code: [Select]
FPC1: begin
FPC1: load ax runtime library
FPC1: ax runtime library loaded successful
FPC1: Obtain ax runtime library function entries
FPC1: ax runtime library function entries obtained
FPC1: set axrt environment
FPC1: invoke kick start axrt startup entry
<<INFO>>: AxRT 41.3
<<INFO>>: Using absolute paths.
<<INFO>>: AXRT_ROOT environment variable set
<<INFO>>: RUNTIME_ROOT: /home/magorium/bin/AXRT_413/
<<INFO>>: AXRTSYS     : ROOT:home/magorium/bin/AXRT_413/
<<INFO>>: USERSYS     : ROOT:home/magorium/.axrt/
libaxrt-4.0.so: cannot open shared object file: No such file or directory
libaxrt-4.0.so: cannot open shared object file: No such file or directory
libaxrt-4.0.so: cannot open shared object file: No such file or directory
libaxrt-4.0.so: cannot open shared object file: No such file or directory
libaxrt-4.0.so: cannot open shared object file: No such file or directory
libaxrt-4.0.so: cannot open shared object file: No such file or directory
<<INFO>>: CURRENT_DIR : ROOT:home/magorium/bin/AXRT_413/work/fpc/
<<INFO>>: PROGRAM DIR : ROOT:home/magorium/bin/AXRT_413/work/fpc/
<<INFO>>: PROGRAM NAME: axrt_window
Runtime error 216 at $0000000100000000
  $0000000100000000
  $00007F705B8FE2DD
  $00007F705B8DF025
  $00007F705B8D8EEC
  $00007F706008B86E
  $00007F7060A7FFA3

Now, the question becomes is the crash more likely due to the "libaxrt-4.0.so: cannot open shared object file: No such file or directory" messages or is it more likely that something is amiss in my own code ? TIA


edit: see msg below
« Last Edit: July 04, 2022, 07:17:31 PM by magorium »



magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #63 on: July 04, 2022, 04:15:03 AM
Nevermind.

I figured it out. A combination of using the wrong version numbers and not corresponding parameterlist will get you into troubles  :-[

Sorry for the noise
« Last Edit: July 04, 2022, 07:16:46 PM by magorium »



deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 1524
    • Karma: +118/-0
Reply #64 on: July 04, 2022, 11:15:44 PM
Glad it worked out :)