pkgsrc-Users archive

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

Can't build gcc7 on Solaris 10



Hi,
I'm trying to build gcc7 on Solaris 10. I tried with gcc 3.4.3 which is provided with Solaris as SunFreeWare (SFW) but it always get stuck there on build :

if [ xinfo = xinfo ]; then \
        /usr/pkgsrc/lang/gcc7/work/.tools/bin/makeinfo --split-size=5000000 --split-size=5000000 --split-size=5000000 --no-split -I . -I ../../gcc-7.2.0/gcc/doc \
                -I ../../gcc-7.2.0/gcc/doc/include -o doc/cppinternals.info ../../gcc-7.2.0/gcc/doc/cppinternals.texi; \
fi
echo timestamp > gcc.pod
perl ../../gcc-7.2.0/gcc/../contrib/texi2pod.pl ../../gcc-7.2.0/gcc/doc/invoke.texi > gcc.pod
echo timestamp > doc/gcc.1
(pod2man --center="GNU" --release="gcc-7.2.0" --date=2017-08-14 --section=1 gcc.pod > doc/gcc.1.T$$ && \
        mv -f doc/gcc.1.T$$ doc/gcc.1) || \
        (rm -f doc/gcc.1.T$$ && exit 1)
cp doc/gcc.1 doc/g++.1
/usr/pkgsrc/lang/gcc7/work/build/./gcc/xgcc -B/usr/pkgsrc/lang/gcc7/work/build/./gcc/ -nostdinc -x c /dev/null -S -o /dev/null -fself-test=../../gcc-7.2.0/gcc/testsuite/selftests

CPU is completly used by cc1. I thought it might be simply slow but I let it compile for 2-3 days and it didn't get any further. It's simply stuck there...

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 -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    -g -std=c99 -O2 -D_FORTIFY_SOURCE=2 -I/usr/include -m32 -O2 -g -std=c99 -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  -I. -I. -I../../.././gcc -I../../../../gcc-7.1.0/libgcc -I../../../../gcc-7.1.0/libgcc/. -I../../../../gcc-7.1.0/libgcc/../gcc -I../../../../gcc-7.1.0/libgcc/../include   -g0  -finhibit-size-directive -fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize -fbuilding-libgcc -fno-stack-protector   -I. -I. -I../../.././gcc -I../../../../gcc-7.1.0/libgcc -I../../../../gcc-7.1.0/libgcc/. -I../../../../gcc-7.1.0/libgcc/../gcc -I../../../../gcc-7.1.0/libgcc/../include  -o gmon.o -MT gmon.o -MD -MP -MF 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"
     ^~~~~~~~~~~~~~~~~~~~
gmake[5]: *** [gmon.o] 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.
bmake: stopped in /usr/pkgsrc/lang/gcc7

My mkconf file as nothing really special :

.ifdef BSD_PKG_MK       # begin pkgsrc settings

ABI=                    64
PKGSRC_COMPILER=        gcc
GCCBASE=                /usr/sfw

PKG_DBDIR=              /usr/pkg/pkgdb
LOCALBASE=              /usr/pkg
VARBASE=                /var
PKG_TOOLS_BIN=          /usr/pkg/sbin
PKGINFODIR=             info
PKGMANDIR=              man

TOOLS_PLATFORM.install?=        /usr/pkg/bin/bsdinstall
TOOLS_PLATFORM.awk?=            /usr/pkg/bin/nawk
TOOLS_PLATFORM.sed?=            /usr/pkg/bin/nbsed
TOOLS_PLATFORM.sh?=             /usr/bin/bash
CFLAGS+=-std=c99
CFLAGS+=-O2
CPPFLAGS+=-O2
CXXFLAGS+=-O2
DBG=                    # prevent DBG from adding default optimizer flags
FETCH_USING=            fetch
.endif                  # end pkgsrc settings

Replace GCCBASE for /opt/csw/bin when using OpenCSW. Any idea anybody ?




Home | Main Index | Thread Index | Old Index