Page 1 of 1

More compiler issues

Posted: Wed Nov 30, 2022 2:34 pm
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


Re: More compiler issues

Posted: Sun Dec 04, 2022 1:44 am
by polluks
#include_next has some advantages,
see https://stackoverflow.com/questions/102 ... -a-project
Try SnoopDos to fix your issue.

Re: More compiler issues

Posted: Sat Dec 10, 2022 1:21 pm
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

Re: More compiler issues

Posted: Fri Jan 06, 2023 12:57 pm
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