Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
13 user(s) are online (7 user(s) are browsing Forums)

Members: 1
Guests: 12

samo79, more...

Support us!

Headlines

 
  Register To Post  

Weird errors in GCC 11.2.0 from AOS4 SDK
Just popping in
Just popping in


See User information
Hi everyone,

I hope this is the correct board for my question. After I update my SDK with the latest version and set GCC 11.2.0 as default I get weird errors when compiling my project.

Sometimes (not always) it throws errors for not finding <iostream> in one class - but in all other classes it compiles normally including <iostream>. This error happens occasiionally and it always refers to a different class.

If these errors are not happening then it complains about near endless errors regarding things like:
(.text._ZN12_GLOBAL__N_14pool4freeEPv.constprop.0+0x58): undefined reference to __gthread_active_p'
ld: Dwarf Error: found dwarf version '
0', this reader only handles version 2, 3 and 4 information

but this also does not happen everytime.

I added -gstabs to my CFLAGS as well as -fno-threadsafe-statics - but no change.

It is really acting randomly and incomprehensible. Any idea what might be wrong here? Is the 11.2.0 version within the SDK instable? So far I used GCC 2.4.3 (IIRC) from the previous SDK. That one compiled everything fine without any problems. I got the hint to use -lpthread but that did not work either.

I meanwhile tested all versions of GCC which are in the latest SDK. The only one which does not throw such errors is 6.4.0 - but that one throws different errors:
src/WizardGroundsC.cc:200undefined reference to `std::__throw_bad_array_new_length()' o/WindowC.o: In function `std::_Rb_tree_iterator<std::pair<int const, GadgetC*> >&& std::forward<std::_Rb_tree_iterator<std::pair<int const, GadgetC*> > >(std::remove_reference<std::_Rb_tree_iterator<std::pair<int const, GadgetC*> > >::type&)': /DH1/Prog/SDK/gcc/include/c++/11.2.0/bits/stl_pair.h:(.text._ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP7GadgetCEEE8allocateEjPKv[_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP7GadgetCEEE8allocateEjPKv]+0x68): undefined reference to `std::__throw_bad_array_new_length()' o/PlayerC.oIn function `std::vector<BuildingC*, std::allocator<BuildingC*> >::end()': /DH1/Prog/SDK/gcc/include/c++/11.2.0/bits/alloc_traits.h:(.text._ZN9__gnu_cxx13new_allocatorIP9BuildingCE8allocateEjPKv[_ZN9__gnu_cxx13new_allocatorIP9BuildingCE8allocateEjPKv]+0x64): undefined reference to `std::__throw_bad_array_new_length()' o/PlayerManagerC.o: In function `PlayerManagerC::~PlayerManagerC()'src/PlayerManagerC.cc:9undefined reference to `std::__throw_bad_array_new_length()' o/MenusC.o: In function `MenusC::~MenusC()': src/MenusC.cc:10: undefined reference to `std::__throw_bad_array_new_length()' o/MenusC.o:src/MenusC.cc:67more undefined references to `std::__throw_bad_array_new_length()' follow make: *** [bin/WizardGrounds] Error 1


Maybe I stick with that version and try to fix things. But as said version 2.4.3 did compile everything fine.
No clue what I still can try to get one of the later GCC versions working.

Thank you in advance for your help.

Go to top
Re: Weird errors in GCC 11.2.0 from AOS4 SDK
Home away from home
Home away from home


See User information
@Reth
Are you sure you have -athread=native and -lpthread in your string ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Weird errors in GCC 11.2.0 from AOS4 SDK
Just popping in
Just popping in


See User information
I only had -lpthread but that throwed a linker error. -athread=native I did not yet try (but -fno-threadsafe-statics).

Need to try that.

Go to top
Re: Weird errors in GCC 11.2.0 from AOS4 SDK
Amigans Defender
Amigans Defender


See User information
Are you using g++ when linking? Otherwise if you are using gcc you have to add -lstdc++

i'm really tired...
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-2024 The XOOPS Project