Open trholding opened 1 month ago
I have built amiga-gcc with gcc 6 on another system, but running the resulting exe leads to error 20:
m68k-amigaos-gcc -v
Using built-in specs.
COLLECT_GCC=m68k-amigaos-gcc
COLLECT_LTO_WRAPPER=/opt/amiga/libexec/gcc/m68k-amigaos/6.5.0b/lto-wrapper
Target: m68k-amigaos
Configured with: /home/ubuntu/SPACE/amiga-gcc/projects/gcc/configure --prefix=/opt/amiga --target=m68k-amigaos --enable-languages=c,c++,objc, --enable-version-specific-runtime-libs --disable-libssp --disable-nls --with-headers=/home/ubuntu/SPACE/amiga-gcc/projects/newlib-cygwin/newlib/libc/sys/amigaos/include/ --disable-shared --enable-threads=no --with-stage1-ldflags='-dynamic-libgcc -dynamic-libstdc++' --with-boot-ldflags='-dynamic-libgcc -dynamic-libstdc++'
Thread model: single
gcc version 6.5.0b 240620092724 (GCC)
I get further but some math libraries are not loading:
It was compiled like this:
m68k-amigaos-gcc -o HELLOAMIGA.exe helloamiga.c -lm -mcrt=nix13
For now you have to strip the executable using v 13.2.
Add -s
to the gcc command line performs an immediate strip.
or use m68k-amigaos-strip
I'll try these two and get back to you:
Add
-s
to the gcc command line performs an immediate strip. or usem68k-amigaos-strip
Thank you! Danke!
I've tried this with amiga-gcc 6:
m68k-amigaos-gcc -s -o HELLOAMIGA.exe helloamiga.c -lm -mcrt=nix13
Also statically compiled with gcc 6:
m68k-amigaos-gcc -static -o HELLOAMIGA.exe helloamiga.c -lm -mcrt=nix13
I've also compiled with amiga-gcc 6 and stripped with amiga-gcc 13.2:
m68k-amigaos-gcc -o HELLOAMIGA.exe helloamiga.c -lm -mcrt=nix13 # gcc 6
m68k-amigaos-strip HELLOAMIGA.exe # gcc 13.2
And I ran each build on fs-uae after converting to adf and the results are same "... failed with return code 20", amiga-gcc 13.2 fails with "Error code 121"
Should I build gcc 13.1 and see?
Ensure that mathieeedoubbas.library and mathieeedoubtrans.library are present.
I use
Maybe I have to do it the Amiga way:
http://amigadev.elowar.com/read/ADCD_2.1/Libraries_Manual_guide/node048A.html https://aminet.net/package/util/libs/MathLibsUAE http://aminet.net/package/util/libs/HSMathLibs_040
Since it is for an Amiga 500 Kickstart 1.3 I'd need to find a softfp version.
Perhaps I'll have to write my own simplified / equivalent math functions or use something like https://core-math.gitlabpages.inria.fr/
Thank you for the support.
What's the problem? Both libs are available with kick 1.3. Check the workbench's libs folder.
What's the problem? Both libs are available with kick 1.3. Check the workbench's libs folder.
Okay I guess the problem was that I am an idiot and noob to amiga dev stuff. Your hint and (https://github.com/bebbo/libnix/issues/36) solved it! Thanks a ton!!! I learned something new.
Leaving this here for any new folks who encounter issues with libraries not found:
mkdir D1
sudo mount -t affs -o loop ./<Workbench 1.3 Disk 1 filename>.adf ./D1
sudo cp -R D1/libs ./
chmod -Rv 777 libs
exe2adf -i <yourprogram>.exe -d libs -a <yourprogram>.adf
Now only the issue with amiga-gcc 13.2 built executable exiting with error code 121 remains. But I guess gcc 6 is fine for my purposes unless gcc 13.2 compiles way more efficient binaries.
Edit: This is such excitement and a dream come true that after 3 decades I can run My Own Amiga Program (TM), I have found closure to my childhood pains. And feels like the first time I discovered programming. Much Love! Keep up the awesome work.
Dear Bebbo, thank you for keeping Amiga development alive!
I once owned an Amiga 500 back when I was a kid, and decades later I have the urge to make a demo for the Amiga.
I am thankful that folks like you exist that keeps the machine and dream alive.
I am an absolute noob to Amiga development and I encountered an error:
Unable to load helloamiga.exe: Error code 121
I built the helloamiga.c to target Amiga 500 with kickstart 1.3 ROM without errors:
I used the amiga-gcc 13.2 toolchain (
make branch branch=amiga13.1 mod=gcc
)The helloamiga.exe was packaged as adf with exe2adf:
Then I ran it with fs-uae.
I do not know if I did something wrong or related to amiga-gcc. Any hints for a fix is highly appreciated as I am trying to avoid building lower versions of amiga-gcc from scratch to test out.
The helloamiga.c test code as well as the exe and adf is attached here in a zip: helloamiga.zip .