Hi, trying to recompile ZGloom I get this linker errors, maybe it's due to position of libs/objects, but it worked fine when I build a few years ago.
TiA
#make -f Makefile.amigaos4
ppc-amigaos-g++ zgui.o binresource.o config.o decrunchmania.o font.o gamelogic.o gloommap.o gloommaths.o hud.o iffhandler.o menuscreen.o monsterlogic.o objectgraphics.o quick.o renderer.o script.o soundhandler.o titlescreen.o zgloom.o -lSDL2_image -ltiff -lwebp -lpng -ljpeg -lz -lm -lSDL2_mixer -lxmp -lmodplug -lmikmod -lFLAC -lsmpeg2 -lvorbisfile -lvorbis -logg -lSDL2 -lpthread -athread=native -o ZGloom.debug
/SDK/local/newlib/lib/libFLAC.a(stream_decoder.o): In function `file_length_callback_':
stream_decoder.c:(.text+0x214): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(stream_decoder.o): In function `read_residual_partitioned_rice_':
stream_decoder.c:(.text+0x790): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(stream_decoder.o): In function `write_audio_frame_to_client_':
stream_decoder.c:(.text+0xa30): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(stream_decoder.o): In function `find_metadata_':
stream_decoder.c:(.text+0xf0c): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(stream_decoder.o): In function `read_frame_':
stream_decoder.c:(.text+0x32ac): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(stream_decoder.o):stream_decoder.c:(.text+0x5560): more undefined references to `__stack_chk_fail' follow
/SDK/local/newlib/lib/libFLAC.a(stream_decoder.o):(.got2+0x4): undefined reference to `__stack_chk_guard'
/SDK/local/newlib/lib/libFLAC.a(ogg_decoder_aspect.o): In function `FLAC__ogg_decoder_aspect_read_callback_wrapper':
ogg_decoder_aspect.c:(.text+0x504): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(ogg_decoder_aspect.o):(.got2+0x0): undefined reference to `__stack_chk_guard'
/SDK/local/newlib/lib/libFLAC.a(bitreader.o): In function `bitreader_read_from_client_':
bitreader.c:(.text+0x29c): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(bitreader.o): In function `FLAC__bitreader_read_raw_uint32.part.1':
bitreader.c:(.text+0x750): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(bitreader.o): In function `FLAC__bitreader_read_raw_int32':
bitreader.c:(.text+0x1344): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(bitreader.o): In function `FLAC__bitreader_read_raw_uint64':
bitreader.c:(.text+0x14ec): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(bitreader.o): In function `FLAC__bitreader_read_raw_int64':
bitreader.c:(.text+0x16cc): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(bitreader.o):bitreader.c:(.text+0x18e4): more undefined references to `__stack_chk_fail' follow
/SDK/local/newlib/lib/libFLAC.a(bitreader.o):(.got2+0x0): undefined reference to `__stack_chk_guard'
/SDK/local/newlib/lib/libFLAC.a(lpc.o): In function `FLAC__lpc_compute_lp_coefficients':
lpc.c:(.text+0x20c0): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(lpc.o): In function `FLAC__lpc_quantize_coefficients':
lpc.c:(.text+0x2654): undefined reference to `__stack_chk_fail'
/SDK/local/newlib/lib/libFLAC.a(lpc.o):(.got2+0x8): undefined reference to `__stack_chk_guard'
ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::uflow()':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE5uflowEv[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE5uflowEv]+0x18): undefined reference to `getwc'
ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::xsgetn(wchar_t*, int)':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE6xsgetnEPwi[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE6xsgetnEPwi]+0x50): undefined reference to `getwc'
ld: Dwarf Error: found dwarf version '28326', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::underflow()':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9underflowEv[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9underflowEv]+0x18): undefined reference to `getwc'
ld: Dwarf Error: found dwarf version '68', this reader only handles version 2, 3 and 4 information.
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9underflowEv[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9underflowEv]+0x30): undefined reference to `ungetwc'
ld: Dwarf Error: found dwarf version '75', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::pbackfail(unsigned int)':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9pbackfailEj[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9pbackfailEj]+0x2c): undefined reference to `ungetwc'
ld: Dwarf Error: found address size '0', this reader can only handle address sizes '2', '4' and '8'.
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9pbackfailEj[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9pbackfailEj]+0x58): undefined reference to `ungetwc'
ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::xsputn(wchar_t const*, int)':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE6xsputnEPKwi[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE6xsputnEPKwi]+0x48): undefined reference to `putwc'
ld: Dwarf Error: found dwarf version '2055', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::overflow(unsigned int)':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE8overflowEj[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE8overflowEj]+0x14): undefined reference to `putwc'
ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(collate_members.o): In function `std::__cxx11::collate<wchar_t>::_M_transform(wchar_t*, wchar_t const*, unsigned int) const':
collate_members.cc:(.text._ZNKSt7__cxx117collateIwE12_M_transformEPwPKwj+0xc): undefined reference to `wcsxfrm'
ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(collate_members_cow.o): In function `std::collate<wchar_t>::_M_transform(wchar_t*, wchar_t const*, unsigned int) const':
collate_members_cow.cc:(.text._ZNKSt7collateIwE12_M_transformEPwPKwj+0xc): undefined reference to `wcsxfrm'
ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(time_members.o): In function `std::__timepunct<wchar_t>::_M_put(wchar_t*, unsigned int, wchar_t const*, tm const*) const':
time_members.cc:(.text._ZNKSt11__timepunctIwE6_M_putEPwjPKwPK2tm+0xcc): undefined reference to `wcsftime'
make: *** [ZGloom.debug] Error 1
#
#make -f Makefile.amigaos4
ppc-amigaos-g++ zgui.o binresource.o config.o decrunchmania.o font.o gamelogic.o gloommap.o gloommaths.o hud.o iffhandler.o menuscreen.o monsterlogic.o objectgraphics.o quick.o renderer.o script.o soundhandler.o titlescreen.o zgloom.o -fstack-protector -lSDL2_mixer -lxmp -lmikmod -lmodplug -lFLAC -lsmpeg2 -lvorbisfile -lvorbis -logg -lSDL2_image -ltiff -lwebp -lpng16 -ljpeg -lSDL2 -lz -lpthread -athread=native -o ZGloom.debug
ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::uflow()':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE5uflowEv[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE5uflowEv]+0x18): undefined reference to `getwc'
ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::xsgetn(wchar_t*, int)':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE6xsgetnEPwi[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE6xsgetnEPwi]+0x50): undefined reference to `getwc'
ld: Dwarf Error: found dwarf version '28326', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::underflow()':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9underflowEv[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9underflowEv]+0x18): undefined reference to `getwc'
ld: Dwarf Error: found dwarf version '68', this reader only handles version 2, 3 and 4 information.
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9underflowEv[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9underflowEv]+0x30): undefined reference to `ungetwc'
ld: Dwarf Error: found dwarf version '75', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::pbackfail(unsigned int)':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9pbackfailEj[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9pbackfailEj]+0x2c): undefined reference to `ungetwc'
ld: Dwarf Error: found address size '0', this reader can only handle address sizes '2', '4' and '8'.
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9pbackfailEj[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE9pbackfailEj]+0x58): undefined reference to `ungetwc'
ld: Dwarf Error: found dwarf version '0', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::xsputn(wchar_t const*, int)':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE6xsputnEPKwi[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE6xsputnEPKwi]+0x48): undefined reference to `putwc'
ld: Dwarf Error: found dwarf version '2055', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(ext11-inst.o): In function `__gnu_cxx::stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::overflow(unsigned int)':
ext11-inst.cc:(.text._ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE8overflowEj[_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE8overflowEj]+0x14): undefined reference to `putwc'
ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(collate_members.o): In function `std::__cxx11::collate<wchar_t>::_M_transform(wchar_t*, wchar_t const*, unsigned int) const':
collate_members.cc:(.text._ZNKSt7__cxx117collateIwE12_M_transformEPwPKwj+0xc): undefined reference to `wcsxfrm'
ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(collate_members_cow.o): In function `std::collate<wchar_t>::_M_transform(wchar_t*, wchar_t const*, unsigned int) const':
collate_members_cow.cc:(.text._ZNKSt7collateIwE12_M_transformEPwPKwj+0xc): undefined reference to `wcsxfrm'
ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.
/GCC/lib/gcc/ppc-amigaos/11.2.0/newlib/lib/libstdc++.a(time_members.o): In function `std::__timepunct<wchar_t>::_M_put(wchar_t*, unsigned int, wchar_t const*, tm const*) const':
time_members.cc:(.text._ZNKSt11__timepunctIwE6_M_putEPwjPKwPK2tm+0xcc): undefined reference to `wcsftime'
make: *** [ZGloom.debug] Error 1
#
Build is done on my SAM460ex under AmigaOS4. Build other SDL2 game/stuff with "-fstack-protector" and went ok, maybe it's due that ZGloom uses c++ and not "plain" c ¿:.-/ Or maybe XMP lib I have/use (can't remember now where I got it) is too old to be linked with latest GCC ¿:-/
Why are you trying to recompile this? I was bored and looking for something to do and it builds and works for me, but it is already on the OS4Depot so presumably it is pointless to upload the binary I just built?
If liberty means anything at all, it means the right to tell people what they do not want to hear. George Orwell.