pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Can't build gcc7 on Solaris 10



Hi,
I changed -std=c99  --> -std=gnu99
I now have this error on gcc 4.9.2 (OpenCSW)

/usr/pkgsrc/lang/gcc7/work/build/./gcc/xgcc -B/usr/pkgsrc/lang/gcc7/work/build/./gcc/ -B/usr/pkg/gcc7/sparc64-sun-solaris2.10/bin/ -B/usr/pkg/gcc7/sparc64-sun-solaris2.10/lib/ -isystem /usr/pkg/gcc7/sparc64-sun-solaris2.10/include -isystem /usr/pkg/gcc7/sparc64-sun-solaris2.10/sys-include    -O2  -g -std=gnu99 -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fPIC -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  -shared -nodefaultlibs -Wl,-h,libgcc_s.so.1 -Wl,-z,text -Wl,-z,defs -Wl,-M,libgcc.map -o sparcv8plus/libgcc_s.so.1.tmp -g -std=gnu99 -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -m32 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulhc3_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divhc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixtfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _fixunstfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatditf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _floatunditf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o _udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -lc && rm -f sparcv8plus/libgcc_s.so && if [ -f sparcv8plus/libgcc_s.so.1 ]; then mv -f sparcv8plus/libgcc_s.so.1 sparcv8plus/libgcc_s.so.1.backup; else true; fi && mv sparcv8plus/libgcc_s.so.1.tmp sparcv8plus/libgcc_s.so.1 && ln -s libgcc_s.so.1 sparcv8plus/libgcc_s.so
ld: fatal: relocation error: R_SPARC_32: file _muldi3_s.o: symbol .text (section): offset 0x7e85dd67 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _negdi2_s.o: symbol .text (section): offset 0x7e85df6d is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _lshrdi3_s.o: symbol .text (section): offset 0x7e85e16e is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ashrdi3_s.o: symbol .text (section): offset 0x7e85e58a is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ucmpdi2_s.o: symbol .text (section): offset 0x7e85e99b is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _clear_cache_s.o: symbol .text (section): offset 0x7e85eb9e is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _absvdi2_s.o: symbol .text (section): offset 0x7e85f375 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _addvsi3_s.o: symbol .text (section): offset 0x7e85f57d is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _subvsi3_s.o: symbol .text (section): offset 0x7e85f985 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _mulvsi3_s.o: symbol .text (section): offset 0x7e85fd8d is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _negvsi2_s.o: symbol .text (section): offset 0x7e8601d6 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _negvdi2_s.o: symbol .text (section): offset 0x7e8603d9 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ffssi2_s.o: symbol .text (section): offset 0x7e8607cd is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ffsdi2_s.o: symbol .text (section): offset 0x7e8609d2 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _clzsi2_s.o: symbol .text (section): offset 0x7e860dd1 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _clzdi2_s.o: symbol .text (section): offset 0x7e860fd9 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ctzsi2_s.o: symbol .text (section): offset 0x7e8611e9 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _ctzdi2_s.o: symbol .text (section): offset 0x7e8613f3 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _popcountsi2_s.o: symbol .text (section): offset 0x7e8617f2 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _popcountdi2_s.o: symbol .text (section): offset 0x7e8619f9 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _powisf2_s.o: symbol .text (section): offset 0x7e862013 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _powidf2_s.o: symbol .text (section): offset 0x7e862221 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _powitf2_s.o: symbol .text (section): offset 0x7e862611 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _mulsc3_s.o: symbol .text (section): offset 0x7e862a0e is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _multc3_s.o: symbol .text (section): offset 0x7e86308e is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _divsc3_s.o: symbol .text (section): offset 0x7e863506 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _divdc3_s.o: symbol .text (section): offset 0x7e863741 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _divtc3_s.o: symbol .text (section): offset 0x7e863b5d is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _bswapdi2_s.o: symbol .text (section): offset 0x7e863fc7 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _clrsbdi2_s.o: symbol .text (section): offset 0x7e8643e1 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixsfdi_s.o: symbol .text (section): offset 0x7e864bda is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixdfdi_s.o: symbol .text (section): offset 0x7e864dde is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixtfdi_s.o: symbol .text (section): offset 0x7e8651c6 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixunssfdi_s.o: symbol .text (section): offset 0x7e8653ca is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixunsdfdi_s.o: symbol .text (section): offset 0x7e8655d6 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _fixunstfdi_s.o: symbol .text (section): offset 0x7e8659bd is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _floatdisf_s.o: symbol .text (section): offset 0x7e865bcb is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _floatdidf_s.o: symbol .text (section): offset 0x7e865ded is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _floatundidf_s.o: symbol .text (section): offset 0x7e8665f7 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _floatunditf_s.o: symbol .text (section): offset 0x7e8669e6 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _divdi3_s.o: symbol .text (section): offset 0x7e866bee is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _moddi3_s.o: symbol .text (section): offset 0x7e866e3b is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _divmoddi4_s.o: symbol .text (section): offset 0x7e867099 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _udivdi3_s.o: symbol .text (section): offset 0x7e867305 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _udivmoddi4_s.o: symbol .text (section): offset 0x7e8677a1 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file _udiv_w_sdiv_s.o: symbol .text (section): offset 0x7e8679f9 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file enable-execute-stack_s.o: symbol .text (section): offset 0x7e867ace is non-aligned
ld: fatal: relocation error: R_SPARC_32: file unwind-dw2_s.o: symbol .text (section): offset 0x7e867e47 is non-aligned
ld: fatal: relocation error: R_SPARC_32: file unwind-dw2-fde-dip_s.o: symbol .text (section): offset 0x7e868ccd is non-aligned
ld: fatal: relocation error: R_SPARC_32: file unwind-c_s.o: symbol .text (section): offset 0x7e869629 is non-aligned
collect2: error: ld returned 1 exit status
gmake[5]: *** [libgcc_s.so] Error 1
gmake[5]: Leaving directory `/usr/pkgsrc/lang/gcc7/work/build/sparc64-sun-solaris2.10/sparcv8plus/libgcc'
gmake[4]: *** [multi-do] Error 1
gmake[4]: Leaving directory `/usr/pkgsrc/lang/gcc7/work/build/sparc64-sun-solaris2.10/libgcc'
gmake[3]: *** [all-multi] Error 2
gmake[3]: Leaving directory `/usr/pkgsrc/lang/gcc7/work/build/sparc64-sun-solaris2.10/libgcc'
gmake[2]: *** [all-stage1-target-libgcc] Error 2
gmake[2]: Leaving directory `/usr/pkgsrc/lang/gcc7/work/build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/usr/pkgsrc/lang/gcc7/work/build'
gmake: *** [all] Error 2
*** Error code 2

