Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Someone interested in porting my project to linux



Permlink Replies: 5 - Last Post: Nov 1, 2017 3:59 PM Last Post By: William Cantrall
Michael Rabatsc...

Posts: 125
Registered: 1/22/07
Someone interested in porting my project to linux
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 18, 2017 4:24 AM
Hi Folks!

I started to support Linux in my matrix library "mrmath" and finally got a working CodeTyphoon (64bit FreePascal)
solution for the package as well as the main unit test project.
Unfortunately I have no Delphi Linux compiler so I wanted to ask the community to help me out here a bit
to create a Delphi Linux package and a Linux test project (only in case the DUnit stuff is available there too).

Any help would be greatly appreaceated :)

You can find the project on
https://github.com/mikerabat/mrmath

kind regards
Mike
Arnaud Bouchez

Posts: 137
Registered: 8/2/15
Re: Someone interested in porting my project to linux
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 18, 2017 5:11 AM   in response to: Michael Rabatsc... in response to: Michael Rabatsc...
I won't use the Delphi for Linux compiler, since the FPC one does a pretty good job for me, and don't request ARC - so I wouldn't help for your request.

Out of curiosity, why did you write:
{$IFDEF FPC}
begin
{$ENDIF}
     asm
...

Under FPC, you can write plain "asm" functions: no begin...end is needed.

A second note: you should better use an included file to set the conditional directives and write for instance:
  {$I mrmath.inc}

at the beginning of the source code files.

Keep up the good work!
Michael Rabatsc...

Posts: 125
Registered: 1/22/07
Re: Someone interested in porting my project to linux
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 18, 2017 5:36 AM   in response to: Arnaud Bouchez in response to: Arnaud Bouchez
Am 18.08.2017 um 14:11 schrieb Arnaud Bouchez:
I won't use the Delphi for Linux compiler, since the FPC one does a pretty good job for me, and don't request ARC - so I wouldn't help for your request.

Out of curiosity, why did you write:
{$IFDEF FPC}
begin
{$ENDIF}
     asm
...

Under FPC, you can write plain "asm" functions: no begin...end is needed.

Oh really? I tried that but it didn't work out for me... hm... I always
get the error: "Syntax error, "Begin" expected but "ASM" found"...


A second note: you should better use an included file to set the conditional directives and write for instance:
  {$I mrmath.inc}

I know it would make things a bit shorter and eventually it's better
but I had once troubles with inc files (same names actually) so I
decided to completly avoid it...

Another benefit of the inc file could be to create some kind of makros
for e.g. fused multiply and add operations which are not supported
within the delphi assembler... but this still needs some research on my
side ;)

kind regards
Mike

at the beginning of the source code files.

Keep up the good work!
Arnaud Bouchez

Posts: 137
Registered: 8/2/15
Re: Someone interested in porting my project to linux
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 18, 2017 7:11 AM   in response to: Michael Rabatsc... in response to: Michael Rabatsc...
Michael Rabatscher wrote:
Oh really? I tried that but it didn't work out for me... hm... I always
get the error: "Syntax error, "Begin" expected but "ASM" found"...

Ensure you have the following conditional - in your .inc file:
{$ifdef FPC}
    {$MODE DELPHI} 
...


In fact, I wrote something like this in https://github.com/synopse/mORMot/blob/master/Synopse.inc :
{$ifdef FPC}
    {$MODE DELPHI} 
  {$ifdef CPU64}
    {$ifdef CPUX64}
      {$define CPUINTEL}
      {$ASMMODE INTEL} // as Delphi expects
    {$endif CPUX64}
  {$else}
    {$ifdef CPUX86}
      {$define CPUINTEL}
      {$ASMMODE INTEL} // as Delphi expects
    {$endif CPUX86}
  {$endif CPU64}
    ...
{$endif}
Michael Rabatsc...

Posts: 125
Registered: 1/22/07
Re: Someone interested in porting my project to linux
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 20, 2017 11:36 PM   in response to: Arnaud Bouchez in response to: Arnaud Bouchez
Hi Arnaud!

Ensure you have the following conditional - in your .inc file:
{code}
{$ifdef FPC}
{$MODE DELPHI}

Thanks!! That actualy works great - I didn't knew that switch :)

kind regards
Mike
William Cantrall

Posts: 1
Registered: 8/2/98
Re: Someone interested in porting my project to linux
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 1, 2017 3:59 PM   in response to: Michael Rabatsc... in response to: Michael Rabatsc...
Hi Mike,
It's Bill Cantrall again, (MacOS port) and I actually have a request for producing a linux library for some of my stuff that uses your library, and I do just now have the Rad studio 10.2 Delphi Linux compiler, and have your latest library and source.
So I am eager to help any way I can. And any guidance you can provide would be appreciated. I will send you this from my email address as well.
Bill
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02