Hi there, I apologize for bumping this thread. That said, I have been trying to use your script to build an older version of GCC (before 11.0) on my Pi4B (2GB RAM) with 64-Bit Bookworm-Lite installed (note that I have a 512GB SD Card with >300GB of free space). I need an older version of GCC to compile an older version of dolphin on my machine (before 5.0-13669) and sudo apt-get install does not provide any gcc version before g++-11 on my pi4. As a result, your script is the only option I can find to get this installed and I would really like to get it working on my Pi. Unfortunately, I have tried installing numerous versions of g++ on my Pi using your script (e.g. 8.5.0, 9.5.0, and 10.5.0) but I keep getting the same extremely frustrating error message where the compiling aborts after about 45 minutes.My script just does the wget once at the start.
Please see below for the exact implementation of your script that I have been using:
Code:
#!/bin/bash# REMEMBER TO UNCOMMENT THE CONFIGURE LINE FOR YOUR TARGET PLATFORM.# ... and comment out the default of course.## This is the new GCC version to install.#VERSION=10.5.0## --disable-bootstrap (to speed the build on slow computers)#OPTS=--enable-languages=c,c++,fortran \ --disable-multilib \ --disable-werror --disable-libstdcxx## For any computer with less than 4GB of memory.#if [ -f /etc/dphys-swapfile ]; then sudo sed -i 's/^CONF_SWAPSIZE=[0-9]*$/CONF_SWAPSIZE=2048/' /etc/dphys-swapfile sudo /etc/init.d/dphys-swapfile restartfiif [ -d gcc-$VERSION ]; then cd gcc-$VERSION rm -rf objelse wget ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$VERSION/gcc-$VERSION.tar.xz tar xf gcc-$VERSION.tar.xz rm -f gcc-$VERSION.tar.xz cd gcc-$VERSION contrib/download_prerequisitesfimkdir -p objcd obj## Now run the ./configure which must be checked/edited beforehand.# Uncomment the sections below depending on your platform. You may build# on a Pi3 for a target Pi Zero by uncommenting the Pi Zero section.# To alter the target directory set --prefix=<dir># For a very quick build try: --disable-bootstrap## x86_64# ../configure $OPTS# AArch64 Pi4../configure --with-cpu=cortex-a72 $OPTS# AArch64 Pi5#../configure --with-cpu=cortex-a76 $OPTS# Pi Zero and Pi1#../configure --enable-languages=$LANG --with-cpu=arm1176jzf-s \# --with-fpu=vfp --with-float=hard --build=arm-linux-gnueabihf \# --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf# Pi4 in 32-bit mode#../configure --enable-languages=$LANG --with-cpu=cortex-a72 \# --with-fpu=neon-fp-armv8 --with-float=hard --build=arm-linux-gnueabihf \# --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf# Pi3+, Pi3, new Pi2#../configure --enable-languages=$LANG --with-cpu=cortex-a53 \# --with-fpu=neon-fp-armv8 --with-float=hard --build=arm-linux-gnueabihf \# --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf# Old Pi2#../configure --enable-languages=$LANG --with-cpu=cortex-a7 \# --with-fpu=neon-vfpv4 --with-float=hard --build=arm-linux-gnueabihf \# --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf## Now build GCC which will take a long time. This could range from less# than 2 hours on an 8GB Pi5 up to over 100 hours on a 256MB Pi1. It can be# left to complete overnight (or over the weekend for a Pi Zero :-)# The most likely causes of failure are lack of disk space, lack of# swap space or memory, or the wrong configure section uncommented.# The new compiler is placed in /usr/local/bin, the existing compiler remains# in /usr/bin and may be used by giving its version gcc-8 (say).#if make -j `nproc`then echo read -p "Do you wish to install the new GCC (y/n)? " yn case $yn in [Yy]* ) sudo make install ;; * ) exit ;; esacfi
Code:
make[5]: Entering directory '/home/pi/gcc-10.5.0/obj/aarch64-unknown-linux-gnu/libstdc++-v3/po'msgfmt -o de.mo ../../../../libstdc++-v3/po/de.pomsgfmt -o fr.mo ../../../../libstdc++-v3/po/fr.pomsgfmt: /home/pi/gcc-10.5.0/obj/aarch64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/aarch64-linux-gnu/libicuuc.so.72)msgfmt: /home/pi/gcc-10.5.0/obj/aarch64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/aarch64-linux-gnu/libicuuc.so.72)make[5]: *** [Makefile:551: de.mo] Error 1make[5]: *** Waiting for unfinished jobs....make[5]: *** [Makefile:551: fr.mo] Error 1make[5]: Leaving directory '/home/pi/gcc-10.5.0/obj/aarch64-unknown-linux-gnu/libstdc++-v3/po'make[4]: *** [Makefile:563: all-recursive] Error 1make[4]: Leaving directory '/home/pi/gcc-10.5.0/obj/aarch64-unknown-linux-gnu/libstdc++-v3'make[3]: *** [Makefile:488: all] Error 2make[3]: Leaving directory '/home/pi/gcc-10.5.0/obj/aarch64-unknown-linux-gnu/libstdc++-v3'make[2]: *** [Makefile:19999: all-stage1-target-libstdc++-v3] Error 2make[2]: Leaving directory '/home/pi/gcc-10.5.0/obj'make[1]: *** [Makefile:28060: stage1-bubble] Error 2make[1]: Leaving directory '/home/pi/gcc-10.5.0/obj'make: *** [Makefile:1020: all] Error 2
Code:
strings /usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.30 | grep GLIBCXX
Code:
GLIBCXX_3.4GLIBCXX_3.4.1GLIBCXX_3.4.2GLIBCXX_3.4.3GLIBCXX_3.4.4GLIBCXX_3.4.5GLIBCXX_3.4.6GLIBCXX_3.4.7GLIBCXX_3.4.8GLIBCXX_3.4.9GLIBCXX_3.4.10GLIBCXX_3.4.11GLIBCXX_3.4.12GLIBCXX_3.4.13GLIBCXX_3.4.14GLIBCXX_3.4.15GLIBCXX_3.4.16GLIBCXX_3.4.17GLIBCXX_3.4.18GLIBCXX_3.4.19GLIBCXX_3.4.20GLIBCXX_3.4.21GLIBCXX_3.4.22GLIBCXX_3.4.23GLIBCXX_3.4.24GLIBCXX_3.4.25GLIBCXX_3.4.26GLIBCXX_3.4.27GLIBCXX_3.4.28GLIBCXX_3.4.29GLIBCXX_3.4.30GLIBCXX_DEBUG_MESSAGE_LENGTH
Any help that you might be able to provide would be greatly appreciated. Thank you.
Statistics: Posted by GVX64 — Wed Aug 07, 2024 3:20 pm