And everything went well until the `make` step - it just blew up with a million compiler errors. I did the same thing under OpenSUSE and it built just fine.
And everything went well until the `make` step - it just blew up with a million compiler errors. I did the same thing under OpenSUSE and it built just fine.
Usually it's just this sequence:
wget gcc... whichever
untar it and go into the directory
within that directory ./contrib/download_prerequisites
outside of that directory create a build directory, go in there and do a config. I usually do (for example in 9.1 case, but it has been the same forever now):
../gcc-9.1.0/configure --prefix=<my_home_dir>/tools/gcc-9-1-0 --enable-languages=c,c++,ada --disable-multilib --enable-checking=release --with-pkgversion='GCC Keyframe'
For Ada you have to have an Ada enabled compiler already, so omit ada
and after that it's simple make and then make install
I also have functions in my .zshrc with which I set envs so I can easily switch between gcc versions (and linkers) and that's it.
After transcribing the ~300 lines I tried to compile for the first time: 3728 errors and warnings...
I read through the code and everything looked correct, so I gave up.
Picked it up again some weeks later. Turned out that I had, by force of habit, erroneously added a semicolon at the end of macro definition on line 3. Fixing that it compiled flawlessly.
At the time I was also unaware that I was actually using a C++ compiler, djgpp, which I'm sure did the error count no favors.