LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-20-2019, 02:59 PM   #1
ahmed bedair
Member
 
Registered: Jun 2019
Posts: 53

Rep: Reputation: Disabled
How to disable GCC from treating warnings as errors


Please i am facing problem while installing vbox vga card (vboxguest) and i got error as warning that stops make processes

Last edited by ahmed bedair; 07-20-2019 at 03:03 PM.
 
Old 07-20-2019, 06:44 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by ahmed bedair View Post
Please i am facing problem while installing vbox vga card (vboxguest) and i got error as warning that stops make processes
What's this got to do with gcc? Far as I know, a default gcc compile will not treat warnings as errors. However if you're using a makefile, then check the CFLAGS for Werror.
 
Old 07-21-2019, 01:44 AM   #3
ahmed bedair
Member
 
Registered: Jun 2019
Posts: 53

Original Poster
Rep: Reputation: Disabled
Thanks a lot
You are totally right it is a bug in 8.2 but I can't make this as it is using installation script with compressed files

Last edited by ahmed bedair; 07-21-2019 at 01:47 AM.
 
Old 07-21-2019, 04:17 AM   #4
ahmed bedair
Member
 
Registered: Jun 2019
Posts: 53

Original Poster
Rep: Reputation: Disabled
Upgrading to 9.1 and still having the same issue
 
Old 07-21-2019, 04:40 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,925

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
you need to describe your problem much better: http://catb.org/~esr/faqs/smart-ques...html#beprecise
 
Old 07-21-2019, 04:47 AM   #6
ahmed bedair
Member
 
Registered: Jun 2019
Posts: 53

Original Poster
Rep: Reputation: Disabled
Thanks a lot
1) My environment is LFS 8.3 systemd
2) GCC treated warnings as errors
3) I am trying to install Vbox guest and got error as
./include/linux/moduleparam.h:233:37: note: in definition of macro 'module_param_call'
233 | { .flags = 0, .set = _set, .get = _get }; \
| ^~~~
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:88,
from /tmp/vbox.0/VBoxGuest-linux.c:27:
./include/linux/module.h:138:7: warning: 'cleanup_module' specifies less restrictive attribute than its target 'vgdrvLinuxModExit': 'cold' [-Wmissing-attributes]
138 | void cleanup_module(void) __attribute__((alias(#exitfn)));
| ^~~~~~~~~~~~~~
/tmp/vbox.0/VBoxGuest-linux.c:1079:1: note: in expansion of macro 'module_exit'
1079 | module_exit(vgdrvLinuxModExit);
| ^~~~~~~~~~~
/tmp/vbox.0/VBoxGuest-linux.c:678:20: note: 'cleanup_module' target declared here
678 | static void __exit vgdrvLinuxModExit(void)
| ^~~~~~~~~~~~~~~~~
In file included from /tmp/vbox.0/r0drv/linux/the-linux-kernel.h:88,
from /tmp/vbox.0/VBoxGuest-linux.c:27:
./include/linux/module.h:132:6: warning: 'init_module' specifies less restrictive attribute than its target 'vgdrvLinuxModInit': 'cold' [-Wmissing-attributes]
132 | int init_module(void) __attribute__((alias(#initfn)));
| ^~~~~~~~~~~
/tmp/vbox.0/VBoxGuest-linux.c:1078:1: note: in expansion of macro 'module_init'
1078 | module_init(vgdrvLinuxModInit);
| ^~~~~~~~~~~
/tmp/vbox.0/VBoxGuest-linux.c:540:19: note: 'init_module' target declared here
540 | static int __init vgdrvLinuxModInit(void)
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:317: /tmp/vbox.0/VBoxGuest-linux.o] Error 1
make[2]: *** Waiting for unfinished jobs....
./tools/objtool/objtool check --module --retpoline "/tmp/vbox.0/VBoxGuest.o";
make[1]: *** [Makefile:1500: _module_/tmp/vbox.0] Error 2
make: *** [/tmp/vbox.0/Makefile.include.footer:85: vboxguest] Error 2
I upgraded the GCC version to 9.1 and i am still getting the same error
I am unable to edit the configure flag or custom anything in make process because vbox guest using installation scripts with compressed files and i am not able to edit them
I need to fix the GCC as i tried the same installation script on another environment (ubuntu 18) and it is working good

I did a lot of researches and all about using flag --disable-werror but as i said i am unable to reach configure file or make directlly

Thanks a lot again

Last edited by ahmed bedair; 07-21-2019 at 04:52 AM.
 
Old 07-21-2019, 09:41 AM   #7
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by ahmed bedair View Post
2) GCC treated warnings as errors
Only because of the Makefile you're using is requesting that, it is not the default behaviour of gcc. From the man page of gcc
Code:
-Werror
      Make all warnings into errors.

-Werror=<specifier>
      Make the specified warning into an error.
so - as you have been told before - by default gcc does NOT treat warnings as errors, but of course when one of these flags is given in the commandline, it will.

You disable this behaviour by removing the -Werror options from the commandline "make" is using to call gcc.
HOW, is up to you.

Last edited by ehartman; 07-21-2019 at 09:43 AM.
 
Old 07-21-2019, 09:59 AM   #8
ahmed bedair
Member
 
Registered: Jun 2019
Posts: 53

Original Poster
Rep: Reputation: Disabled
Thanks a lot but I can't remove the werror flag and i tried the same script on ubuntu 18 and I got no errors or warnings
 
Old 07-21-2019, 10:11 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,925

Rep: Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320Reputation: 7320
again, would be nice to explain what did you try exactly.
 
Old 07-21-2019, 10:17 AM   #10
ahmed bedair
Member
 
Registered: Jun 2019
Posts: 53

Original Poster
Rep: Reputation: Disabled
Sure please
1) I updated the GCC to 9.1 and i got the same error
2) I am unable to change the GCC flag at the script, I followed the script but it contains multi scripts within compressed files
3) I installed script on ubuntu 18 and I got no error
4) I searched all results on the internet and all of them say this is not a normal behavior of GCC and in case you have to sed make files but I am unable to reach them and this is Virtual box guest script so it must not contains those kind of errors

Please any requested more details?
 
  


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
LXer: Python: input, raw_input, and inadvertently treating integers as strings LXer Syndicated Linux News 0 10-05-2009 09:50 PM
Sendmail treating emails with my domain name as local... ritec Linux - Server 2 01-22-2009 09:23 AM
Treating many hard disks across a network as one resetreset Linux - Server 9 04-10-2008 12:49 PM
Unified cdrom drivers not treating me right! ajparr Programming 1 02-23-2008 01:09 AM
Firefox: Treating *.sh files (shell scripts) as plain/text Woodsman Linux - Desktop 1 01-13-2008 01:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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