Problem installing GCC on Porteus 5.0 64 bit
Problem installing GCC on Porteus 5.0 64 bit
Hi, I have installed GCC on Porteus but when launching the file I get the message "Error: test.c:1:10: fatal error: stdio.h: No such file or directory".
Does anyone know the cause? Thank.
Does anyone know the cause? Thank.
- ncmprhnsbl
- DEV Team
- Posts: 4114
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
Problem installing GCC on Porteus 5.0 64 bit
hi, welcome to porteus forum,
more details please. eg. what version of GCC and from where?
also, the 05-devel.xzm module contains GCC and other development tools including all the headers (one of which, stdio.h which is part of glibc)
link: 05-devel.xzm
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
-
- Warlord
- Posts: 724
- Joined: 04 Jan 2014, 04:27
- Distribution: Porteus 5.0 x64 OpenBox
- Location: NZ
- Contact:
Problem installing GCC on Porteus 5.0 64 bit
Yes, but what if I'm building with -std=c++23 and a newer GCC is needed for that!? Could we install a separate, optional, standalone, all-inclusive, huge GCC 14.2 package? I'm having a difficulty even finding prebuilt binaries of newer gcc though...
-
- Contributor
- Posts: 111
- Joined: 03 Feb 2020, 18:51
- Distribution: Porteus XFCE v5.0rc2 x86_64
- Location: Poland
Problem installing GCC on Porteus 5.0 64 bit
Some time ago I built "slightly" older, gcc 13.2 (there was no gcc 14 yet), because I needed at least this version of it to build serenityos on porteus, maybe it will be useful for you
https://e.pcloud.link/publink/show?code ... foldergrid
SHA256:
Code: Select all
873d0580c2f45e26fc7872ad03384a2b918144508d103ce3568287be072838c7 gcc-13.2.0-x86_64-1.xzm
cdb29ee3fbef90eebc4e753618eba992c7116e1d0f2722ab4abe47cf640451e4 gcc-g++-13.2.0-x86_64-1.xzm
-
- Warlord
- Posts: 724
- Joined: 04 Jan 2014, 04:27
- Distribution: Porteus 5.0 x64 OpenBox
- Location: NZ
- Contact:
Problem installing GCC on Porteus 5.0 64 bit
Thanks, this gives me an idea. I've been trying the latest binary from https://jwakely.github.io/pkg-gcc-latest/ obtained through the suggested command
Code: Select all
wget --content-disposition https://kayari.org/gcc-latest/gcc-latest.deb
Now I'm making a module that to be activated on top of the 05-develop populating all the standard locations with the news gcc stuff. (So inside that prebuilt binary package I rename the opt directory to 07-gcc_15.0.0 and its subfolder to usr, and make the 07-gcc_15.0.0.xzm)
And it works! Even though my 07-gcc_15.0.0.xzm is nearly 600MB(!) it still needs the 05-develop underneath. And who knows what things are broken in this method of overlaying the new gcc over the old. Also, notice how this binary was build in comparison to Porteus's native gcc:
Code: Select all
root@porteus:~# gcc -v
Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/11.2.0/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap --enable-languages=ada,brig,c,c++,d,fortran,go,lto,objc,obj-c++ --enable-threads=posix --enable-checking=release --enable-objc-gc --with-system-zlib --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new --disable-libstdcxx-pch --disable-libunwind-exceptions --enable-__cxa_atexit --disable-libssp --enable-gnu-unique-object --enable-plugin --enable-lto --disable-install-libiberty --disable-werror --with-gnu-ld --with-isl --verbose --with-arch-directory=amd64 --disable-gtktest --enable-clocale=gnu --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (GCC)
AFTER ACTIVATING 07-gcc_15.0.0.xzm:
root@porteus:~# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/bin/../libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/opt/gcc-latest --enable-languages=c,c++ --enable-libstdcxx-debug --enable-libstdcxx-backtrace --disable-bootstrap --disable-multilib --disable-libvtv --with-system-zlib --without-isl --enable-multiarch
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240818 (experimental) (GCC)
-
- Contributor
- Posts: 111
- Joined: 03 Feb 2020, 18:51
- Distribution: Porteus XFCE v5.0rc2 x86_64
- Location: Poland
Problem installing GCC on Porteus 5.0 64 bit
Under the same link I added gcc 14 modules built on Porteus 5.01
Check if it works for you.
Code: Select all
e5263c344441b8bb7a626718135465998f343f27d40f17537d904cfab7dce2ee gcc-14.2.0-x86_64-1.xzm
31eea90102230309cb1ecd9b73cee1794eeb5eddc0de9d3a2afd8eca13cea067 gcc-g++-14.2.0-x86_64-1.xzm
Code: Select all
root@porteus:/mnt/vbox/porteusbuilds/porteus/5.01/firejail# gcc -v
Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/14.2.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/14.2.0/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap --enable-languages=c,c++ --enable-threads=posix --enable-checking=release --enable-objc-gc --with-system-zlib --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new --disable-libstdcxx-pch --disable-libunwind-exceptions --enable-__cxa_atexit --disable-libssp --enable-gnu-unique-object --enable-plugin --enable-lto --disable-install-libiberty --disable-werror --with-gnu-ld --with-isl --verbose --with-arch-directory=amd64 --disable-gtktest --enable-clocale=gnu --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (GCC)
root@porteus:/mnt/vbox/porteusbuilds/porteus/5.01/firejail# g++ -v
Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/14.2.0/specs
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/14.2.0/lto-wrapper
Target: x86_64-slackware-linux
Configured with: ../configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap --enable-languages=c,c++ --enable-threads=posix --enable-checking=release --enable-objc-gc --with-system-zlib --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new --disable-libstdcxx-pch --disable-libunwind-exceptions --enable-__cxa_atexit --disable-libssp --enable-gnu-unique-object --enable-plugin --enable-lto --disable-install-libiberty --disable-werror --with-gnu-ld --with-isl --verbose --with-arch-directory=amd64 --disable-gtktest --enable-clocale=gnu --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.0 (GCC)
-
- Warlord
- Posts: 724
- Joined: 04 Jan 2014, 04:27
- Distribution: Porteus 5.0 x64 OpenBox
- Location: NZ
- Contact:
Problem installing GCC on Porteus 5.0 64 bit
Yes, seems to be working. And much smaller in size. Thank you! I've renamed your modules as
07-gcc-14.2.0-x86_64-1.xzm
07-gcc-g++-14.2.0-x86_64-1.xzm
emphasizing that they are to be activated AFTER the 05-devel.xzm. But the whole porteus method of overlapping new files on top of the old ones is brilliant Now we have the latest GCC activated/de-activated on demand, without actually erasing the system default GCC!
-
- Warlord
- Posts: 724
- Joined: 04 Jan 2014, 04:27
- Distribution: Porteus 5.0 x64 OpenBox
- Location: NZ
- Contact:
Problem installing GCC on Porteus 5.0 64 bit
It finds the latest GCC installation, so before and after activating i3slkiller's 07-gcc-14.2.0-x86_64-1.xzm and 07-gcc-g++-14.2.0-x86_64-1.xzm, clang will use different gcc:
Code: Select all
root@porteus:/G# clang -v
clang version 18.1.8
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /G/clang+llvm/bin
Found candidate GCC installation: /usr/lib64/gcc/x86_64-slackware-linux/11.2.0
root@porteus:/G# clang -v
clang version 18.1.8
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /G/clang+llvm/bin
Found candidate GCC installation: /usr/lib64/gcc/x86_64-slackware-linux/11.2.0
Found candidate GCC installation: /usr/lib64/gcc/x86_64-slackware-linux/14.2.0
Selected GCC installation: /usr/lib64/gcc/x86_64-slackware-linux/14.2.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
-
- Contributor
- Posts: 111
- Joined: 03 Feb 2020, 18:51
- Distribution: Porteus XFCE v5.0rc2 x86_64
- Location: Poland
Problem installing GCC on Porteus 5.0 64 bit
Maybe check first if llvm-18.1.8-x86_64-2_slack15.0.txz from slackware64-15.0/testing is suitable for your use case.
Code: Select all
root@porteus:/mnt/vbox/tmp# clang -v
clang version 18.1.8
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-slackware-linux/11.2.0
Found candidate GCC installation: /usr/bin/../lib64/gcc/x86_64-slackware-linux/14.2.0
Selected GCC installation: /usr/bin/../lib64/gcc/x86_64-slackware-linux/14.2.0
Candidate multilib: .;@m64
Selected multilib: .;@m64