-
-
Notifications
You must be signed in to change notification settings - Fork 188
Update a Port
rohrbachger edited this page Oct 27, 2023
·
5 revisions
This documentation guides you through the process of updating GCC (with an example using GCC 12.2). As part of this update, libstdc++.so.6
will also be updated.
-
Verify GLIBC Versions:
strings /usr/lib/libstdc++.so.6 | grep GLIBC
- Fresh Environment: To ensure a smooth process, it's recommended to start with a fresh environment.
-
Clone the Repository:
- Clone the Thinstation repository.
git clone --depth 1 https://github.com/Thinstation/thinstation.git
- This creates a folder named
thinstation
.
- Clone the Thinstation repository.
-
Initialize Base Environment:
- Navigate to the cloned directory and run the setup.
cd thinstation ./setup-chroot
- Navigate to the cloned directory and run the setup.
-
Navigate to GCC Port:
cd /ts/ports/core/gcc
-
Edit the Pkgfile:
- Modify the
Pkgfile
to update the GCC and ISL version. Ensure their versions are compatible. Also, verify the download links.name=gcc version=12.2.0 _version=7 _islver=0.24 release=1 _commit=c2103c17 checkdepends=('dejagnu' 'inetutils') options=('!emptydirs') source=(ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-${_islver}.tar.bz2 ftp://gcc.gnu.org/pub/gcc/releases/gcc-$_version/$_name-$_version.tar.xz)
- Modify the
-
Modify
pkgmk
Tool:vi /usr/bin/pkgmk
- Comment out the line:
#export LC_ALL=POSIX
- Comment out the line:
-
Set the Locale:
- This is required to prevent
bsdtar
failures.localedef -c -f UTF-8 -i en_US en_US.UTF-8 export LC_ALL=en_US.UTF-8
- This is required to prevent
-
Initiate Package Download:
pkgmk -i -d
-
Note: If the MD5 checksum of the downloaded file doesn't match the locally stored one, reset the MD5 checksum using:
pkgmk -um
-
Note: If the MD5 checksum of the downloaded file doesn't match the locally stored one, reset the MD5 checksum using:
-
Build the Package:
- Start the build process. This might take a few hours.
pkgmk -i -u
- If you encounter an error:
ERROR: Building '/ts/ports/core/gcc/gcc#12.2.0-1.pkg.tar.xz' failed.
- Reset the footprint using:
pkgmk -uf
- Start the build process. This might take a few hours.
-
Reattempt the Build:
pkgmk -i -u
-
Compress the Build:
- For this you need memory, 16GB seems to be minimum
shrink gcc
-
Completion:
- At the end of this process, the new GCC version is installed in the build environment. A new port file will also be generated. You can use this file, along with the
Pkgfile
, to set up a new build environment, saving compilation time and bypassing the steps mentioned above.
- At the end of this process, the new GCC version is installed in the build environment. A new port file will also be generated. You can use this file, along with the