LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-20-2018, 03:26 PM   #1
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Debian, Freebsd
Posts: 50

Rep: Reputation: Disabled
gcc 8.1.1 and kernel 4.17.8 compile error


Hi all,

Tried to update from 4.17.1 to 4.17.8 and saw this error below.
Anyone else saw a similar error and knows where the patch if any, is available?
bash-4.4# zcat /proc/config.gz > .config
bash-4.4#
bash-4.4# yes "" | make oldconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
LEX scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2486:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:773:22: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
sprintf(newname, "%s%s", dirname, basename);
^~
scripts/kconfig/confdata.c:773:19: note: assuming directive output of 7 bytes
sprintf(newname, "%s%s", dirname, basename);
^~~~~~
scripts/kconfig/confdata.c:773:2: note: ‘sprintf’ output 1 or more bytes (assuming 4104) into a destination of size 4097
sprintf(newname, "%s%s", dirname, basename);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:776:23: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
^~~~~~~~~~~
scripts/kconfig/confdata.c:776:3: note: ‘sprintf’ output between 13 and 4119 bytes into a destination of size 4097
sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --oldconfig Kconfig
#
# configuration written to .config
#
bash-4.4#
 
Old 07-20-2018, 03:39 PM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 1,677

Rep: Reputation: 5167Reputation: 5167Reputation: 5167Reputation: 5167Reputation: 5167Reputation: 5167Reputation: 5167Reputation: 5167Reputation: 5167Reputation: 5167Reputation: 5167
Those are warnings, not errors. Any time gcc is upgraded you can typically expect a lot more of those.

Unless it causes the compile to fail, I wouldn't worry too much about it. If it does cause compile failure you can usually pass the recommended option (in this case: -Wformat-overflow) to work around it.
 
2 members found this post helpful.
Old 07-20-2018, 05:23 PM   #3
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Debian, Freebsd
Posts: 50

Original Poster
Rep: Reputation: Disabled
I think you are correct.
Did a test run for both 4.17.8 and linux-4.18-rc5
Many warnings appeared, but building either completed without crashing.
I'll install 4.18 and even with these warnings... it should be fine :-)

Thanks for the info, I'll close this request.
 
Old 07-20-2018, 05:49 PM   #4
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Debian, Freebsd
Posts: 50

Original Poster
Rep: Reputation: Disabled
Kernel 4.18-rc5 installed without any hurdles seen.
Case closed :-)
 
  


Reply

Tags
compile error, gcc, kernel 4.17.x


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
Compile error, 'H5G_obj_t' does not name a type, is gcc 4.3 incompatible with gcc 3 ? samrat_rao Linux - Software 5 03-03-2009 02:28 PM
Why can only gcc compile the kernel? gmic Linux - Newbie 5 02-03-2009 12:03 PM
gcc not found error when trying to compile a new kernel sofocle Linux - Software 2 12-31-2006 12:16 PM
Weird problem, can't compile kernel: gcc: Internal error:Segmentation fault (prgm as) abefroman Linux - Software 4 08-01-2006 05:28 PM
Screen resolution and gcc 3.3 kernel compile error bugsbunny Debian 6 03-07-2005 01:51 PM

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

All times are GMT -5. The time now is 09:33 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