Bug 53902 - make install fails on SunOS 5.11
Summary: make install fails on SunOS 5.11
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.7.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-09 16:09 UTC by Karel Gardas
Modified: 2014-02-27 00:37 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karel Gardas 2012-07-09 16:09:28 UTC
Hello,
I'm trying to compile/install gcc 4.7.1 on my Solaris 11 Express/amd64 machine but `gmake install' fails in libitm with:

gmake[7]: Entering directory `/var/tmp/gcc-obj/i386-pc-solaris2.11/amd64/libitm'
/bin/sh ./libtool --tag=CC   --mode=link /var/tmp/gcc-obj/./gcc/xgcc -B/var/tmp/gcc-obj/./gcc/ -B/usr/local/gcc-4.7.1/i386-pc-solaris2.11/bin/ -B/usr/local/gcc-4.7.1/i386-pc-solaris2.11/lib/ -isystem /usr/local/gcc-4.7.1/i386-pc-solaris2.11/include -isystem /usr/local/gcc-4.7.1/i386-pc-solaris2.11/sys-include    -Wall -Werror  -Wc,-pthread -g -O2  -m64    -Wl,-M,../../../../gcc-4.7.1/libitm/clearcap.map  -m64 -o libitm.la -version-info 1:0:0 -Wl,-M,libitm.map-sun -rpath /usr/local/gcc-4.7.1/lib/amd64 aatree.lo alloc.lo alloc_c.lo alloc_cpp.lo barrier.lo beginend.lo clone.lo eh_cpp.lo local.lo query.lo retry.lo rwlock.lo useraction.lo util.lo sjlj.lo tls.lo method-serial.lo method-gl.lo method-ml.lo  x86_sse.lo x86_avx.lo   
libtool: link: /var/tmp/gcc-obj/./gcc/xgcc -B/var/tmp/gcc-obj/./gcc/ -B/usr/local/gcc-4.7.1/i386-pc-solaris2.11/bin/ -B/usr/local/gcc-4.7.1/i386-pc-solaris2.11/lib/ -isystem /usr/local/gcc-4.7.1/i386-pc-solaris2.11/include -isystem /usr/local/gcc-4.7.1/i386-pc-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    -pthread -m64 -Wl,-M -Wl,../../../../gcc-4.7.1/libitm/clearcap.map -m64 -Wl,-M -Wl,libitm.map-sun  
ld: fatal: file /var/tmp/gcc-obj/./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[7]: *** [libitm.la] Error 1
gmake[7]: Leaving directory `/var/tmp/gcc-obj/i386-pc-solaris2.11/amd64/libitm'
gmake[6]: *** [all-recursive] Error 1
gmake[6]: Leaving directory `/var/tmp/gcc-obj/i386-pc-solaris2.11/amd64/libitm'
gmake[5]: *** [all] Error 2
gmake[5]: Leaving directory `/var/tmp/gcc-obj/i386-pc-solaris2.11/amd64/libitm'
gmake[4]: *** [multi-do] Error 1
gmake[4]: Leaving directory `/var/tmp/gcc-obj/i386-pc-solaris2.11/libitm'
gmake[3]: *** [all-multi] Error 2
gmake[3]: Leaving directory `/var/tmp/gcc-obj/i386-pc-solaris2.11/libitm'
gmake[2]: *** [install-recursive] Error 1
gmake[2]: Leaving directory `/var/tmp/gcc-obj/i386-pc-solaris2.11/libitm'
gmake[1]: *** [install-target-libitm] Error 2
gmake[1]: Leaving directory `/var/tmp/gcc-obj'
gmake: *** [install] Error 2
karel@silence:/var/tmp/gcc-obj$ 

bootstrapping compiler is:

$ gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs
Configured with: /builds2/sfwnv-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-20050802)
Comment 1 T.J. Yang 2012-08-09 10:16:22 UTC
I got same error message on a Solaris 11 X86 VMWare session also.
Comment 2 T.J. Yang 2012-08-09 10:58:54 UTC
Found following URLs could be helpful to resolve the issue.
http://echelog.com/logs/browse/oi-dev/1315000800.
https://github.com/richlowe/gcc/commit/610511a2a04185795a2e0d08ff25369126719346
Comment 3 T.J. Yang 2012-08-09 11:05:55 UTC
Also at http://gcc.gnu.org/viewcvs/trunk/gcc/configure.ac?revision=189803&view=markup, around line 2461. the previous fix is included in gcc trunk.
Comment 4 T.J. Yang 2012-08-09 11:11:22 UTC
I tried the gcc trunk src and named it as 4.7.2. but I am getting same error message.

tjyang@b-solaris11-amd64:~/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm$ pwd
/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm
tjyang@b-solaris11-amd64:~/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm$ make
make  all-recursive
make[1]: Entering directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm'
Making all in testsuite
make[2]: Entering directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm/testsuite'
make[2]: Entering directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm'
make  DO=all multi-do # make
make[3]: Entering directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm'
if [ -z "amd64" ]; then \
          true; \
        else \
          rootpre=`${PWDCMD-pwd}`/; export rootpre; \
          srcrootpre=`cd /home/tjyang/build/gcc-4.7.2/libitm; ${PWDCMD-pwd}`/; export srcrootpre; \
          lib=`echo "${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$,\1,'`; \
          compiler="/home/tjyang/build/gcc-4.7.2-objdir/./gcc/xgcc -B/home/tjyang/build/gcc-4.7.2-objdir/./gcc/ -B/opt/moto/gcc472/i386-pc-solaris2.11/bin/ -B/opt/moto/gcc472/i386-pc-solaris2.11/lib/ -isystem /opt/moto/gcc472/i386-pc-solaris2.11/include -isystem /opt/moto/gcc472/i386-pc-solaris2.11/sys-include   "; \
          for i in `${compiler} --print-multi-lib 2>/dev/null`; do \
            dir=`echo $i | sed -e 's/;.*$//'`; \
            if [ "${dir}" = "." ]; then \
              true; \
            else \
              if [ -d ../${dir}/${lib} ]; then \
                flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
                if (cd ../${dir}/${lib}; make  \
                                CFLAGS="-g -O2 -pthread ${flags}" \
                                CCASFLAGS="-g -O2 ${flags}" \
                                FCFLAGS=" ${flags}" \
                                FFLAGS=" ${flags}" \
                                ADAFLAGS=" ${flags}" \
                                prefix="/opt/moto/gcc472" \
                                exec_prefix="/opt/moto/gcc472" \
                                GCJFLAGS=" ${flags}" \
                                GOCFLAGS=" ${flags}" \
                                CXXFLAGS="-g -O2 ${flags}" \
                                LIBCFLAGS=" ${flags}" \
                                LIBCXXFLAGS=" ${flags}" \
                                LDFLAGS=" ${flags}" \
                                MULTIFLAGS="${flags}" \
                                DESTDIR="" \
                                INSTALL="/usr/gnu/bin/install -c" \
                                INSTALL_DATA="/usr/gnu/bin/install -c -m 644" \
                                INSTALL_PROGRAM="/usr/gnu/bin/install -c" \
                                INSTALL_SCRIPT="/usr/gnu/bin/install -c" \
                                all); then \
                  true; \
                else \
                  exit 1; \
                fi; \
              else true; \
              fi; \
            fi; \
          done; \
        fi
