LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Log errors from 'make' command, how do i? (https://www.linuxquestions.org/questions/linux-software-2/log-errors-from-make-command-how-do-i-83163/)

winky 08-18-2003 12:37 PM

Log errors from 'make' command, how do i?
 
Hi all,
Due to being on my summer holidays and being bored out of my brain i have decided to install gentoo due to the recommendations of its portage/packaging system ('emerge'), to find it is a splendid OS. Anyway, because it doesn't seem to work with the binaries that Alcatel provide i am trying to compile the mgmt.o module for the Alcatel SpeedTouch USB ADSL modem, however i am getting errors. But...i can't see the errors because they just whizz by me on the screen, i have installed all of the software it needed, like sarlib etc. What i would like tto do is find a way to be able to read all of the output including errors that is given when i call 'make'.

Kind Regards
Mark Rawson

jailbait 08-18-2003 12:59 PM

You can redirect the error messages to a text file with:

make 2> make.errors.txt

oni0n56 08-18-2003 04:21 PM

im not sure if this will work with this but if you type | more it gives them screen by screen or something... i think

andrewlkho 08-18-2003 06:35 PM

you could do either of the above suggestions [although I would suggest less rather than more - it enables you to scroll back]:
so
make | less
or
make > dummy-file
it depends whether you want to view the errors once or save them to refer to them. If you want to just see them once, then do the first, it just shows the output screen by screen. If, on the other hand, you want to refer to the errors later, redirect the ouput to a text file.

oni0n56 08-18-2003 07:09 PM

ho_10 i hav a question... do you have to create the file first [the dummy file] or does it do that..?

winky 08-20-2003 09:12 PM

You do not have to create the file prior to "command > file.log" although i believe that "command >> file.log" actually appends to an already created file or creats one itself.

Anyone that wants an easy way round that works brilliantly for installing the speedtouch USB modem on thier system download the speedbundle from: http://sourceforge.net/project/showf...?group_id=3581 . It includes all the config files and binaies etc that you need.

P.S. i think when using commands like 'make' you need to include the 2 before > like so: "command 2> file.log" otherwise it just outputs the commands it used to the file.

Kind Regards
Mark Rawson

oni0n56 08-20-2003 11:40 PM

Thanks mark rawson!! .... so for example when im installing i type ...

$make 2> makeErrors.log

??? and can i do that with any command or only certain types? and also in what runlevels? all.. thatd be cool , like....
$ init 6 2> reboot-MumboJumbo.log :)

winky 08-20-2003 11:45 PM

To my knowledge this can be done with all commands but some may give different unexpected outputs than other. Regarding which runlevels i assume that you will be able to log part of runlevel 6 but not all due to the fact that it terminates all processes.

Kind Regards
Mark Rawson

oni0n56 08-20-2003 11:58 PM

yeah goodpoint mark.. but umm... where does it save the log if you cd ../ up all the way to root directory :) ?? just wondering .. would it have.. no write permissions?..

jschiwal 08-21-2003 12:07 AM

try using the command nohup

nohup make &
the output is logged to a file called nohup.out

winky 08-21-2003 12:11 AM

the "command 2> file.log" has the same permissions as the user that executed it. So if you had not access to anything except your home directory then you would not be able to log anywhere but your home directory. You can obviously change the path that the file goes e.g. "command 2>/root/randomdir/debug.log

oni0n56 08-21-2003 12:14 AM

i see.. thanks a lot guys!! i get it now... :)

winky 08-21-2003 12:19 AM

Hmm.....wasn't i the one supposed to be doing the understanding as i asked the first question? lol.

Kind Regards
Mark Rawson

oni0n56 08-21-2003 11:31 AM

lol! ... who says we cant learn too? :) dont be a sponge and soak up the knowledge for yourself :-D


All times are GMT -5. The time now is 02:12 PM.