Project

General

Profile

Actions

Bug #3800

open

ld: fatal: file ...crtbegin.o; section [7].eh_frame and file .libs/sjlj.o; section [12].eh_frame have incompatibile attributes and cannot be merged into a single output section

Added by Richard PALO over 8 years ago. Updated over 8 years ago.

Status:
Feedback
Priority:
High
Assignee:
-
Category:
tools - gate/build tools
Start date:
2013-06-01
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

I've noticed lately while building gcc47 and gcc48 the following:

checking for log10... libtool: link: /tmp/pkgsrc/lang/gcc48/work/build/./gcc/xgcc -B/tmp/pkgsrc/lang/gcc48/work/build/./gcc/ -B/opt/pkg/gcc48/i386-sun-solaris2.11/bin/ -B/opt/pkg/gcc48/i386-sun-solaris2.11/lib/ -isystem /opt/pkg/gcc48/i386-sun-solaris2.11/include -isystem /opt/pkg/gcc48/i386-sun-solaris2.11/sys-include  -m64 -shared -Wl,-z -Wl,text -Wl,-h -Wl,libitm.so.1 -o .libs/libitm.so.1.0.0  .libs/aatree.o .libs/alloc.o .libs/alloc_c.o .libs/alloc_cpp.o .libs/barrier.o .libs/beginend.o .libs/clone.o .libs/eh_cpp.o .libs/local.o .libs/query.o .libs/retry.o .libs/rwlock.o .libs/useraction.o .libs/util.o .libs/sjlj.o .libs/tls.o .libs/method-serial.o .libs/method-gl.o .libs/method-ml.o .libs/x86_sse.o .libs/x86_avx.o    -mrtm -pthread -m64 -Wl,-M -Wl,../../../../gcc-4.8.0/libitm/clearcap.map -Wl,-R/opt/pkg/lib -m64 -Wl,-M -Wl,libitm.map-sun  
ld: fatal: file /tmp/pkgsrc/lang/gcc48/work/build/./gcc/amd64/crtbegin.o; section [7].eh_frame and file .libs/sjlj.o; section [12].eh_frame have incompatibile attributes and cannot be merged into a single output section
collect2: error: ld returned 1 exit status
gmake[8]: *** [libitm.la] Error 1
gmake[8]: Leaving directory `/tmp/pkgsrc/lang/gcc48/work/build/i386-sun-solaris2.11/amd64/libitm'
gmake[7]: *** [all-recursive] Error 1
gmake[7]: Leaving directory `/tmp/pkgsrc/lang/gcc48/work/build/i386-sun-solaris2.11/amd64/libitm'
gmake[6]: *** [all] Error 2
gmake[6]: Leaving directory `/tmp/pkgsrc/lang/gcc48/work/build/i386-sun-solaris2.11/amd64/libitm'
gmake[5]: *** [multi-do] Error 1
gmake[5]: Leaving directory `/tmp/pkgsrc/lang/gcc48/work/build/i386-sun-solaris2.11/libitm'
gmake[4]: *** [all-multi] Error 2
gmake[4]: Leaving directory `/tmp/pkgsrc/lang/gcc48/work/build/i386-sun-solaris2.11/libitm'
yes
checking for __sync_add_and_fetch_8... gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/tmp/pkgsrc/lang/gcc48/work/build/i386-sun-solaris2.11/libitm'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/tmp/pkgsrc/lang/gcc48/work/build/i386-sun-solaris2.11/libitm'
gmake[1]: *** [all-target-libitm] Error 2

Here are the attributes:

richard@dev32:/tmp/pkgsrc/lang/gcc48/work/build/i386-sun-solaris2.11/amd64/libitm$ /usr/bin/nm -s .libs/sjlj.o 

.libs/sjlj.o:

[Index]   Value                Size                Type  Bind  Other Shname         Name

[1]    |                   0|                   0|SECT |LOCL |0    |.text         |
[2]    |                   0|                   0|SECT |LOCL |0    |.data         |
[3]    |                   0|                   0|SECT |LOCL |0    |.bss          |
[4]    |                   0|                   0|SECT |LOCL |0    |.debug_info   |
[5]    |                   0|                   0|SECT |LOCL |0    |.debug_abbrev |
[6]    |                   0|                   0|SECT |LOCL |0    |.debug_line   |
[7]    |                   0|                   0|SECT |LOCL |0    |.debug_aranges|
[8]    |                   0|                   0|SECT |LOCL |0    |.eh_frame     |
[9]    |                   0|                  56|FUNC |GLOB |0    |.text         |_ITM_beginTransaction
[10]    |                   0|                   0|NOTY |GLOB |0    |UNDEF         |GTM_begin_transaction
[11]    |                  56|                  35|FUNC |GLOB |2    |.text         |GTM_longjmp
richard@dev32:/tmp/pkgsrc/lang/gcc48/work/build/i386-sun-solaris2.11/amd64/libitm$ /usr/bin/nm -s  /tmp/pkgsrc/lang/gcc48/work/build/./gcc/amd64/crtbegin.o

/tmp/pkgsrc/lang/gcc48/work/build/./gcc/amd64/crtbegin.o:

[Index]   Value                Size                Type  Bind  Other Shname         Name

[24]    |                   0|                   0|SECT |LOCL |0    |.init         |
[2]    |                   0|                   0|SECT |LOCL |0    |.text         |
[3]    |                   0|                   0|SECT |LOCL |0    |.data         |
[4]    |                   0|                   0|SECT |LOCL |0    |.bss          |
[25]    |                   0|                   0|SECT |LOCL |0    |.comment      |
[6]    |                   0|                   0|SECT |LOCL |0    |.ctors        |
[12]    |                   0|                   0|SECT |LOCL |0    |.jcr          |
[8]    |                   0|                   0|SECT |LOCL |0    |.dtors        |
[21]    |                   0|                   0|SECT |LOCL |0    |.fini         |
[10]    |                   0|                   0|SECT |LOCL |0    |.eh_frame     |
[14]    |                   0|                   0|SECT |LOCL |0    |.tm_clone_table|
[7]    |                   0|                   0|OBJT |LOCL |0    |.ctors        |__CTOR_LIST__
[32]    |                   0|                   0|NOTY |WEAK |0    |UNDEF         |__deregister_frame_info_bases
[18]    |                 112|                   0|FUNC |LOCL |0    |.text         |__do_global_dtors_aux
[30]    |                   8|                   0|OBJT |GLOB |2    |.data         |__dso_handle
[31]    |                   0|                   0|NOTY |GLOB |2    |UNDEF         |__DTOR_END__
[9]    |                   0|                   0|OBJT |LOCL |0    |.dtors        |__DTOR_LIST__
[11]    |                   0|                   0|OBJT |LOCL |0    |.eh_frame     |__EH_FRAME_BEGIN__
[13]    |                   0|                   0|OBJT |LOCL |0    |.jcr          |__JCR_LIST__
[33]    |                   0|                   0|NOTY |WEAK |0    |UNDEF         |__register_frame_info_bases
[26]    |                   0|                   0|NOTY |GLOB |2    |UNDEF         |__TMC_END__
[15]    |                   0|                   0|OBJT |LOCL |0    |.tm_clone_table|__TMC_LIST__
[27]    |                   0|                   0|NOTY |GLOB |0    |UNDEF         |_GLOBAL_OFFSET_TABLE_
[28]    |                   0|                   0|NOTY |WEAK |0    |UNDEF         |_ITM_deregisterTMCloneTable
[29]    |                   0|                   0|NOTY |WEAK |0    |UNDEF         |_ITM_registerTMCloneTable
[34]    |                   0|                   0|NOTY |WEAK |0    |UNDEF         |_Jv_RegisterClasses
[19]    |                   0|                   1|OBJT |LOCL |0    |.bss          |completed.5372
[1]    |                   0|                   0|FILE |LOCL |0    |ABS           |crtstuff.c
[16]    |                   0|                   0|FUNC |LOCL |0    |.text         |deregister_tm_clones
[20]    |                   8|                   8|OBJT |LOCL |0    |.bss          |dtor_idx.5374
[5]    |                   0|                   0|OBJT |LOCL |0    |.data         |force_to_data
[22]    |                 240|                   0|FUNC |LOCL |0    |.text         |frame_dummy
[23]    |                  32|                  48|OBJT |LOCL |0    |.bss          |object.5384
[17]    |                  48|                   0|FUNC |LOCL |0    |.text         |register_tm_clones

and attached is an LD_OPTIONS output from the following command:

LD_OPTIONS=-Dfiles,detail,reloc,move,unused,got,sections,segments /tmp/pkgsrc/lang/gcc48/work/build/./gcc/xgcc -B/tmp/pkgsrc/lang/gcc48/work/build/./gcc/ -B/opt/pkg/gcc48/i386-sun-solaris2.11/bin/ -B/opt/pkg/gcc48/i386-sun-solaris2.11/lib/ -isystem /opt/pkg/gcc48/i386-sun-solaris2.11/include -isystem /opt/pkg/gcc48/i386-sun-solaris2.11/sys-include  -m64 -shared -Wl,-z -Wl,text -Wl,-h -Wl,libitm.so.1 -o .libs/libitm.so.1.0.0  .libs/aatree.o .libs/alloc.o .libs/alloc_c.o .libs/alloc_cpp.o .libs/barrier.o .libs/beginend.o .libs/clone.o .libs/eh_cpp.o .libs/local.o .libs/query.o .libs/retry.o .libs/rwlock.o .libs/useraction.o .libs/util.o .libs/sjlj.o .libs/tls.o .libs/method-serial.o .libs/method-gl.o .libs/method-ml.o .libs/x86_sse.o .libs/x86_avx.o    -mrtm -pthread -m64 -Wl,-M -Wl,../../../../gcc-4.8.0/libitm/clearcap.map -Wl,-R/opt/pkg/lib -m64 -Wl,-M -Wl,libitm.map-sun

Is it possible that this is related to the recent fixes?

BTW - for some very strange reason, I seem to be able get over this if I force builds to use pkgsrc's binutils-2.23.2

I can make a tarball available.


Files

ldoptions.txt (44.7 KB) ldoptions.txt Richard PALO, 2013-06-01 03:39 PM
Actions

Also available in: Atom PDF