Recent

Author Topic: Moving console app from windows to arm linux  (Read 927 times)

sbk58

  • Newbie
  • Posts: 3
Moving console app from windows to arm linux
« on: October 13, 2019, 07:59:47 pm »
Hi;

I have a console app that I developed on a win64 system using Lazarus 1.8.4 and FPC 3.0.4.

When I move the project to an arm based (ARMV7A) Linux system and set the target options to match the arm Linux system the project will not compile. An error about invalid option -Rintel is thrown. When I use the project options "Show Options" indeed the -Rintel option is listed. I can not figure out where the -Rintel is coming from.

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Moving console app from windows to arm linux
« Reply #1 on: October 13, 2019, 08:15:08 pm »
You can likely remove it. It is a compiler option  to set Intel style inline assembler code. If your code does not use assembler, just remove it.
If your code does use assembler, you need to translate that to ARM assembler (totally different) or pure Pascal. The latter two are not for beginners.
« Last Edit: October 13, 2019, 08:21:10 pm by Thaddy »
Specialize a type, not a var.

sbk58

  • Newbie
  • Posts: 3
Re: Moving console app from windows to arm linux
« Reply #2 on: October 13, 2019, 09:19:16 pm »
Hi Thaddy;

The -Rintel option is not set anywhere in the project I can find . There is inline assembler but I have a different unit of code for the arm cpu. I use $IFDEF to include the correct unit for X86, x64 or Arm32.

To get the project to compile on Linux:
  1) Copy project from windows system to Linux system.
  2) Delete the .lpr and .lpi files for the project.
  3) Create a new project with the same name.
  4) Paste the contents of the original .lpr in to the new .lpr file.
  5) Finally add all of my unit search paths to the new project.

Then the project will build and run under Linux/Arm.

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: Moving console app from windows to arm linux
« Reply #3 on: October 13, 2019, 09:45:43 pm »
Ah, Rintel was in the LPI file!!!
Specialize a type, not a var.

sbk58

  • Newbie
  • Posts: 3
Re: Moving console app from windows to arm linux
« Reply #4 on: October 13, 2019, 11:06:57 pm »
Hi Thaddy;

Looked through the .lpi and could see no setting that should invoke the intel assembler option.

Next I got the project working on Linux/Arm and then copied the .lpi file to my windows system.

When I opened the project on the Windows system as expected Lazarus/Fpc complained about the target, once I set the target correctly the project built and ran on Windows.

I then deleted the project from my Linux/Arm system and copied the project from my windows system. When I opened the project on the Linux system Lazarus complained about the target, once I set the target correctly the project built and ran.

Now the project can be developed on either system and only the target needs to be set.

There must have been some setting in the .lpi that was forcing the -Rintel option but I could not find it.

Thanks....

 

TinyPortal © 2005-2018