Weird errors in GCC 11.2.0 from AOS4 SDK

5 posts / 0 new
Last post
Reth
Reth's picture
Offline
Last seen: 3 hours 51 min ago
Joined: 2011-07-09 22:16
Weird errors in GCC 11.2.0 from AOS4 SDK

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 in one class - but in all other classes it compiles normally including . 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:

  1. (.text._ZN12_GLOBAL__N_14pool4freeEPv.constprop.0+0x58): undefined reference to __gthread_active_p'
  2. 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?

Thank you in advance for your help.

walkero
walkero's picture
Offline
Last seen: 14 hours 48 min ago
Joined: 2009-05-03 16:54
Re: Weird errors in GCC 11.2.0 from AOS4 SDK

I guess this is happening on the linker, right? Maybe you need to add
-lpthread
when you link your application.

Reth
Reth's picture
Offline
Last seen: 3 hours 51 min ago
Joined: 2011-07-09 22:16
Re: Weird errors in GCC 11.2.0 from AOS4 SDK

Thank you. Will try it. Is this supported in AOS4 and its SDK?

Reth
Reth's picture
Offline
Last seen: 3 hours 51 min ago
Joined: 2011-07-09 22:16
Re: Weird errors in GCC 11.2.0 from AOS4 SDK

Did not work. I get the message:
ld: cannot find -lpthreads

Before latest SDK I had GCC 2.4.3 (IIRC - the one of the old SDK) and that one compiled everything fine.
Any idea what I can still try? Do I have to state newlib or clib2 in particular or so?

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:200: undefined 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.o: In 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:9: undefined 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:67: more 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.

jabirulo
jabirulo's picture
Offline
Last seen: 1 hour 50 min ago
Joined: 2013-05-30 00:53
Re: Weird errors in GCC 11.2.0 from AOS4 SDK

"-lpthread" no S at the end

AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonRX550/SSD240GB/DVDRW :-P

Log in or register to post comments