Next, link to releases (bottom of page): https://axrt.org/index.php?tab=download-aros
I have been trying to compile MUIbase for x86_64-v11 and (after some changes [mostly ULONG -> IPTR]) everything compiles without serious warnings, but the resulting binary does not start.
I am using the
https://www.axrt.org/download/aros/v11/AROS-20211231-1-linux-x86_64-system.tar.bz2 release, and built the corresponding toolchain using the instructions from
https://github.com/deadw00d/AROS/blob/master/INSTALL.md.
I tracked it down to global variables that somehow get missing in the binary. Here is an example.
The following compiles and runs as expected:
#include <stdio.h>
int main(void)
{
printf("Hello world\n");
return 0;
}
But when adding a global variable like this:
#include <stdio.h>
// I love global variables, in particular when they are called 'i' ;-)
int i;
int main(void)
{
printf("Hello world\n");
i = 0;
return 0;
}
The binary doesn't start. The output in the CLI window is: "hello: file is not executable" and the Linux terminal where I booted AROS from prints "[ELF Loader] COMMON symbol 'i'".
Thus, somehow the linker removed the global symbol 'i'. Any idea what is wrong?
Here is the command I used to compile (I made symbolic links from /usr/local to the directories where I unpacked and compiled v11):
/usr/local/aros-sdk/toolchain-core-x86_64/x86_64-aros-gcc --sysroot /usr/local/aros-sdk/SDK-core-x86_64 -o hello hello.c