Author Topic: C::B with MinGW binutils 2.19.1 -> 2.20 proposal... (2.19.1 linker bug)  (Read 4985 times)

Offline kaszalubabob

  • Single posting newcomer
  • *
  • Posts: 2
Hi,

I was trying to compile blender 2.5.3-1 with c.b (with mingw) and I've run into this:

Code
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.4.1/../../../../mingw32/bin/ld.exe: BFD (GNU Binutils)
2.19.1 internal error, aborting at ../../binutils-2.19.1/bfd/coffcode.h line 842 in handle_COMDAT

After some digging I've found out that it has been reported as a bug in binutils 2.18:
http://www.mail-archive.com/bug-binutils@gnu.org/msg06398.html

...but c.b is shipped with binutils 2.19.1 so what has left for me to do was to substitute binutils for the most wanted ones 2.20 from official minGW source forge site.

It helped for now, but here comes my question. How should it be done right... I mean merging minGW shipped with c.b with binutils 2.20 (2.19.1->2.20). I've simply copy/paste the tree of folders from binutils archive to minGW folder, but I'm aware of the risk of incompatibility as face it before. When changing gcc from mingw installer to a newer one (3.5 -> 4.4) as I needed omp support - and got this:

Code
[Linker error] undefined reference to `_Unwind_SjLj_Register' 
[Linker error] undefined reference to `_Unwind_SjLj_Resume'
[Linker error] undefined reference to `_Unwind_SjLj_Unregister'
[Linker error] undefined reference to `_Unwind_SjLj_Register'
[Linker error] undefined reference to `_Unwind_SjLj_Resume'
[Linker error] undefined reference to `_Unwind_SjLj_Unregister'
[Linker error] undefined reference to `_Unwind_SjLj_Register'
[Linker error] undefined reference to `_Unwind_SjLj_Resume'
[Linker error] undefined reference to `_Unwind_SjLj_Unregister'
[Linker error] undefined reference to `_Unwind_SjLj_Register'
[Linker error] undefined reference to `_Unwind_SjLj_Resume'
[Linker error] undefined reference to `_Unwind_SjLj_Unregister'

Some people says that it's the matter of which tool has been used to compile minGW tools, for example gcc compiled with v3.5 and ld with v4.5.

However my suggestion is to ship codeblocks with binutils 2.20.

Or I'm not aware of something. ;p

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: C::B with MinGW binutils 2.19.1 -> 2.20 proposal... (2.19.1 linker bug)
« Reply #1 on: September 02, 2010, 01:22:57 am »
I suggest looking at http://tdm-gcc.tdragon.net/ website and see if you find any answers.

The main thing is NOT to mix sjlj and dw2 components.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline kaszalubabob

  • Single posting newcomer
  • *
  • Posts: 2
Re: C::B with MinGW binutils 2.19.1 -> 2.20 proposal... (2.19.1 linker bug)
« Reply #2 on: September 02, 2010, 08:21:48 pm »
Great thanks... now it's much simpler ;)