LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-08-2014, 05:27 PM   #1
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Rep: Reputation: 31
"decoding" gnu linux error messages


As I hope the title implies, my question is about the error messages per se, not about the particular errors that gave rise to them.

So, I'm working through LFS version 7.4 and after building glibc-2.18 I ran
Code:
make -k check 2>&1 | tee glibc-check-log
grep -n Error glibc-check-log
These errors were reported:
Code:
2614:make[2]: *** [/sources/7.4/glibc-build/posix/tst-getaddrinfo4.out] Error 1
2641:make[2]: [/sources/7.4/glibc-build/posix/annexc.out] Error 1 (ignored)
2658:make[1]: *** [posix/tests] Error 2
4081:make[2]: [/sources/7.4/glibc-build/conform/run-conformtest.out] Error 1 (ignored)
9713:make: *** [check] Error 2
I know (because the LFS book says so) that these specific errors are expected and not a concern.

But, for example, looking at the first message:
Code:
2614:make[2]: *** [/sources/7.4/glibc-build/posix/tst-getaddrinfo4.out] Error 1
clearly the middle part "[/sources/7.4/glibc-build/posix/tst-getaddrinfo4.out]" identifies the test suite output file that contains errors. And the numbers at the beginning of each line are the line numbers (in the log file) generated by the grep -n option. But what about make[2] and Error 1?

And, two lines below that, where it says make[1] and Error 2?

And on the last line Error 2?

It doesn't seem to be counting the errors. But someone put those 1's and 2's there for a reason. What do they tell us?
 
Old 02-10-2014, 01:56 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
"usually" make invokes embedded makes, that is called recursive build.
make[number] means the level of the makefiles, make[1] is the first make process , make[2] is the second one called from the first (and so on).
<location> Error <error code> (ignored) means the makefile itself handles the error message of the child process, actually it ignores, because it was written into the given makefile (set explicitly to ignore the error of that command).
the error messages without (ignored) means the make process itself aborts the current building process (execution will return to the parent with an error code, therefore that will also abort ...)
 
2 members found this post helpful.
Old 02-12-2014, 11:33 AM   #3
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
Sorry to take so long getting back to this -- been too busy with other things.

Thanks for your explanation. I understand what you wrote about the levels, but still wondering about the error codes. I don't see any mention of anything like "ignore", etc., in the glibc-2.18/posix/Makefile or in the glibc-2.18/conform/Makefile. But I don't know enough about makefiles so maybe I just don't know what to look for. I did notice in 'man make' that the -k option causes make to keep going as long as possible despite errors, so maybe that has something to do with the "ignored" comments? But that wouldn't explain why line 2614 ends with just "Error 1" whereas line 2641 has "Error 1 (ignored)".

And are the error codes (Error 1, Error 2) generated by make itself, or are they values returned from the scripts that experienced the errors?
 
Old 02-13-2014, 01:57 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
you will find lines in makefile like this:
Code:
target: dependency
<tab>rule
target is a file to be created and rule (can be one or more lines) is a list of commands, how should it be created.
the make process will stop execution if one of those commands failed (returns with any error code). This error code is reported. the flag -k means do not stop the whole build in case of an error, but obviously this target cannot be done.
If you don't care about the result of a command in that list of rules (for example you wanted to remove a file and also you wanted ignore the error "file not found") you can start that line with a - (minus) sign. In that case make will report that error and also display (ignored).

I hope it helped a bit
 
1 members found this post helpful.
Old 02-13-2014, 07:41 AM   #5
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
Yes, it helped, thanks. I'll be studying the Gnu Make Manual as time permits so eventually I should be able to follow the sequence of recursive makefiles in these packages. I supposed I should start a new thread when questions come up related to that.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"gethostby*.getanswer: asked for "", got "." on messages file wwipro Linux - Server 0 08-06-2013 09:45 PM
Slack64; trying to compile libparted = "error: GNU Readline could not be found" GrapefruiTgirl Linux - Software 9 01-26-2010 12:30 PM
ACPI S3 (so-called "Standby" or "Sleep") in GNU/Linux posix_memalign Linux - Laptop and Netbook 1 01-17-2009 01:54 PM
k3b: "error decoding audio tracks" and "could not unlock cd driver" lefty.crupps Linux - Software 7 10-13-2005 11:29 AM
Boot messages not the same as "dmesg" or "/var/log/messages"? massai Linux - General 5 03-10-2004 12:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:48 PM.

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