If I download and try to build GCC 8.x on a newer machine, e.g. Devuan Excalibur GNU/Linux (i.e. Debian Trixie without systemd) - this fails, with the error going something like this:
libstdc++.so.6: version `GLIBCXX_3.4.30' not found
If I manually copy my system's libstdc++6.so
over the file missing the relevant [?] - and repeat the process a few times - I get to a different error:
make[7]: Entering directory '/usr/local/src/gcc-8.5.0/x86_64-pc-linux-gnu/32/libitm'
In file included from /usr/include/linux/fs.h:19,
from ../../.././libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:68:
/usr/include/linux/mount.h:96:6: error: multiple definition of ‘enum fsconfig_command’
enum fsconfig_command {
^~~~~~~~~~~~~~~~
In file included from ../../.././libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:55:
/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc/include-fixed/sys/mount.h:249:6: note: previous definition here
enum fsconfig_command
^~~~~~~~~~~~~~~~
In file included from /usr/include/linux/fs.h:19,
from ../../.././libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:68:
/usr/include/linux/mount.h:130:8: error: redefinition of ‘struct mount_attr’
struct mount_attr {
^~~~~~~~~~
In file included from ../../.././libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc:55:
/usr/local/src/gcc-8.5.0/host-x86_64-pc-linux-gnu/gcc/include-fixed/sys/mount.h:219:8: note: previous definition of ‘struct mount_attr’
struct mount_attr
^~~~~~~~~~
which is weird, but perhaps my fault for trying to force the library version. Anyway - how can I GCC 8.5.0 to actually build on my machine?
Note:
- The configuration is:
./configure --disable-bootstrap --enable-languages=c,c++
. - Any additional information will be provided per request.
libstdc++
(--disable-libstdcxx
). – Stephen Kitt Dec 24 '23 at 15:17libstdc++
. – Stephen Kitt Dec 24 '23 at 21:24build-essential
in your repo and the package manager agnostic documentation in a changeroot, so you minimize risk to your system. – eyoung100 Jan 26 '24 at 18:57