make[4]: Entering directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/amd64/libitm'
make  all-recursive
make[5]: Entering directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/amd64/libitm'
Making all in testsuite
make[6]: Entering directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/amd64/libitm/testsuite'
make[6]: Nothing to be done for `all'.
make[6]: Leaving directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/amd64/libitm/testsuite'
make[6]: Entering directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/amd64/libitm'
/opt/TWWfsw/sbutils13/lib/aux/bash/bin/bash ./libtool --tag=CC   --mode=link /home/tjyang/build/gcc-4.7.2-objdir/./gcc/xgcc -B/home/tjyang/build/gcc-4.7.2-objdir/./gcc/ -B/opt/moto/gcc472/i386-pc-solaris2.11/bin/ -B/opt/moto/gcc472/i386-pc-solaris2.11/lib/ -isystem /opt/moto/gcc472/i386-pc-solaris2.11/include -isystem /opt/moto/gcc472/i386-pc-solaris2.11/sys-include  -m64 -Wall -Werror  -Wc,-pthread -g -O2 -pthread  -m64    -Wl,-M,/home/tjyang/build/gcc-4.7.2/libitm/clearcap.map  -m64 -o libitm.la -version-info 1:0:0 -Wl,-M,libitm.map-sun -rpath /opt/moto/gcc472/lib/amd64 aatree.lo alloc.lo alloc_c.lo alloc_cpp.lo barrier.lo beginend.lo clone.lo eh_cpp.lo local.lo query.lo retry.lo rwlock.lo useraction.lo util.lo sjlj.lo tls.lo method-serial.lo method-gl.lo method-ml.lo  x86_sse.lo x86_avx.lo
libtool: link: /home/tjyang/build/gcc-4.7.2-objdir/./gcc/xgcc -B/home/tjyang/build/gcc-4.7.2-objdir/./gcc/ -B/opt/moto/gcc472/i386-pc-solaris2.11/bin/ -B/opt/moto/gcc472/i386-pc-solaris2.11/lib/ -isystem /opt/moto/gcc472/i386-pc-solaris2.11/include -isystem /opt/moto/gcc472/i386-pc-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    -m64 -pthread -pthread -m64 -Wl,-M -Wl,/home/tjyang/build/gcc-4.7.2/libitm/clearcap.map -m64 -Wl,-M -Wl,libitm.map-sun   -pthread
ld: fatal: file .libs/aatree.o; section [27].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
make[6]: *** [libitm.la] Error 1
make[6]: Leaving directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/amd64/libitm'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/amd64/libitm'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/amd64/libitm'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/tjyang/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm'
make: *** [all] Error 2
tjyang@b-solaris11-amd64:~/build/gcc-4.7.2-objdir/i386-pc-solaris2.11/libitm$
Comment 5 rogerio.araujo 2013-09-03 21:13:15 UTC
Same build error occured while building gcc 4.8.0 on Solaris 10.
Comment 6 Karel Gardas 2014-02-03 21:05:59 UTC
Hello,
just attempted to build GCC 4.8.2 on Solaris 11.0, bootstraping GCC is:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gcc/4.5/lib/gcc/i386-pc-solaris2.11/4.5.2/lto-wrapper
Target: i386-pc-solaris2.11
Configured with: /builds/hudson/workspace/nightly/build/i386/components/gcc45/gcc-4.5.2/configure CC=/ws/onnv-tools/SUNWspro/sunstudio12.1/bin/cc CXX=/ws/onnv-tools/SUNWspro/sunstudio12.1/bin/CC --prefix=/usr/gcc/4.5 --mandir=/usr/gcc/4.5/share/man --bindir=/usr/gcc/4.5/bin --libdir=/usr/gcc/4.5/lib --sbindir=/usr/gcc/4.5/sbin --enable-languages=c,c++,fortran,objc --enable-shared --with-gmp-include=/usr/include/gmp --with-mpfr-include=/usr/include/mpfr --prefix=/usr/gcc/4.5 --mandir=/usr/gcc/4.5/share/man --infodir=/usr/gcc/4.5/share/info --libexecdir=/usr/gcc/4.5/lib CFLAGS='-g -O2 '
Thread model: posix
gcc version 4.5.2 (GCC) 

complaining linker is:

$ ld --version
ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.2280

Is there any information I need to provide in order to easy the fix of this issue?

Thanks!
Karel
Comment 7 Rich Lowe 2014-02-27 00:37:10 UTC
I'm pretty sure this is a result of using an older binutils.  As best as I can tell, s11 shipped with 2.19, and s11u1 with 2.21.  I know that 2.19 will fail in this manner, and that 2.22 appears to work.  I have not personally tried 2.21