Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Every time I compile a new kernel (from source) under ubuntu 9.04, I get a series of annoying warnings like:
scripts/mod/modpost.c: In function ‘get_markers’:
scripts/mod/modpost.c:1542: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result
scripts/mod/modpost.c: In function ‘add_marker’:
scripts/mod/modpost.c:1962: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result
scripts/kallsyms.c: In function ‘read_symbol’:
scripts/kallsyms.c:74: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
init/main.c: In function ‘start_kernel’:
init/main.c:571: warning: format not a string literal and no format arguments
init/initramfs.c: In function ‘populate_rootfs’:
init/initramfs.c:581: warning: format not a string literal and no format arguments
arch/x86/kernel/dumpstack_64.c: In function ‘print_trace_warning_symbol’:
arch/x86/kernel/dumpstack_64.c:254: warning: format not a string literal and no format arguments
arch/x86/kernel/dumpstack_64.c: In function ‘print_trace_address’:
arch/x86/kernel/dumpstack_64.c:276: warning: format not a string literal and no format arguments
...
I guess this is normal, since my compiled kernel, after installation works fine!
I found a way to get rid of this warnings by redirecting the standard error e.g 2> /dev/null or 2> some_file. But both these ways have the disadvantage that I can't tell which one of those warnings might be critical...
Are there any "flags" to use with make-kpkg in order to output only the critical warnings, and not all of this ?
P.S. When I compile the same source under Debian Lenny, none of these warnings appear. Why?
Maybe in low-level programming with so many independent modules such warnings are possible ...
Look at this (over-simplified) example to see what I mean..
int foo(int x) {
int result;
if(x==0) result= 15;
if(x==1) result=-15;
return result;
}
Let x represents e.g an event!
the programmer knows in advance that x variable can take only two possible values, 0 and 1 but the compiler doesn't. Because variable result is not initialized in function foo() the compiler might complain. But the code (from the programers perspective) is correct!
The question is how to avoid getting all these messy warnings, and project only the serious ones (if they ever occured)?
Try 26.6.30; When I built that yesterday no errors occurred. And yes, I am well aware of what the warnings are saying, but kernel code is usually clean as... well... kernel code really; you should have no compilation warnings in kernel code.
Try 26.6.30; When I built that yesterday no errors occurred. And yes, I am well aware of what the warnings are saying, but kernel code is usually clean as... well... kernel code really; you should have no compilation warnings in kernel code...
Yes, that is what I think too ...
Thanks my friend! I'll try 26.6.30 (you mean 2.6.30 ?)
P.S. I've noticed you are using Debian Lenny right ? In Debian the compilation is clean and crystal clear... It is in ubuntu 9.04 where I get all these warnings
Well, remember all those hoops you had to jump through to even be able to get to building a kernel in ubuntu? Thats because ubuntu don't really want you to compile your own; so this could be related.
Well, remember all those hoops you had to jump through to even be able to get to building a kernel in ubuntu? Thats because ubuntu don't really want you to compile your own; so this could be related.
Of course, I'm guessing here
Actually I'm new to Linux and certainly I've missed episodes!
I am basically a Debian fun... But now with ubuntu 9.04 I thought I could try my luck at this distro also... I saw some interesting characteristics and impressed. But why this should be so different? After all It is based on Debian
P.S. Ubuntu learned me how to compile a kernel... After the first installation the original kernel were droping me into ramdisk. I had to type > modprobe usb_storage and >exit every time to proceed ... ha, ha
Because of the target audience; Ubuntu is, almost completely by philosophy, designed for new users, or users with little or no technical experience. This in mind, they package kernels up for the end user so they wont have to worry about kernel compilation.
This why to compile a kernel on Ubuntu you can't just jump into /usr/src and have a go, you have to install all the development tools first, then set up the environment, then compile everything from scratch.
Because of the target audience; Ubuntu is, almost completely by philosophy, designed for new users, or users with little or no technical experience. This in mind, they package kernels up for the end user so they wont have to worry about kernel compilation.
This why to compile a kernel on Ubuntu you can't just jump into /usr/src and have a go, you have to install all the development tools first, then set up the environment, then compile everything from scratch.
Actually the only change I made to the original .config file was the support of build in usb-storage (USB_STORAGE=y) and build in vesa support (FB_VESA=y). to avoid the problem I pre mentioned, and because I want a system independent of Graphics Cards (portable) ...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.