Cross-compiling old SAS/C 6.59 with amiga-gcc on Ubuntu 18

johnhkc · 492

johnhkc

  • Newbie
  • *
    • Posts: 1
    • Karma: +0/-0
Recently, I thought it would be fun to resume work on an old Amiga IDE I started building in 1997.  So I dusted off my old source code, found out I lost a bunch of it, what's left is totally disorganized.  Anyway, I installed amiga-gcc using the instructions at https://franke.ms/amiga/gdb8.wiki

I'm using Eclipse 2021-09 (4.21.0) on Ubuntu 18.04, 64-bit.
The application uses MUI 3.8 and is written 100% in C using OS APIs (and MUI).

I'm getting some weird errors:
array of inappropriate type initialized from string constant
   line 101, external location: /home/john/amigadev/MUI/C/include/inline/muimaster.h
excess elements in struct initializer
   line 194, external location: /home/john/amigadev/MUI/C/include/libraries/mui.h
expected identifier or '(' before '__asm'
   common.h   line 105
   common.h line 105 is: #define ASM    __asm

When I installed, the compiler needed libmpfr.so.4 so I did:
   sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4
which resolved the problem.  Or did it?

Oh, also: I'm missing #include <dos.h>
I have <dos/dos.h> but isn't there a dos.h from SAS that's different from the OS's dos.h?



amigamia

  • Junior Member
  • **
    • Posts: 77
    • Karma: +45/-0
    • AROS World
Reply #1 on: November 07, 2021, 03:02:33 AM
Recently, I thought it would be fun to resume work on an old Amiga IDE I started building in 1997.  So I dusted off my old source code, found out I lost a bunch of it, what's left is totally disorganized.  Anyway, I installed amiga-gcc using the instructions at https://franke.ms/amiga/gdb8.wiki

I'm using Eclipse 2021-09 (4.21.0) on Ubuntu 18.04, 64-bit.
The application uses MUI 3.8 and is written 100% in C using OS APIs (and MUI).

I'm getting some weird errors:
array of inappropriate type initialized from string constant
   line 101, external location: /home/john/amigadev/MUI/C/include/inline/muimaster.h
excess elements in struct initializer
   line 194, external location: /home/john/amigadev/MUI/C/include/libraries/mui.h
expected identifier or '(' before '__asm'
   common.h   line 105
   common.h line 105 is: #define ASM    __asm

When I installed, the compiler needed libmpfr.so.4 so I did:
   sudo ln -s /usr/lib/x86_64-linux-gnu/libmpfr.so.6 /usr/lib/x86_64-linux-gnu/libmpfr.so.4
which resolved the problem.  Or did it?

Oh, also: I'm missing #include <dos.h>
I have <dos/dos.h> but isn't there a dos.h from SAS that's different from the OS's dos.h?

I am not sure what you are trying to do but this is an ARO forum. AROS has its own version of GCC. If you are trying to compile old SAS C source code in AROS, try using the version for AROS.  AROS One x86 from AMIGASYSTEM comes with it already pre-installed.


serk118uk

  • Member
  • ***
    • Posts: 119
    • Karma: +60/-0
Reply #2 on: November 07, 2021, 05:21:26 AM
I miss understand you so deleted my comments
« Last Edit: November 07, 2021, 02:11:45 PM by serk118uk »

Lets Build Not Destroy...


deadwood

  • AROS Developer
  • Legendary Member
  • *****
    • Posts: 748
    • Karma: +100/-0
Reply #3 on: November 07, 2021, 07:50:55 AM
Hello and Welcome,

As amigamia suggested you could use a native GCC compilers. Alternativelly, since you are using Ubuntu, you could build cross-complier suite. There is a convenient script for that and here are step by step instructions: https://github.com/deadw00d/AROS/blob/alt-abiv0/INSTALL.md