3

My Linux distribution recently updated from gcc 4.8.x to 4.9.0. Since then i am experiencing a crash when working with boost polygon set, even with simplest usage from the examples:

using namespace boost::polygon;
using namespace boost::polygon::operators;

geometry::BoostPolygonSet ps;
ps += rectangle_data<int>(0,0,10,10);

Crashes on the ps += line with the last thing being in:

/usr/include/boost/polygon/detail/polygon_arbitrary_formation.hpp

Line 289, which says:

Unit localx = *x_;

And *x_ is null

I tried different workarounds but nothing helps. Unfortunately ArchLinux does not provide a way to have more than 1 gcc versions installed in parallel, so i need to get it to work.

Any ideas? Thanx!

Update:

Recent archlinux update to gcc package gcc 4.9.0-2 solved the problem. Either a bug in gcc, or, due to the numbering, more possible a bug in ArchLinux package system. Not sure how to close a question (and yes i searched help ;-) ) consider it solved.

sinsuren
  • 1,745
  • 2
  • 23
  • 26
Hellagot
  • 235
  • 2
  • 13
  • are you sure you've done a full rebuild of all linked objects? – sehe May 09 '14 at 08:34
  • Well, i pretty much was, but just to ensure that its not some b0rken build dependencies i just removed all build directories from the project and built from scratch: Crash still remains. – Hellagot May 09 '14 at 08:56
  • And the boost library dependencies (if there are any for Boost Geometry) – sehe May 09 '14 at 08:56
  • I don't use self built boost, it's the system installation from ArchLinux... do they really need to recompile all libraries? That would be weired and they sure have not done so far. – Hellagot May 09 '14 at 08:59
  • 1
    Yes, you need to recompile all libraries if you switch major versions of GCC, because of ABI breaking changes. Anything else -> undefined behaviour – sehe May 09 '14 at 09:02
  • No, you certainly don't. GCC is ABI-compatible with itself going back many, many major versions. libstdc++ for 4.7.0 and 4.7.1 are ABI-incompatible with the others for *reasons* but all other versions are completely compatible. It's probably a bug in Boost, I feel, that the GCC update simply exposed. – Puppy May 09 '14 at 09:08
  • Do you mean `*x_` is null, or `x_` is null? If the latter, obviously that's a bug in the code, not the compiler. – Jonathan Wakely May 09 '14 at 10:02
  • Not sure what i mean ;) - QtCreator says: Name: this->x_, Value: 0x0, Type: *int - I assumed that means null pointer. – Hellagot May 09 '14 at 10:10
  • ABI compatibility - "Since gcc-3.4.0, the ABI is forward compatible. I.E. a library made using an older release can be linked with a newer one and it should work (the reverse doesn't)."(http://stackoverflow.com/questions/2801938/gcc-abi-compatibility) – SChepurin May 09 '14 at 10:32
  • This is Boost.Polygon, NOT Boost.Geometry. – Adam Wulkiewicz May 09 '14 at 22:31
  • I ran into the same problem with gcc 4.9.0 (on gentoo). Since ArchLinux updated to a more recent snapshot of gcc, this will hopefully be solved in gcc 4.9.1 I guess! – Xoph Jun 05 '14 at 17:09
  • The question doesn't need closing. It needs an answer, and you can now provide that i think:). After that you can approve the answer and you're done:) – laurisvr May 15 '15 at 09:02

0 Answers0