More compiler issues

Have a question about our Software Developer Kit? Ask them here.
Post Reply
User avatar
OldFart
Posts: 100
Joined: Tue Jul 12, 2011 2:56 pm
Location: Groningen, Netherlands

More compiler issues

Post by OldFart »

Hi,

Whilst continuing playing with various compilers, I encounter other and quite unexpected issues.

As I learned in my previous thread, gcc 6.4.0 requires an upgraded version of newlib.library, so that issue can be dealt with.

gcc 8.4.0 is currently the only version that does its trick, as gcc 10.3.0 now states something about multiple definitions. Other versions do not mention this issue, so I gather in all my wisdom, that this might be a compiler issue?

gcc 11.2.0 now has a problem with inclusion of stddef.h (what the heck is #include_next about?).

Anyone any idea about what to do with the issues of gcc 10.3.0 and gcc 11.2.0?

OldFart

Code: Select all

gcc-6 -DCOMPVERS="GCC_6.4.0" -DPROGNAME="AssignView" -DPROGREVN="6" -DPROGVERS="2" -DSDKVERS="54.16" -DUSE_WBRUN -DUSE_SINGLERUNNING  main.c -o ProjecT.DEBUG -Wall -Wextra -Winline -Wunreachable-code -Wstack-protector -Wno-fallthrough -DDEBUG -DGCC -gstabs 
SDK:gcc/ppc-amigaos/bin/libexec/gcc/ppc-amigaos/6.4.0/cc1 requires newlib.library 53.68 or newer!
SDK:gcc/ppc-amigaos/bin/libexec/gcc/ppc-amigaos/6.4.0/cc1 faalt returncode 20
make: *** [ProjecT.DEBUG] Error 1

gcc-8 -DCOMPVERS="GCC_8.4.0" -DPROGNAME="AssignView" -DPROGREVN="6" -DPROGVERS="2" -DSDKVERS="54.16" -DUSE_WBRUN -DUSE_SINGLERUNNING  main.c -o ProjecT.DEBUG -Wall -Wextra -Winline -Wunreachable-code -Wstack-protector -Wimplicit-fallthrough=0  -DDEBUG -DGCC -gstabs 
=== Done making DEBUG ==========================

gcc-10 -DCOMPVERS="GCC_10.3.0" -DPROGNAME="AssignView" -DPROGREVN="6" -DPROGVERS="2" -DSDKVERS="54.16" -DUSE_WBRUN -DUSE_SINGLERUNNING  main.c -o ProjecT.DEBUG -Wall -Wextra -Winline -Wunreachable-code -Wstack-protector -Wimplicit-fallthrough=0  -DDEBUG -DGCC -gstabs 
/tmp/ccF9SaO2.o: In function `Fill_DeadBeef':
CommonFunctions.c:156: multiple definition of `SysBase'
/SDK/newlib/lib/crtbegin.o:(.sbss+0x10): first defined here
/tmp/ccF9SaO2.o: In function `Fill_DeadBeef':
CommonFunctions.c:156: multiple definition of `IExec'
/SDK/newlib/lib/crtbegin.o:(.sbss+0x8): first defined here
/tmp/ccF9SaO2.o: In function `Fill_DeadBeef':
CommonFunctions.c:156: multiple definition of `DOSBase'
/SDK/newlib/lib/crtbegin.o:(.sbss+0xc): first defined here
/tmp/ccF9SaO2.o: In function `Fill_DeadBeef':
CommonFunctions.c:156: multiple definition of `IDOS'
/SDK/newlib/lib/crtbegin.o:(.sbss+0x4): first defined here
make: *** [ProjecT.DEBUG] Error 1

gcc-11 -DCOMPVERS="GCC_11.2.0" -DPROGNAME="AssignView" -DPROGREVN="6" -DPROGVERS="2" -DSDKVERS="54.16" -DUSE_WBRUN -DUSE_SINGLERUNNING  main.c -o ProjecT.DEBUG -Wall -Wextra -Winline -Wunreachable-code -Wstack-protector -Wimplicit-fallthrough=0  -DDEBUG -DGCC -gstabs 
In file included from /SDK/newlib/include/sys/_types.h:24,
                 from /SDK/newlib/include/sys/reent.h:14,
                 from /SDK/newlib/include/string.h:11,
                 from main.c:31:
/SDK/newlib/include/stddef.h:2:15: fatal error: stddef.h: No such file or directory
    2 | #include_next <stddef.h>
      |               ^~~~~~~~~~
compilation terminated.
make: *** [ProjecT.DEBUG] Error 1

X5000, appears to be sick. Dismantled jan 1, 2024.
Dead MicroA1
A1200 in ElBox, c/w Blizzard '040 @ 50MHz + SCSI module, ZIV-board c/w (o.a.) cv64/3d + flickerdoubler + FastATA-ZIV + Lots of SCSI gear, sitting idle.
RaspBerry Pi 2B, 3B, 4B/4Gb, 4B/8Gb
OrangePi 5+ 8Gb
ACER Windows 10
User avatar
polluks
Posts: 55
Joined: Tue May 19, 2015 6:30 pm
Location: Germany
Contact:

Re: More compiler issues

Post by polluks »

#include_next has some advantages,
see https://stackoverflow.com/questions/102 ... -a-project
Try SnoopDos to fix your issue.
User avatar
OldFart
Posts: 100
Joined: Tue Jul 12, 2011 2:56 pm
Location: Groningen, Netherlands

Re: More compiler issues

Post by OldFart »

Hi all,

Code: Select all

gcc-11 -DCOMPVERS="GCC_11.2.0" -DPROGNAME="AssignView" -DPROGREVN="6" -DPROGVERS="2" -DSDKVERS="54.16" -DUSE_WBRUN -DUSE_SINGLERUNNING  main.c -o ProjecT.DEBUG -Wall -Wextra -Winline -Wunreachable-code -Wstack-protector -Wimplicit-fallthrough=0  -DDEBUG -DGCC -gstabs 
In file included from /SDK/newlib/include/sys/_types.h:24,
                 from /SDK/newlib/include/sys/reent.h:14,
                 from /SDK/newlib/include/string.h:11,
                 from main.c:31:
/SDK/newlib/include/stddef.h:2:15: fatal error: stddef.h: No such file or directory
    2 | #include_next <stddef.h>
      |               ^~~~~~~~~~
compilation terminated.
make: *** [ProjecT.DEBUG] Error 1
This one issue is simple to mitigate as I have found by experience, by just trying again...

OldFart
X5000, appears to be sick. Dismantled jan 1, 2024.
Dead MicroA1
A1200 in ElBox, c/w Blizzard '040 @ 50MHz + SCSI module, ZIV-board c/w (o.a.) cv64/3d + flickerdoubler + FastATA-ZIV + Lots of SCSI gear, sitting idle.
RaspBerry Pi 2B, 3B, 4B/4Gb, 4B/8Gb
OrangePi 5+ 8Gb
ACER Windows 10
User avatar
walkero
Site Admin
Posts: 62
Joined: Mon Dec 20, 2010 2:05 pm
Location: Athens/Dublin
Contact:

Re: More compiler issues

Post by walkero »

@oldfart
About the gcc 10 and the multiple definitions you mentioned above, this is not a compiler bug but a change of the new versions.
You can find more info at https://wiki.gentoo.org/wiki/Project:To ... fno_common

You can still have it working by setting the behaviour as it was on compilation
If you develop or want to develop for AmigaOS 4.x, then join us at OS4Coding.net
Post Reply