Opened 4 years ago

Closed 3 years ago

#5895 closed defect (fixed)

Configure error with GCC 6.2.0 and libsnappy

Reported by: Zeranoe Owned by:
Priority: important Component: build system
Version: git-master Keywords: regression
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


When using MinGW-w64 and GCC 6.2.0 and configuring with


the configure process errors with relocation overflows.

There are numerous overflow errors, but the first is

libstdc++.a(cow-stdexcept.o): In function `_txnal_cow_string_C1_for_exceptions(void*, char const*, void*)':$_Z35_txnal_cow_string_C1_for_exceptionsPvPKcS_+0x2c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_ITM_RU1'

This appears to be happening because of the ldflag


added on line 4769 in configure, and removing this ldflag resolves the issue for me.

This ldflag was added with commit a58c22d61260941fc651add73836882d5b112fdb

Change History (3)

comment:1 Changed 4 years ago by cehoyos

  • Keywords regression added
  • Status changed from new to open

comment:2 Changed 4 years ago by heleppkes

This LDFLAG exists for security reasons, I suggest you inquire with snappy why they don't work with it.

comment:3 Changed 3 years ago by Zeranoe

  • Resolution set to fixed
  • Status changed from open to closed

This was resolved by patching libstdc++-v3/config/os/mingw32-w64/os_defines.h in GCC's source.

diff -uprN a/libstdc++-v3/config/os/mingw32-w64/os_defines.h b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
--- a/libstdc++-v3/config/os/mingw32-w64/os_defines.h   2017-01-01 04:07:43.000000000 -0800
+++ b/libstdc++-v3/config/os/mingw32-w64/os_defines.h   2017-05-25 18:47:52.161016148 -0700
@@ -76,6 +76,7 @@
 #ifdef __x86_64__
 #define _GLIBCXX_LLP64 1
 // Enable use of GetModuleHandleEx (requires Windows XP/2003) in

Further info here

Note: See TracTickets for help on using tickets.