LinuxQuestions.org
Help answer threads with 0 replies.
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 08-28-2018, 01:47 PM   #1
gdsotirov
LQ Newbie
 
Registered: Sep 2016
Location: Sofia, Bulgaria
Distribution: Slackware, Debian, Fedora, SuSE, Ubuntu
Posts: 14

Rep: Reputation: Disabled
GCC 8.2 seg faults on up-to-date Slackware64-current


I recently upgraded my Slackware64-current virtual machine running on ESXi 6 hypervisor. Now I'm not able to compile anything, because GCC segmentation faults like this:

Code:
during GIMPLE pass: ldist
source.c: In function ‘main’:
source.c:19:5: internal compiler error: Segmentation fault
 int main(int argc,
     ^~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
Anyone having the same or similar problem? I noticed that GCC pretty much fails on random places in different software that normally compiles OK. I'm pretty sure the previous version of GCC I was using was GCC 7.3, because I haven't upgraded the VM in a while, but now the latest in -current is 8.2.0 from July 27.
I'm running several other Slackware 14.x virtual machines on the same hypervisor, but I'm not having any problems compiling on them.
 
Old 08-29-2018, 09:39 AM   #2
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,601

Rep: Reputation: Disabled
I have run into a few GCC bugs, but I can't say I ever seen it outright segfault...

Does using clang instead also have problems?

I think the possibilities are that you made a mistake in your update process or you ran into an obscure bug that only presents itself in the right environment. Either way there is not much to go on here, reading that gcc bugs link and following the instructions provided would prove your best bet to figuring this out.
 
Old 08-29-2018, 01:45 PM   #3
gdsotirov
LQ Newbie
 
Registered: Sep 2016
Location: Sofia, Bulgaria
Distribution: Slackware, Debian, Fedora, SuSE, Ubuntu
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by orbea View Post
Does using clang instead also have problems?
I haven't though changing the compiler, but I tried. Clang doesn't seg fault, but instead leads to linker error, so a new problem to solved...

Quote:
Originally Posted by orbea View Post
I think the possibilities are that you made a mistake in your update process
I used slackpkg and just upgraded all available packages. What mistake could have I made?

Quote:
Originally Posted by orbea View Post
or you ran into an obscure bug that only presents itself in the right environment. Either way there is not much to go on here, reading that gcc bugs link and following the instructions provided would prove your best bet to figuring this out.
Yep, that's perhaps my only option, because with GCC I had not linking errors. However, I consider this as a last resort. I though the community could have the answer. I also found some information about possible segmentation faults in 8.2 from the hardening, but I'll first try reinstalling the VM. Unfortunately, I cannot just reinstall the older GCC version, which was working fine.
 
Old 08-29-2018, 01:57 PM   #4
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,601

Rep: Reputation: Disabled
Quote:
Originally Posted by gdsotirov View Post
I used slackpkg and just upgraded all available packages. What mistake could have I made?
Did you install the new packages? This is the general update process for Slackware current with slackpkg.

Code:
slackpkg update
slackpkg install-new
slackpkg upgrade-all
slackpkg clean-system
Note that "slackpkg clean-system" will prompt to remove all third party packages if they are not correctly blacklisted.

Since clang doesn't work too I want to suspect this is a general system issue and not a compiler bug.
 
Old 08-29-2018, 04:10 PM   #5
gdsotirov
LQ Newbie
 
Registered: Sep 2016
Location: Sofia, Bulgaria
Distribution: Slackware, Debian, Fedora, SuSE, Ubuntu
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by orbea View Post
Did you install the new packages?
Hmm... you never know until someone pays you attention :-) Thanks for the suggestion! Apparently, I have forgot to do this and Slackware is not exactly the OS managing (new) requirements properly. Anyway I was missing a total of 26 packages (apparently I haven't upgraded recently) listed here below:
  • easytag
  • efivar
  • fig2dev
  • fluidsynth
  • gexiv2 (required by gimp-2.10)
  • haveged
  • icecream
  • igt-gpu-tools
  • jmtpfs
  • json-glib (required by gegl-0.4 and gimp-2.10)
  • lbzip2
  • libmypaint (required by gimp-2.10)
  • meson
  • mypaint-brushes (rqeuired by gimp-2.10)
  • ninja
  • openssl10 (openssl-1.0 compatibility)
  • openssl10-solibs (openssl-1.0 compatibility)
  • parallel
  • pcre2
  • python-notify2
  • re2c
  • rxvt-unicode
  • sc-im
  • ttf-tlwg
  • utf8proc (required by subversion-1.10)
  • wireless_tools
  • xorgproto

However, I could confidently rule them all out after checking the change log, because none of these is related to GCC. Anyway, better try then speak, so I installed all new (and missing) packages, restarted and (by no surprise) I have the same seg fault when trying to compile any software with GCC, so still no joy...

Quote:
Originally Posted by orbea View Post
Note that "slackpkg clean-system" will prompt to remove all third party packages if they are not correctly blacklisted.
Yes, I know this. I have only some packages built by me, which again have no relation to GCC.

Quote:
Originally Posted by orbea View Post
Since clang doesn't work too I want to suspect this is a general system issue and not a compiler bug.
As I explained Clang is compiling fine, but there is some linking error, which I do not want to dig into further, so the issue is not exactly the same. As far as I could tell from my experience with Slackware in the past about 18 years the rest of the system is working perfectly fine. It's just GCC that fails to compile sources, which with older versions (I believe I was using GCC 7.3 before) compiled without any problem. Therefore my attention was and is still on GCC.
 
Old 08-29-2018, 04:46 PM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 7,499

Rep: Reputation: 5827Reputation: 5827Reputation: 5827Reputation: 5827Reputation: 5827Reputation: 5827Reputation: 5827Reputation: 5827Reputation: 5827Reputation: 5827Reputation: 5827
Let me try to get this more crisp:
Your original situation was a 'stale' Slackware-current installation which you upgraded, and then you also added all packages which were listed as "Added:" in the Slackware ChangeLog.txt?
My question:
Your original situation, was that a full install of Slackware-current or did you omit packages during the installation?
 
Old 08-29-2018, 04:46 PM   #7
orbea
Senior Member
 
Registered: Feb 2015
Distribution: Slackware64-current
Posts: 1,601

Rep: Reputation: Disabled
I just think that both compilers entirely breaking in strange ways at same time is suspicious. Sorry this is not more helpful.
 
Old 08-30-2018, 03:29 AM   #8
gdsotirov
LQ Newbie
 
Registered: Sep 2016
Location: Sofia, Bulgaria
Distribution: Slackware, Debian, Fedora, SuSE, Ubuntu
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Alien Bob View Post
Your original situation was a 'stale' Slackware-current installation which you upgraded, and then you also added all packages which were listed as "Added:" in the Slackware ChangeLog.txt?
Yes, a Slackware64-current not upgraded from several months. First, I just upgraded everything and then I also installed all new packages (after the comment of obea as I simply forgot). However, I do not think that any of the missing packages are related to GCC like I wrote in my previous comment. Anyway, I now have a completely updated Slackware64-current with all the new packages installed and the seg fault by GCC still persists.

Quote:
Originally Posted by Alien Bob View Post
Your original situation, was that a full install of Slackware-current or did you omit packages during the installation?
A full install (as I find it the easiest option). I haven't omitted anything.
 
Old 08-30-2018, 03:36 AM   #9
gdsotirov
LQ Newbie
 
Registered: Sep 2016
Location: Sofia, Bulgaria
Distribution: Slackware, Debian, Fedora, SuSE, Ubuntu
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by orbea View Post
I just think that both compilers entirely breaking in strange ways at same time is suspicious.
I haven't used Clang on Slackware before, so I have no reference for comparison like it's the case with GCC. Again with Clang there is a linker error (and not seg fault on compilation, so for me there's difference). I do not have the time and I do not want to dig further into the linker problem, because with previous versions of GCC there was no such problem at all and I was able to compile the same sources just fine. It's a pity I cannot just revert to previous GCC packages, but perhaps they just won't work on the upgraded -current.
 
Old 08-30-2018, 03:59 AM   #10
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,761

Rep: Reputation: Disabled
I would double-check if everything is installed with
Code:
slackpkg install slackware64
if you think something got corrupted you could also try
Code:
slackpkg reinstall slackware64
could you please also point at what is that fails to build with gcc and clang because from what you write seems to be a specific software (and in that case it might be that it works only with gcc < 8.x).
 
Old 08-30-2018, 12:17 PM   #11
gdsotirov
LQ Newbie
 
Registered: Sep 2016
Location: Sofia, Bulgaria
Distribution: Slackware, Debian, Fedora, SuSE, Ubuntu
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ponce View Post
if you think something got corrupted you could also try
Code:
slackpkg reinstall slackware64
Well, I haven't though about this, but I reinstalled just GCC and the problem is gone. Thanks for the suggestion! :-)

Quote:
Originally Posted by ponce View Post
could you please also point at what is that fails to build with gcc and clang because from what you write seems to be a specific software (and in that case it might be that it works only with gcc < 8.x).
Nothing specific, just some free and open source software found all over the Internet.

Note: As as side note I also had to rebuild some libraries (e.g. protobuf) that I previously built with GCC 7.x, so I could build other software that requires them with GCC 8.
 
1 members found this post helpful.
Old 08-31-2018, 12:12 PM   #12
qunying
Member
 
Registered: Jun 2002
Distribution: Slackware
Posts: 156

Rep: Reputation: 88
It is better to do a fresh install of current.
 
Old 09-03-2018, 06:56 PM   #13
BradReed
Member
 
Registered: Apr 2015
Location: Earth
Distribution: Slackware-current
Posts: 71

Rep: Reputation: 26
Quote:
Originally Posted by qunying View Post
It is better to do a fresh install of current.
A fresh install of your OS is almost never the correct solution, unless you are running Windows.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Slackware64-current gcc 7.1.0 hoodlum7 Slackware 18 05-11-2017 10:44 PM
Can I grab Slackware64-current's gcc moisespedro Slackware 5 05-22-2015 01:24 PM
How to really be sure slackware64-current is up-to-date? moisespedro Slackware 5 05-06-2015 09:11 AM
Slackware64 current gcc-4.8.1 and glibc-2.17 tuxbg Slackware 79 05-02-2014 12:35 PM
GCC seg faults benne Linux - Software 5 09-05-2005 01:09 AM

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

All times are GMT -5. The time now is 11:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration