Monday, September 2, 2019

GCC 3.4.6 build

GCC 3.4.6 

My 486 system has old compiler, version 3.3.4.
To bring it sort of up to date i need to compile newer version.

Using only c,c++,obj-c parts of it.

Build script and package creation is done by script witch is based on slackware (11.0) source files.

Compile is done on 486.

First build

Changed config script so no ada, fortran java. 
--enable-languages=c,c++,objc

10 hours later it failed.  :D
This error was not dominant but present:
gcc: Internal error: Terminated (program cc1)
https://stackoverflow.com/questions/30887143/make-j-8-g-internal-compiler-error-killed-program-cc1plus

dmesg
Out of Memory: Killed process 14779 (cc1).Out of Memory: Killed process 14779 (cc1).Out of Memory: Killed process 15487 (sh).Out of Memory: Killed process 15487 (sh).Out of Memory: Killed process 16049 (cc1).Out of Memory: Killed process 16049 (cc1).Out of Memory: Killed process 15488 (genattrtab).Out of Memory: Killed process 15488 (genattrtab).Out of Memory: Killed process 16202 (cc1).Out of Memory: Killed process 16202 (cc1).Out of Memory: Killed process 16071 (make).Out of Memory: Killed process 16071 (make).Out of Memory: Killed process 16977 (cc1).Out of Memory: Killed process 16977 (cc1).Out of Memory: Killed process 16207 (make).Out of Memory: Killed process 16207 (make).
Adding more swap it seems is needed. Lets hope so.

Created a zero-filled regular file of 16M and turned it on (until restart):
dd if=/dev/zero of=/.swapfile bs=16 count=1M
mkswap /.swapfile
swapon /.swapfile
swapon -s

To disable swap if needed:
swapoff /.swapfile
Removed objc also. And removed j 2 from make comand. :D

Compile started again.

9 hours later fail again. Killed it.
cc1: out of memory allocating 9867200 bytes after a total of 7585952 bytes
dd if=/dev/zero of=/.swapfile bs=32 count=1M
Try again.

Finaly done.

Compile time: 1 day 11 hours.
Memory usage: 16 MB RAM+64MB swap (minimum swap free was 11MB by top)

Install


installpkg gcc-3.4.6-i486-1.tgz
installpkg gcc-g++-3.4.6-i486-1.tgz


No comments:

Post a Comment