SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am afraid the signal to noise ratio in your post is exactly zero.
Care to share with LQ what those compiler complaints are exactly, how you triggered them and how you came to believe that gcc 5.4.0 would solve your issue?
Also why do you think you need a script from slackbuilds.org to build the gcc compiler suite which is part of Slackware? Were you writing a program in 'D' ?
I am afraid the signal to noise ratio in your post is exactly zero.
Care to share with LQ what those compiler complaints are exactly, how you triggered them and how you came to believe that gcc 5.4.0 would solve your issue?
Also why do you think you need a script from slackbuilds.org to build the gcc compiler suite which is part of Slackware? Were you writing a program in 'D' ?
that D thing was just something in the slackbuild that whoever did it for a patch to 3.5 had in there, I just removed it and now gcc is compiling as I write this,
using Slackware 14.2 slackbuild got gcc and taking everything off that page except the patches for gcc 5.3 because it is being ran for 5.4 and the slackbuild script is written to take in whatever version is there, then running that slackbuild.
Updating GCC system-wide will not cause any inmediate problems.
It might, however, break software you build from SlackBuilds or other sources, and it's generally unsupported, and thus not recommended.
However, if you wish to use a different gcc version for new c++ features, you can install it under a different prefix.
I haven't tried this myself right now, but it should work as follows:
Code:
wget ftp://ftp.gnu.org/gnu/gcc/gcc-7.2.0/gcc-7.2.0.tar.xz
tar xf gcc-7.2.0.tar.xz
cd gcc-7.2.0
mkdir build
cd build
../configure --prefix=/opt/gcc7 --enable-languages=c++
make -j
make install
cat > /etc/profile.d/gcc7.sh << 'EOF'
export PATH="/opt/gcc7:$PATH"
EOF
Now, whenever you want to use gcc7, run 'source /etc/profile.d/gcc7.sh', and then use g++ as usual.
As for fixing your problem, try using '#include <experimental/filesystem>', and std::experimental::filesystem. I tried it on gcc-5.3.0, but I couldn't get it to work properly, maybe you can. If you still can't get it to work, try the above.
If you have to do a systemwide install, then I'd defer to Alien_Bob or another knowledgeable user here.
that would seem safer -as- that was my next compile anyways then ask which is better before I install either one.
but,7.1.0? now I got a go find that .. hehe... I myself would install into /opt for space issues on /home and I put everything (tars) into my /home/bin to mess with. so I'd probably mess it up if one day I delete everything in bin to clean it out, as it is getting really full as it is.
how do you set up path to get to it where I'd probably be using that new one in place of the old anyways so I'd want to keep it always going to that new one.
just googled, its up to
GCC 7.2 released [2017-08-14]
I don't know why I got only 5.4
how do you set up path to get to it where I'd probably be using that new one in place of the old anyways so I'd want to keep it always going to that new one.
just googled, its up to
GCC 7.2 released [2017-08-14]
I don't know why I got only 5.4
Well you can place ~/.local/bin (or /opt/bin, etc) before /usr/bin in your PATH variable. I personally alias "cc" to a small shell script.
Also update your LD_LIBRARY_PATH and PKG_CONFIG_PATH to include ~/.local/lib64 and ~/.local/lib64/pkgconfig, respectively.
Have to admit I am a self-taught hobbyist programmer, so feel free to point out if I'm missing anything here.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.