Build and publish errors for developer/gcc-6 on SPARC
The OI source is from 2018. Consequently, there may be a new version of the source, or some of the bugs may have already been fixed. Though the changes have been developed on SPARC hardware, they might correct bugs in some x86 packages. In any case, they should not affect other x86 packages.
While building gcc-6 on SPARC hardware, I got this error:
ld: fatal: file crtbeginS.o: open failed: No such file or directory ld: fatal: file crtendS.o: open failed: No such file or directory ld: fatal: file processing errors. No output written to sparcv9/libgcc_s.so.1.tmp collect2: error: ld returned 1 exit status Makefile:945: recipe for target 'libgcc_s.so' failed make: *** [libgcc_s.so] Error 1
The cause is the missing crt files. The solution is an update to the patch patches/001-illumos-gcc.patch file, attached as 001-illumos-gcc.diff .
Next, I got this error:
checking for suffix of object files... configure: error: in `.../oi-userland/components/developer/gcc-6/build/sparcv7/sparc-sun-solaris2.11/libgcc': configure: error: cannot compute suffix of object files: cannot compile See `config.log' for more details. Makefile:18047: recipe for target 'configure-stage2-target-libgcc' failed make: *** [configure-stage2-target-libgcc] Error 1
The cause, in this case, is the --enable-initfini-array configure option, which causes an internal compiler error (ICE) on SPARC hardware. The patch Makefile.diff corrects this problem. With these two changes, the build completed successfully. Note that some changes to the Makefile may already have been incorporated into OI.
The publish step on SPARC hardware produced many errors like this:
Couldn't find 'usr/gcc/6/lib/gcc/i386-pc-solaris2.11/6.4.0/plugin/include/hash-set.h' in any of the specified search directories:
In fact, there were 617 of them. The cause was the string i386-pc-solaris2.11 which should be replaced with $(GNU_ARCH) . Making that change led to a few of these errors:
Couldn't find 'usr/gcc/6/lib/gcc/sparc-sun-solaris2.11/6.4.0/plugin/include/hash-set.h' in any of the specified search directories:
These errors were caused by files that were not created during install on SPARC hardware. Appending variant.arch=i386 corrected that problem. The attached files to correct the manifests are gcc-6.diff and gfortran-6-runtime.diff .