gcc 8.2.0 - Silent failure compiling in Irixports - Resolved

Unxmaal

Administrator
Staff member
Feb 8, 2019
30
9
8
This is on Octodad, in my homedir /usr/people/edodd/projects/github/unxmaal/irixports/gcc8:

C:
gmake[3]: Leaving directory '/usr/people/edodd/projects/github/unxmaal/irixports/gcc8/gcc-gcc-8_2_0c-irix/mips-sgi-irix6.5/libstdc++-v3/include'
gmake[2]: Leaving directory '/usr/people/edodd/projects/github/unxmaal/irixports/gcc8/gcc-gcc-8_2_0c-irix'
gmake[1]: *** [Makefile:22954: stage1-bubble] Error 2
gmake[1]: Leaving directory '/usr/people/edodd/projects/github/unxmaal/irixports/gcc8/gcc-gcc-8_2_0c-irix'
gmake: *** [Makefile:940: all] Error 2
(Also note: I discovered Github will handle "release" tarballs for us, so I made this for ease of irixports fetching: https://github.com/sgidevnet/gcc/releases/tag/gcc-8_2_0c-irix ).

Here's the Irixports package.sh:

Bash:
#!/opt/local/bin/mksh ../.port.sh
port=gcc
version=8.2.0
useconfigure=true
workdir=gcc-gcc-8_2_0c-irix
configopts="--with-gmp=/opt/local/gmp --with-mpfr=/opt/local/mpfr --with-mpc=/opt/local/mpc"
files="https://codeload.github.com/sgidevnet/gcc/tar.gz/gcc-8_2_0c-irix gcc-8_2_0c-irix.tar.gz 22d3f1142a964cd1f46a16316f5073b71facb533"
Any ideas what's dying here?
 
Last edited:

Unxmaal

Administrator
Staff member
Feb 8, 2019
30
9
8
Woops. Ran it again and saw this:

C:
../../.././libgomp/env.c: In function 'handle_omp_display_env':
../../.././libgomp/env.c:1206:24: error: format '%llu' expects argument of type 'long long unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format=]
       fprintf (stderr, "  GOMP_SPINCOUNT = '%"PRIu64"'\n",
                        ^~~~~~~~~~~~~~~~~~~~~~~
         (uint64_t) gomp_spin_count_var);
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../.././libgomp/env.c:40:
/usr/include/inttypes.h:304:26: note: format string is defined here
 #define PRIu64        "llu"
 

onre

Administrator
Staff member
Feb 8, 2019
58
18
8
FWIW, I haven't built this natively. @hammy has done it many times, though - he may have some input. Also, if you're attempting making a proper port, there are a couple of scenarios to consider. Here:



For a native build, the default configuration is to perform a 3-stage bootstrap of the compiler when ‘make’ is invoked. This will build the entire GCC system and ensure that it compiles itself correctly. It can be disabled with the --disable-bootstrap parameter to ‘configure’, but bootstrapping is suggested because the compiler will be tested more completely and could also have better performance.


I don't know what is the last version of GCC that can be bootstrapped with MIPSpro, but this would be the proper way of doing it anyway.
 

hammy

Member
Jun 1, 2019
35
12
8
UK
Getting gcc8 bootstrapped natively on Irix is quite an involved process - you'll to need do the build with an appropriate version of binutils and a recent enough C++ compiler. Select only the appropriate languages and specify the proper parameters to enable sjlj style exception handling. You want to set up a number of env vars too to ensure it's picking up the right tools.

Look in the config.log of the build that onre made to get those parameters and see which things it picked up for his build.

FYI - you can't take a snapshot from gcc git repository and expect it to build without any changes. As part of the gcc release process they build a number of release artifacts that aren't in the raw git repository.

Good luck.
 

Unxmaal

Administrator
Staff member
Feb 8, 2019
30
9
8
Getting gcc8 bootstrapped natively on Irix is quite an involved process - you'll to need do the build with an appropriate version of binutils and a recent enough C++ compiler. Select only the appropriate languages and specify the proper parameters to enable sjlj style exception handling. You want to set up a number of env vars too to ensure it's picking up the right tools.

Look in the config.log of the build that onre made to get those parameters and see which things it picked up for his build.

FYI - you can't take a snapshot from gcc git repository and expect it to build without any changes. As part of the gcc release process they build a number of release artifacts that aren't in the raw git repository.

Good luck.

Apologies for any confusion: this is the SGIdev fork of the main GCC repo. I'm using a tarball made from a branch that @onre is using to hold and track the changes he has to make such that GCC will compile.

I had thought this branch was known-good and working. Maybe I'm wrong?

Also, this is being compiled with a pre-existing gcc8 on Octodad.
 

hammy

Member
Jun 1, 2019
35
12
8
UK
Well if you are compiling from an already known good gcc8 you can skip the bootstrap/multi-stage build - and you might get away without using the release artifacts of gcc like the lexer.

There still remains the issue of using a binutils compiled with the same compiler that uses them. See linux from scratch where they do a little build-binutils/build-gcc/build-bintuils/build-gcc dance. http://www.linuxfromscratch.org/lfs/view/stable/chapter05/chapter05.html

Whether your "build" binutils+gcc8 is known good and working is not a question I can answer .-)

Not intentionally wanted to be cocky - but I thought there was still issues with fixincludes?
 

onre

Administrator
Staff member
Feb 8, 2019
58
18
8
There are, at least the limits.h one, possibly more. Also, there is no binutils branch of our own - at least yet - but I've used @hammy 's patch for 2.21.1 and it has worked well. It's not in the preview tardist I made at some point, but it'll work with it if you compile it yourself.

This stuff clearly needs to be versioned ASAP.
 

onre

Administrator
Staff member
Feb 8, 2019
58
18
8
Also, I am really not sure whether this is the right time to make a port of this stuff.