How to view dozens of lines of compile/link error messages?

How to view dozens of lines of compile/link error messages?

Post by Yu Lianqi » Mon, 21 Apr 2003 01:40:06



I am new to linux and find it very inconvinient to read compile/link
errors when the first part of these messages cannot be displayed in
gnome-terminal.
I want to redirect the information to a file but the command 'make >
messages' does not work. Any help will be appreciated!
 
 
 

How to view dozens of lines of compile/link error messages?

Post by Jens.Toerr.. » Mon, 21 Apr 2003 03:21:22



> I am new to linux and find it very inconvinient to read compile/link
> errors when the first part of these messages cannot be displayed in
> gnome-terminal.
> I want to redirect the information to a file but the command 'make >
> messages' does not work. Any help will be appreciated!

Normal output (i.e. information about what make is currently doing)
is going to stdout (standard output), and this is what goes into
your file when you type "make > messages". Since stdout is associated
with file descriptor 1 you can also write this as "make 1> messages".

Error messages go the stderr (standard error) associated with file
descriptor 2. So to redirect the error messages only you need to
type "make 2> error_messages" (take care, no spaces are allowed
between the "2" and the ">"). Then  all compiler and linker errors
are written to the file, while the normal output still goes to your
terminal.

If you want to have both the normal messges and the error messages
redirected to the file you would have to use "make > messages 2>&1".
This obviously first redirects the normal output to the file and,
in a second step, redirects the error output (2) to what stdout (1)
is already redirected to.

Unfortunately, this is the syntax for only one of the families of
shells that are often used, it works for e.g. the Bourne and Korn
shell and bash. If you're using csh or tcsh you need to redirect
both the normal output and the error messages "make >& messages"
(sorry, I don't know how to redirect stderr only under csh/tcsh).

                                   Regards, Jens
--
      _  _____  _____

  _  | |  | |    | |
 | |_| |  | |    | |          http://www.physik.fu-berlin.de/~toerring
  \___/ens|_|homs|_|oerring

 
 
 

How to view dozens of lines of compile/link error messages?

Post by Basile STARYNKEVITC » Mon, 21 Apr 2003 03:26:15


    Yu> I am new to linux and find it very inconvinient to read
    Yu> compile/link errors when the first part of these messages
    Yu> cannot be displayed in gnome-terminal. [...]

In addition to usual replies (redirecting stderr...) I also suggest
compiling uder Emacs, which provide convenient features (notably the
keystokes C-x ` bound to next-error Emacs function). The convenient
way to compile under Emacs is M-x compile

For completeness there exist also other IDEs under Linux.

--

Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Fa?encerie, 92340 Bourg La Reine, France

 
 
 

1. linker input file unused because linking not done -- compile error message

Hello evryone, I'm stock trting to install DBD-mysql-3.0002_5 on
Solaris 9 sun 5.9, compiling with gcc 3.4.2 and perl 5.8.8 compiled
with the same gcc.

Below is the error I get at compilation time:

# /usr/ccs/bin/make
gcc -c  -I/usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBI/
-I/opt/mysql/mysql/include -xO3 -mt -D_FORTEC_ -xarch=v8
-DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-strict-aliasing -pipe
-Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"3.0002_5\"
-DXS_VERSION=\"3.0002_5\" -fPIC
"-I/usr/local/lib/perl5/5.8.8/sun4-solaris/CORE"   dbdimp.c
gcc: language arch=v8 not recognized
gcc: dbdimp.c: linker input file unused because linking not done
gcc -c  -I/usr/local/lib/perl5/site_perl/5.8.8/sun4-solaris/auto/DBI/
-I/opt/mysql/mysql/include -xO3 -mt -D_FORTEC_ -xarch=v8
-DDBD_MYSQL_INSERT_ID_IS_GOOD -g  -fno-strict-aliasing -pipe
-Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O    -DVERSION=\"3.0002_5\"
-DXS_VERSION=\"3.0002_5\" -fPIC
"-I/usr/local/lib/perl5/5.8.8/sun4-solaris/CORE"   mysql.c
gcc: language arch=v8 not recognized
<===========================
gcc: mysql.c: linker input file unused because linking not done
<======================
rm -f blib/arch/auto/DBD/mysql/mysql.so
LD_RUN_PATH="/usr/lib" /usr/local/bin/perl myld gcc  -G
-L/usr/local/lib dbdimp.o  mysql.o  -o
blib/arch/auto/DBD/mysql/mysql.so       \
   -L/opt/mysql/mysql/lib -lmysqlclient -lz -lposix4 -lcrypt -lgen
-lsocket -lnsl -lm   \

gcc: dbdimp.o: No such file or directory
gcc: mysql.o: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target
`blib/arch/auto/DBD/mysql/mysql.so'

Any help will be appreciated.
Ray

2. SOLARIS 8

3. question: view error messages(newbie)

4. Solaris 8 Arp cache clearing

5. View last lines of error log

6. DVD

7. konqueror View->View Mode->Kmozilla error?

8. system v info

9. Error message continuous error messages

10. PPP link down - error messages

11. what is the meaning of this linking error message?

12. Error messages from static link program

13. tip error message - link down?