Hi,
Total noob. I compiled the 64bit linux cross-compilation tools and thought I'd give a go at compiling pForth 2.0.1 for AROS 64-bit. There is a makefile for Unix which works fine for linux 64- and 32-bit executables. I'm totally guessing, but I figured that if I put CC=x86_64-aros-gcc at the start of the file it would use the AROS rather than linux gcc. That seemed to work except I get the following errors right off the bat. It doesn't like "int" at all. Is there some sort of flag I should be using so it isn't so confused? Maybe __header_inline needs to be defined somewhere. Any help would be appreciated. pForth is supposed to be easy to compile so I figure if I can get this one under my belt I can try other things. Thanks.
NathanH
x86_64-aros-gcc -x c -O2 --std=c89 -fsigned-char -fno-builtin -fno-unroll-loops -pedantic -Wcast-qual -Wall -Wwrite-strings -Winline -Wmissing-prototypes -Wmissing-declarations -g -I. -DPF_SUPPORT_FP -D_DEFAULT_SOURCE -D_GNU_SOURCE -c -o pf_cglue.o ../../csrc/pf_cglue.c
In file included from ../../csrc/pf_inc1.h:34,
from ../../csrc/pf_all.h:48,
from ../../csrc/pf_cglue.c:22:
/home/nhesterm/sda7/myprojects/arosbuilds/core-linux-x86_64-d/bin/linux-x86_64/AROS/Development/include/aros/posixc/stdio.h:113:17: error: expected ',' or ';' before 'int'
113 | __header_inline int getw(FILE *stream)
| ^~~
/home/nhesterm/sda7/myprojects/arosbuilds/core-linux-x86_64-d/bin/linux-x86_64/AROS/Development/include/aros/posixc/stdio.h:119:17: error: expected ',' or ';' before 'int'
119 | __header_inline int putw(int word, FILE *stream)
| ^~~
In file included from ../../csrc/pf_inc1.h:38,
from ../../csrc/pf_all.h:48,
from ../../csrc/pf_cglue.c:22:
/home/nhesterm/sda7/myprojects/arosbuilds/core-linux-x86_64-d/bin/linux-x86_64/AROS/Development/include/aros/stdc/math.h:213:17: error: expected ',' or ';' before 'int'
213 | __header_inline int
| ^~~
/home/nhesterm/sda7/myprojects/arosbuilds/core-linux-x86_64-d/bin/linux-x86_64/AROS/Development/include/aros/stdc/math.h:219:17: error: expected ',' or ';' before 'int'
219 | __header_inline int
| ^~~
/home/nhesterm/sda7/myprojects/arosbuilds/core-linux-x86_64-d/bin/linux-x86_64/AROS/Development/include/aros/stdc/math.h:225:17: error: expected ',' or ';' before 'int'
225 | __header_inline int
| ^~~
make: *** [Makefile:77: pf_cglue.o] Error 1
My first guess is that your cross-compiler setup is a mix of old and new files (did you update your git tree recently?) I'd suggest doing a full rebuild of cross compiler and core targets at this point.
Hmm, then check in pForth sources itself whether it is not redefining/undefining __header_inline
Alternativelly add -DAROS_SAFE_HEADERINLINE to your compiler command line (for example after -D_GNU_SOURCE).
Hmm the repo for 32-bit compilation needs to be a phisically separate one from the repo for 64-bit compilation. They are on different branches, so everything about them needs to be separate.
If you can give me a link to the source of pFort I can try to see if I get the same errors with my cross compiler setup.
Hi NathanH
For the toolchains it's fine to have both on the same partition (but obviously on different directory).
Like you write the 32 bit is on "myrepo" dir and the 64bit is on "myprojects" dir, i have also this config and its fine.
Regarding PForth i think the makefile for the Unix version need more check and adjustment (not only adding CC=...).
I tried to build using CMAKE instead of MAKE but it stopped after building a lib...need more changes probably.
Attached is a shot
You do not have access to view attachments
@NathanH
I got managed to build pForth for Aros 64 bit.

I built using CMAKE (with a modified CMakelists.txt) and some changes to the sources. Plus i had to use Aros to have some things created (as it's not possible to run pforth compiled for Aros under linux...and it needs to create the .dic and the pfdicdat.h file).
I was not able to create a valid Makefile for Aros...sorry
I attach here a shot of the program running on a shell of Aros.
For the moment don't want to share my build...as i think you would try to build for yourself, as a learning experience.
If you are in trouble feel free to ask.
If you don't want to try to build...i share my build and the sources...but i prefer you try it first.

You do not have access to view attachments
AMIGASYSTEMDistro MaintainerPosted
7 days agoNathanH, congratulations, excellent work!
It's a long shot but maybe commenting out -std=c89 in the Makefile will resolve this __header_inline error?