Project

General

Profile

Bug #11887

Build and publish errors for developer/gcc-6 on SPARC

Added by Gary Mills about 1 year ago. Updated about 1 year ago.

Status:
New
Priority:
Normal
Category:
OI-Userland
Target version:
Start date:
2019-10-31
Due date:
2019-10-31 (about 13 months late)
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
sparc

Description

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[6]: *** [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[3]: *** [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 .


Files

001-illumos-gcc.diff (679 Bytes) 001-illumos-gcc.diff Gary Mills, 2019-10-29 01:05 AM
gcc-6.diff (121 KB) gcc-6.diff Gary Mills, 2019-10-29 01:06 AM
gfortran-6-runtime.diff (704 Bytes) gfortran-6-runtime.diff Gary Mills, 2019-10-29 01:06 AM
Makefile.diff (3.05 KB) Makefile.diff Gary Mills, 2019-10-29 01:06 AM
#1

Updated by Michal Nowak about 1 year ago

  • Tags set to sparc
#2

Updated by Aurélien Larcher about 1 year ago

  • Due date set to 2019-10-31
  • Assignee changed from OI Userland to Aurélien Larcher
  • Start date set to 2019-10-31
#3

Updated by Aurélien Larcher about 1 year ago

Thank you Gary I will take care of this.

Also available in: Atom PDF