Try this command and reply with its output:

    objdump -f 
"C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a"
 | grep "cow-stdexcept.o"

------------------                               
Best regards,
lh_mouse
2016-07-24

-------------------------------------------------------------
发件人:Ricardo Constantino <wiia...@gmail.com>
发送日期:2016-07-24 23:10
收件人:msys2-users
抄送:
主题:[Msys2-users] Relocation errors when linking with static libstdc++
 starting with GCC 6 (64-bit only)

Both FFmpeg and mpv when linking with -lstdc++ fail with these exact errors 
when compiling with x86_64-w64-mingw32 GCC 6.1

There errors are only fixed by not including libs which need libstdc++ and use 
exceptions or by reverting to GCC 5.4. Haven't tried not using static 
libstdc++, since I'd prefer not depending on DLLs not included with Windows.

Something like this probably needs to be done in mingw64 as well: 
https://github.com/gcc-mirror/gcc/commit/40c727c8722ab47a821e2fe371f1b6b96be0200d


C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_Z35_txnal_cow_string_C1_for_exceptionsPvPKcS_+0x2c):
 relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_ITM_RU1'
C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_Z35_txnal_cow_string_C1_for_exceptionsPvPKcS_+0x39):
 relocation truncated to fit: R_X86_64_PC32 against undefined symbol 
`transaction clone for operator new[](unsigned long long)'
C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_Z35_txnal_cow_string_C1_for_exceptionsPvPKcS_+0x5d):
 relocation truncated to fit: R_X86_64_PC32 against undefined symbol 
`_ITM_memcpyRtWn'
C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_Z23_txnal_cow_string_c_strPKv+0x1):
 relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_ITM_RU8'
C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_Z23_txnal_sso_string_c_strPKv+0x1):
 relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_ITM_RU8'
C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_Z20_txnal_cow_string_D1Pv+0x5):
 relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_ITM_RU8'
C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_Z20_txnal_cow_string_D1Pv+0x1e):
 relocation truncated to fit: R_X86_64_PC32 against undefined symbol 
`_ITM_addUserCommitAction'
C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_ZGTtNSt11logic_errorC1EPKc+0x2e):
 relocation truncated to fit: R_X86_64_PC32 against undefined symbol 
`_ITM_memcpyRnWt'
C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_ZGTtNSt11logic_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x2e):
 relocation truncated to fit: R_X86_64_PC32 against undefined symbol 
`_ITM_memcpyRnWt'
C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_ZGTtNSt11logic_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0x36):
 relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_ITM_RU8'
C:/builds/ab/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0\libstdc++.a(cow-stdexcept.o):(.text$_ZGTtNSt11logic_errorD0Ev+0x1a):
 additional relocation overflows omitted from the output
collect2.exe: error: ld returned 1 exit status


It can be reproduced with:

```
(open mingw64-shell)

export CC=gcc
#MINGW_PREFIX=/mingw64

git clone https://github.com/lachs0r/rubberband.git
cd rubberband
make -j4 PREFIX="$MINGW_PREFIX" install-static

git clone https://git.ffmpeg.org/ffmpeg.git
cd ffmpeg
./configure --enable-librubberband --pkg-config-flags=--static --arch=x86_64 \
--disable-everything --enable-filter=rubberband --enable-gpl
make -j4
```

Should error out in the end, linking ffmpeg.exe.

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Msys2-users mailing list
msys2-us...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to