LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-30-2017, 11:57 AM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
what worries will I have updating GNU GCC ?


I got gcc 5.3.0 I got issue when using filesystem in the
Code:
/usr/include/c++/5.3.0/experimental/filesystem
compiler is giving complaints, I posted it in programming, now I am wondering if I just update to gcc 5.4, will that fix it?
GCC 5 Release Series

Index of /gnu/gcc/gcc-5.4.0


will updating to gcc 5.4 give me ill effects in slack when using it, or will it be just like any other update?

will it even fix this situation?

will modding a slackbuild to update g++ to the trick ?
https://slackbuilds.org/repository/1...lopment/gcc-d/
Code:
configure: error: 
The following requested languages could not be built: d
Supported languages are: c,ada,c,c++,fortran,go,java,jit,lto,objc,obj-c++
(which as seen I still need to do some tweaking on it)

will I have to do an upgradepkg, or does it run side by side?

will I have to check into gcc and update it too if they have one even though they are separate, or am I wrong on that account?

stay tune:
same bat (slack) channel,
same bat (slack) time.

Last edited by BW-userx; 09-30-2017 at 12:32 PM.
 
Old 09-30-2017, 12:17 PM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
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' ?
 
Old 09-30-2017, 12:46 PM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Alien Bob View Post
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,

what 3.5 is not doing is posted here,

https://www.linuxquestions.org/quest...or-4175614794/

as far as 5.4 fixing the issue is still a big (?) question mark.
standardization to 2017 I think

https://mirrors.slackware.com/slackw.../source/d/gcc/

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.

link problems ???? any?? you da man on Slack

Last edited by BW-userx; 09-30-2017 at 02:22 PM.
 
Old 09-30-2017, 02:31 PM   #4
Fat_Elvis
Member
 
Registered: Oct 2016
Distribution: FreeDOS 1.2
Posts: 309

Rep: Reputation: 92
Well I've installed GCC 7.1 in ${HOME}/.local, and it works without issue. /usr/bin/gcc is still 5.3.0, and ${HOME}/.local/bin/gcc is 7.1.0.

Compiled with the usual Slack options, no patches or anything, except:

Code:
PREFIX="${HOME}/.local"

./configure --prefix="$PREFIX" --libdir="${PREFIX}/lib64" [...]
If you have to do a systemwide install, then I'd defer to Alien_Bob or another knowledgeable user here.

Last edited by Fat_Elvis; 09-30-2017 at 02:33 PM.
 
Old 09-30-2017, 02:39 PM   #5
mid-kid
LQ Newbie
 
Registered: Oct 2016
Distribution: Gentoo
Posts: 25

Rep: Reputation: Disabled
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.

Last edited by mid-kid; 09-30-2017 at 02:43 PM.
 
1 members found this post helpful.
Old 09-30-2017, 02:41 PM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Fat_Elvis View Post
Well I've installed GCC 7.1 in ${HOME}/.local, and it works without issue. /usr/bin/gcc is still 5.3.0, and ${HOME}/.local/bin/gcc is 7.1.0.

Compiled with the usual Slack options, no patches or anything, except:

Code:
PREFIX="${HOME}/.local"

./configure --prefix="$PREFIX" --libdir="${PREFIX}/lib64" [...]
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
 
Old 10-01-2017, 05:42 AM   #7
Fat_Elvis
Member
 
Registered: Oct 2016
Distribution: FreeDOS 1.2
Posts: 309

Rep: Reputation: 92
Quote:
Originally Posted by BW-userx View Post
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.

Last edited by Fat_Elvis; 10-01-2017 at 05:47 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GCC according to gnu.com gmtamblyn Linux - General 2 12-14-2015 11:41 AM
Problem after updating Ubuntu 10.04 with GNU GRUB version 1.98-1ubuntu10 leopoldb Linux - Laptop and Netbook 3 06-11-2011 05:01 AM
GNU Make and GNU GCC DEBUG vs RELEASE compiler options aryan1 Programming 1 01-12-2010 12:29 PM
LXer: Updating your system: GNU/Linux 5, Windows 0 LXer Syndicated Linux News 0 10-19-2008 07:10 AM
Updating gcc yogeshm02 SUSE / openSUSE 2 03-01-2006 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration