29 May 2018, 18:51 | #841 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
|
|
29 May 2018, 19:16 | #842 |
Registered User
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
|
-noixemul in the linker fixed it. thanks!
|
04 June 2018, 15:21 | #843 |
Registered User
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
|
My exe compiled up just fine, but now i have another problem
any thoughts/help on trying to debug/fix an immediate hard crash on launch of my executable? (alternates between guru/winuae crash dump). one thing i tried was to just stub out main() and return hello world and that crashes as well. stack size was set correctly. Im not even sure if my code is getting to main() ideas are welcome. thanks! |
04 June 2018, 15:24 | #844 | |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
Quote:
|
|
04 June 2018, 15:32 | #845 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
hello-stdio.c
Code:
#include <stdio.h> int main() { puts("hello world!\n"); return 0; } Code:
m68k-amigaos-gcc -Os -Wall -fomit-frame-pointer -o hello-stdio hello-stdio.c m68k-amigaos-gcc -mcrt=nix13 -Os -Wall -fomit-frame-pointer -o hello-stdio.nix13 hello-stdio.c m68k-amigaos-gcc -noixemul -Os -Wall -fomit-frame-pointer -o hello-stdio.nix hello-stdio.c m68k-amigaos-gcc -mcrt=clib2 -Os -Wall -fomit-frame-pointer -o hello-stdio.clib2 hello-stdio.c |
04 June 2018, 15:36 | #846 |
Registered User
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
|
|
04 June 2018, 15:38 | #847 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
|
04 June 2018, 21:28 | #848 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
|
04 June 2018, 21:28 | #849 |
AmigaDev.com
Join Date: Mar 2016
Location: Stockholm, Sweden
Age: 35
Posts: 625
|
|
05 June 2018, 23:51 | #850 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
libnix fails to build for me.
Code:
mkdir -p /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix mkdir -p build/libnix echo 'void foo(){}' > build/libnix/x.c if [ ! -e /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/ncrt0.o ]; then /opt/amiga/gcc6/bin/m68k-amigaos-gcc -c build/libnix/x.c -o /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/ncrt0.o; fi if [ ! -e /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/libm.a ]; then /opt/amiga/gcc6/bin/m68k-amigaos-ar r /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/libm.a; fi if [ ! -e /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/libnixmain.a ]; then /opt/amiga/gcc6/bin/m68k-amigaos-ar r /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/libnixmain.a; fi if [ ! -e /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/libnix.a ]; then /opt/amiga/gcc6/bin/m68k-amigaos-ar r /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/libnix.a; fi if [ ! -e /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/libnix20.a ]; then /opt/amiga/gcc6/bin/m68k-amigaos-ar r /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/libnix20.a; fi if [ ! -e /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/libstubs.a ]; then /opt/amiga/gcc6/bin/m68k-amigaos-ar r /opt/amiga/gcc6/m68k-amigaos/libnix/lib/libnix/libstubs.a; fi mkdir -p /opt/amiga/gcc6/lib/gcc/m68k-amigaos/6.4.1b if [ ! -e /opt/amiga/gcc6/lib/gcc/m68k-amigaos/6.4.1b/libgcc.a ]; then /opt/amiga/gcc6/bin/m68k-amigaos-ar r /opt/amiga/gcc6/lib/gcc/m68k-amigaos/6.4.1b/libgcc.a; fi cd build/libnix && CFLAGS="-Os -g -fomit-frame-pointer" AR=m68k-amigaos-ar AS=m68k-amigaos-as CC=m68k-amigaos-gcc /home/alex/t/amiga-gcc/projects/libnix/configure --prefix=/opt/amiga/gcc6/m68k-amigaos/libnix --target=m68k-amigaos --host=m68k-amigaos checking for m68k-amigaos-CC... m68k-amigaos-gcc checking whether the C compiler works... no configure: error: in `/home/alex/t/amiga-gcc/build/libnix': configure: error: C compiler cannot create executables See `config.log' for more details Makefile:530: recipe for target 'build/libnix/Makefile' failed make: *** [build/libnix/Makefile] Error 77 Code:
Configured with: /home/alex/t/amiga-gcc/projects/gcc/configure --prefix=/opt/amiga/gcc6 --target=m68k-amigaos --enable-languages=c,c++,objc --enable-version-specific-runtime-libs --disable-libssp --disable-nls Thread model: single gcc version 6.4.1b 20180605-075457 (GCC) configure:1917: $? = 0 configure:1906: m68k-amigaos-gcc -V >&5 m68k-amigaos-gcc: error: unrecognized command line option '-V' m68k-amigaos-gcc: fatal error: no input files compilation terminated. configure:1917: $? = 1 configure:1906: m68k-amigaos-gcc -qversion >&5 m68k-amigaos-gcc: error: unrecognized command line option '-qversion'; did you mean '--version'? m68k-amigaos-gcc: fatal error: no input files compilation terminated. configure:1917: $? = 1 configure:1937: checking whether the C compiler works configure:1959: m68k-amigaos-gcc -Os -g -fomit-frame-pointer conftest.c >&5 /opt/amiga/gcc6/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/bin/ld: cannot open crt0.o: No such file or directory collect2: error: ld returned 1 exit status configure:1963: $? = 1 configure:2001: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:2006: error: in `/home/alex/t/amiga-gcc/build/libnix': configure:2008: error: C compiler cannot create executables |
06 June 2018, 08:54 | #851 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
=> rinse and repeat Code:
make clean clean-prefix -j make update -j make all -j4 |
|
06 June 2018, 10:50 | #852 |
Semi-Retired
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 1,993
|
Isn't it complaining about missing one of the startup files that libnix needs to make an executable (crt0.o)?
|
06 June 2018, 11:21 | #853 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
|
06 June 2018, 17:49 | #854 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
I had removed ira from the 'all" target of makefile. I did 'git checkout Makefile' to get the original makefile. Build breaks at building ira.
Something weird is going on. Code:
make ira -n mkdir -p build/ira cd projects/ira && cc -o /home/alex/t/amiga-gcc/build/ira/ira -Os ira.c ira_2.c supp.c mkdir -p /opt/amiga/gcc6/bin/ install build/ira/ira /opt/amiga/gcc6/bin/ echo "built /opt/amiga/gcc6/bin/ira" echo "done" >build/ira/_done Tries to make ira out of 3 files. If I cd to projects/ira and type make it builds! Here's what make -n from within ira's folder says: Code:
make -n gcc -c -O2 -std=c99 -o obj/amiga_hunks.o amiga_hunks.c gcc -c -O2 -std=c99 -o obj/atari.o atari.c gcc -c -O2 -std=c99 -o obj/binary.o binary.c gcc -c -O2 -std=c99 -o obj/config.o config.c gcc -c -O2 -std=c99 -o obj/constants.o constants.c gcc -c -O2 -std=c99 -o obj/elf.o elf.c gcc -c -O2 -std=c99 -o obj/init.o init.c gcc -c -O2 -std=c99 -o obj/ira.o ira.c gcc -c -O2 -std=c99 -o obj/ira_2.o ira_2.c gcc -c -O2 -std=c99 -o obj/megadrive.o megadrive.c gcc -c -O2 -std=c99 -o obj/opcode.o opcode.c gcc -c -O2 -std=c99 -o obj/supp.o supp.c gcc -o ira obj/amiga_hunks.o obj/atari.o obj/binary.o obj/config.o obj/constants.o obj/elf.o obj/init.o obj/ira.o obj/ira_2.o obj/megadrive.o obj/opcode.o obj/supp.o |
06 June 2018, 18:01 | #855 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
... recipe updated: Code:
git pull make clean clean-prefix -j make update -j make all -j4 |
|
06 June 2018, 18:29 | #856 |
Registered User
Join Date: Dec 2010
Location: Athens/Greece
Age: 53
Posts: 719
|
Yeap, that was it (git pull)
Thanks! |
21 June 2018, 18:48 | #857 |
Registered User
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
|
this code
Code:
#include <stdio.h> int main() { FILE *f = fopen("test.c","rt"); if (f) { printf("File opened!\n"); fclose(f); } else { printf("File not opened\n"); } m68k-amigaos-gcc -o test test.c but does not with m68k-amigaos-gcc -o test test.c -noixemul why? edit: fails with -mcrt=nix13 but works with -mcrt=clib2 |
21 June 2018, 19:00 | #858 | |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
Quote:
|
|
21 June 2018, 19:11 | #859 |
Registered User
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
|
ok switching to -mcrt=clib2 now gives me link errors.
Code:
/opt/amiga/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/bin/ld: /opt/amiga/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/lib/libSDL.a(SDL_ahiaudio.go-00000003.o):(.text+0x322): undefined reference to `Delay' /opt/amiga/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/bin/ld: /opt/amiga/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/lib/libSDL.a(SDL_sysjoystick.go-00000010.o):(.text+0xfa): undefined reference to `Delay' /opt/amiga/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/bin/ld: /opt/amiga/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/lib/libSDL.a(SDL_cgxvideo.go-00000020.o):(.text+0x1aae): undefined reference to `Delay' /opt/amiga/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/bin/ld: /opt/amiga/lib/gcc/m68k-amigaos/6.4.1b/../../../../m68k-amigaos/lib/libSDL.a(SDL_cgxvideo.go-00000020.o):(.text+0x1afe): undefined reference to `Delay' |
21 June 2018, 19:21 | #860 |
bye
Join Date: Jun 2016
Location: Some / Where
Posts: 680
|
My guess libSDL forgot to #include <inline/dos.h>
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New GCC based dev toolchain for AmigaOS 3.x | cla | Coders. Releases | 8 | 24 December 2017 10:18 |
Issue with photon/xxxx WinUAE Toolchain | arpz | Coders. Asm / Hardware | 2 | 26 September 2015 22:33 |
New 68k gcc toolchain | arti | Coders. C/C++ | 17 | 31 July 2015 03:59 |
Hannibal's WinUAE Demo Toolchain 5 | Bobic | Amiga scene | 1 | 23 July 2015 21:04 |
From gcc to vbcc. | Cowcat | Coders. General | 9 | 06 June 2014 14:45 |
|
|