Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
33 user(s) are online (29 user(s) are browsing Forums)

Members: 1
Guests: 32

jarokuczi, more...

Support us!

Headlines

 
  Register To Post  

Trying to recompile ZGloom.
Just can't stay away
Just can't stay away


See User information
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.-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_tstd::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'
ldDwarf Errorfound dwarf version '28326'this reader only handles version 2and 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'
ldDwarf Errorfound dwarf version '75'this reader only handles version 2and 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'
ldDwarf Errorfound dwarf version '0'this reader only handles version 2and 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'
ldDwarf Errorfound dwarf version '5'this reader only handles version 2and 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
#


https://github.com/javierdlr/ZGloom_amigaos4 forked from https://github.com/Swizpig/ZGloom


and if I add "-use-dynld" to linker I get:
#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.-lSDL2_image -ltiff -lwebp -lpng -ljpeg -lz -lm -lSDL2_mixer -lxmp -lmodplug -lmikmod -lFLAC -lsmpeg2 -lvorbisfile -lvorbis -logg -lSDL2 -lpthread -athread=native -use-dynld -o ZGloom.debug
ld
warninglibssp.soneeded by /SDK/local/newlib/lib/libFLAC.sonot found (try using -rpath or -rpath-link)
ldwarninglibSDL2-2.0.soneeded by /SDK/local/newlib/lib/libsmpeg2.sonot found (try using -rpath or -rpath-link)
/
SDK/local/newlib/lib/libFLAC.soundefined reference to `__stack_chk_fail@LIBSSP_1.0'
/SDK/local/newlib/lib/libFLAC.so: undefined reference to 
`__stack_chk_guard@LIBSSP_1.0'
make: *** [ZGloom.debug] Error 1


Edited by jabirulo on 2023/4/4 13:42:29
Go to top
Re: Trying to recompile ZGloom.
Home away from home
Home away from home


See User information
@jabirulo

I got the same error when trying to build ScummVM after updating libFLAC to the latest version.

libFLAC was compiled with -fstack-protector and to make the story short, just add
-fstack-protector

to your LDFLAGS and it will work again.

Go to top
Re: Trying to recompile ZGloom.
Just can't stay away
Just can't stay away


See User information
@Raziel

THX solved part of the problme, now I "only" get:
#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.-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 Errorfound dwarf version '5'this reader only handles version 2and 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_tstd::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'
ldDwarf Errorfound dwarf version '68'this reader only handles version 2and 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_tstd::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'
ldDwarf Errorfound 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_tstd::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'
ldDwarf Errorfound dwarf version '2055'this reader only handles version 2and 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'
ldDwarf Errorfound dwarf version '5'this reader only handles version 2and 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
#


and when trying to use "use-dynld":
#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 -use-dynld -o ZGloom.debug
ldwarninglibSDL2-2.0.soneeded by /SDK/local/newlib/lib/libsmpeg2.sonot found (try using -rpath or -rpath-link)
#

Go to top
Re: Trying to recompile ZGloom.
Home away from home
Home away from home


See User information
@jabirulo

Hmm, what gcc version you are using?

I remember this dwarf errors but only with an intermediate gcc between 10 and 12.

Never found the reason.

Using gcc 12.1 here

Go to top
Re: Trying to recompile ZGloom.
Just can't stay away
Just can't stay away


See User information
@Raziel

#gcc -v
Using built-in specs.
COLLECT_GCC=/Devel/SDK/gcc/ppc-amigaos/bin/11.2.0/gcc
COLLECT_LTO_WRAPPER=/Devel/SDK/gcc/ppc-amigaos/bin/11.2.0/../libexec/gcc/ppc-amigaos/11.2.0/lto-wrapper
Target: ppc-amigaos
Configured with: /opt/adtools/gcc/repo/configure --with-bugurl=https://github.com/sba1/adtools/issues --with-pkgversion='adtools build 11.2.0' --host=ppc-amigaos --target=ppc-amigaos --disable-nls --prefix=/gcc --with-gmp=/opt/adtools/native-build/root-cross --with-mpfr=/opt/adtools/native-build/root-cross --with-mpc=/opt/adtools/native-build/root-cross --program-prefix=ppc-amigaos- --program-suffix=-11 --libexecdir=/gcc/libexec --enable-languages=c,c++ --enable-haifa --enable-sjlj-exceptions --disable-libstdcxx-pch --disable-tls --enable-threads=amigaos --enable-lto --disable-c++tools
Thread model: amigaos
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (adtools build 11.2.0)
#

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 ¿:-/

Go to top
Re: Trying to recompile ZGloom.
Home away from home
Home away from home


See User information
@jabirulo

Uh...yes, sorry
GCC version is right there in the output.

Dwarf error comes from libstdc++.a, which in turn comes from gcc11.2, since gcc installs it with it.

Only thing I can recommend is to update to gcc 12.

C++ doesn't matter, scummvm switched to C++ a year ago

Edit: I faintly remember a fix in gcc12 that addressed some bugs from 11.2...

Go to top
Re: Trying to recompile ZGloom.
Just can't stay away
Just can't stay away


See User information
@Raziel

ok, but AFAIK there is no gcc 12 for AOS4.
Maybe will (re)start some crosscompilng then

big thx for all help.

Go to top
Re: Trying to recompile ZGloom.
Quite a regular
Quite a regular


See User information
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.
Go to top
Re: Trying to recompile ZGloom.
Home away from home
Home away from home


See User information
@rjd324

If you are boring perhaps you may try with sm64ex?
https://github.com/Cowcat5150/sm64ex

Or latest EasyRPG 😏
https://github.com/EasyRPG/Player

Btw jocking aside, yes Javier was the mantainer of the ZGloom port for OS4, i believe he have another WIP version in progress

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project