Stop.
bmake[1]: stopped in /usr/pkgsrc/lang/gcc7
*** Error code 1

Stop.

Still wating for my other zone with SFW gcc 3.4.3 to end.... or crash. And I suspect it will because I see a lot of these warnings :

cc1plus: warning: -Wmissing-format-attribute ignored without -Wformat
g++ -std=gnu++98 -fno-PIE -c   -g -DIN_GCC    -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc-7.2.0/gcc -I../../gcc-7.2.0/gcc/. -I../../gcc-7.2.0/gcc/../include -I../../gcc-7.2.0/gcc/../libcpp/include -I/usr/pkgsrc/lang/gcc7/work/build/./gmp -I/usr/pkgsrc/lang/gcc7/work/gcc-7.2.0/gmp -I/usr/pkgsrc/lang/gcc7/work/build/./mpfr/src -I/usr/pkgsrc/lang/gcc7/work/gcc-7.2.0/mpfr/src -I/usr/pkgsrc/lang/gcc7/work/gcc-7.2.0/mpc/src  -I../../gcc-7.2.0/gcc/../libdecnumber -I../../gcc-7.2.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-7.2.0/gcc/../libbacktrace -I/usr/pkgsrc/lang/gcc7/work/build/./isl/include -I/usr/pkgsrc/lang/gcc7/work/gcc-7.2.0/isl/include -I/usr/include -o optabs-tree.o -MT optabs-tree.o -MMD -MP -MF ./.deps/optabs-tree.TPo ../../gcc-7.2.0/gcc/optabs-tree.c
cc1plus: warning: -Wmissing-format-attribute ignored without -Wformat
../../gcc-7.2.0/gcc/predict.c: In function `void combine_predictions_for_insn(rtx_insn*, basic_block_def*)':
../../gcc-7.2.0/gcc/predict.c:879: warning: converting to `int' from `double'
../../gcc-7.2.0/gcc/predict.c: In function `void combine_predictions_for_bb(basic_block_def*, bool)':
../../gcc-7.2.0/gcc/predict.c:1201: warning: converting to `int' from `double'
cc1plus: warning: -Wmissing-format-attribute ignored without -Wformat
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:118: warning: converting of negative value `-0x00000000000000001' to `unsigned int'
../../gcc-7.2.0/gcc/reginfo.c: In function `void init_reg_sets()':
../../gcc-7.2.0/gcc/reginfo.c:194: warning: converting of negative value `-0x00000000000000001' to `long unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:194: warning: converting of negative value `-0x00000000000000001' to `long unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:195: warning: converting of negative value `-0x00000000000000001' to `long unsigned int'
../../gcc-7.2.0/gcc/reginfo.c:195: warning: converting of negative value `-0x00000000000000001' to `long unsigned int'



On Thu, Nov 30, 2017 at 4:23 AM, Martin Husemann <martin%duskware.de@localhost> wrote:
On Wed, Nov 29, 2017 at 10:49:39PM -0500, Julien Savard wrote:
> I also tried with gcc4.9 and gcc5.2 provided by OpenCSW. This time it fails
> with this error :
>
> /usr/pkgsrc/lang/gcc7/work/build/./gcc/xgcc
[..]
> /usr/pkg/gcc7/sparc64-sun-solaris2.10/sys-include    -g -std=c99 -O2

That -std=c99 should probably be -std=gnu99

> gmon.dep -fPIC -fPIC -c ../../../../gcc-7.1.0/libgcc/config/sol2/gmon.c
> ../../../../gcc-7.1.0/libgcc/config/sol2/gmon.c:299:5: error: expected
> declaration specifiers or '...' before string constant
>  asm(".global _mcount\n"
>      ^~~~~~~~~~~~~~~~~~~

or that asm should be __asm__ instead.

Martin



Home | Main Index | Thread Index | Old Index