[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1175: make diagnostics not shown / mystical error 126



Package: make
Version: 3.74-1

Short description:
When running 'make', make generates diagnostic write(2) calls for
which no output shows up, resulting in great confusion for the user
and making debugging the problem extremely difficult.

Example case:
I have a system on which the dll tools (necessary for compiling librl)
are not installed.
When I ran 'make' in the readline subdir of librl-2.0.3-2, make appeared
to call 'gcc' and then exits with 'Error 126', without either gcc or
make giving any diagnostic message.
When using 'strace', a child process of 'make' is seen to do a write(2)
to stderr with a diagnostic message, but this message never shows up.

Annotated log:
--
	Script started on Sun Jul 30 18:02:05 1995
	zensunni root 18:02 /exp/build/zooi9# set printexitvalue
	zensunni root 18:02 /exp/build/zooi9# setenv PATH /usr/bin:$PATH
Use the a.out utils, just to be sure.
	zensunni root 18:02 /exp/build/zooi9# file `which make`
	/usr/bin/make: Linux/i386 demand-paged executable (QMAGIC) - stripped
I reinstalled an a.out make, just to be sure the problem wasn't with an ELF
compiled version.
	zensunni root 18:02 /exp/build/zooi9# make -v
	GNU Make version 3.74, by Richard Stallman and Roland McGrath.
	Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95 Free Software Foundation, Inc.
	This is free software; see the source for copying conditions.
	There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
	PARTICULAR PURPOSE.

	zensunni root 18:02 /exp/build/zooi9# tar xfz librl-2.0.3-2.tar.gz
	zensunni root 18:02 /exp/build/zooi9# cd librl-2.0.3
	zensunni root 18:02 /exp/build/zooi9/librl-2.0.3# cd readline

Now we come to the problem itself:
	zensunni root 18:03 /exp/build/zooi9/librl-2.0.3/readline# make
	gcc -S -c -O2 -DHAVE_UNISTD_H -DHAVE_VARARGS_H -DHAVE_STRING_H -DHAVE_DIRENT_H -DHAVE_STDLIB_H -DHAVE_ALLOCA_H  -I. -I..  readline.c -o readline.s
	make: *** [readline.o] Error 126
	Exit 2
Note that no informative message whatsoever shows up.
It looks like gcc is the cause of the problem.

Maybe make -d helps...
	zensunni root 18:03 /exp/build/zooi9/librl-2.0.3/readline# make -d |& tail -20
	       Trying implicit dependency `history.h,v'.
	       Trying pattern rule with stem `history.h'.
	       Trying implicit dependency `RCS/history.h,v'.
	       Trying pattern rule with stem `history.h'.
	       Trying implicit dependency `s.history.h'.
	       Trying pattern rule with stem `history.h'.
	       Trying implicit dependency `SCCS/s.history.h'.
	       No implicit rule found for `history.h'.
	       Finished dependencies of target file `history.h'.
	      No need to remake target `history.h'.
	     Finished dependencies of target file `readline.o'.
	    Must remake target `readline.o'.
	gcc -S -c -O2 -DHAVE_UNISTD_H -DHAVE_VARARGS_H -DHAVE_STRING_H -DHAVE_DIRENT_H -DHAVE_STDLIB_H -DHAVE_ALLOCA_H  -I. -I..  readline.c -o readline.s
	Putting child 0x00029b40 PID 00258 on the chain.
	Live child 0x00029b40 PID 258
	Reaping winning child 0x00029b40 PID 258
	Live child 0x00029b40 PID 261
	Reaping losing child 0x00029b40 PID 261
	make: *** [readline.o] Error 126
	Removing child 0x00029b40 PID 261 from chain.
	Exit 2
Nope. Still no message.

*sigh*
	zensunni root 18:04 /exp/build/zooi9/librl-2.0.3/readline# strace -v -f make |&  tail -30
	[pid   272] sigaction(SIGCHLD, {SIG_DFL}, {0x8013f30, [CHLD], 0}) = 0
	[pid   272] open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
	[pid   272] dup2(3, 2)                  = 2
	[pid   272] close(3)                    = 0
	[pid   272] execve("/usr/bin/jumpas", ["/usr/bin/jumpas", "-o", "jump/readline.o", "readline.s"]["LOGNAME=root", "MAIL=/var/spool/mail/root", "MACHTYPE=i386", "PAGER=/usr/bin/less", "TERM=con80x25", "HOSTTYPE=i386-linux", "PATH=/usr/bin:/usr/local/sbin:/u", "HOME=/root", "SHELL=/bin/sh", "USER=root", "RCSINIT=-l", "JUMP_DIR=jump", "JUMP_LIB=libreadline", "VENDOR=ibm", "MAKEFLAGS=", "HOST=zensunni", ...]) = -1 ENOENT (No such file or directory)
	[pid   272] stat("/usr/bin/jumpas", 0xbffffabc) = -1 ENOENT (No such file or directory)
	[pid   272] open("/share/locale/C/LC_MESSAGES", O_RDONLY) = -1 ENOENT (No such file or directory)
	[pid   272] stat("/etc/locale/C/libc.cat", 0xbffff5c8) = -1 ENOENT (No such file or directory)
	[pid   272] stat("/usr/lib/locale/C/libc.cat", 0xbffff5c8) = -1 ENOENT (No such file or directory)
	[pid   272] stat("/usr/lib/locale/libc/C", 0xbffff5c8) = -1 ENOENT (No such file or directory)
	[pid   272] stat("/usr/share/locale/C/libc.cat", 0xbffff5c8) = -1 ENOENT (No such file or directory)
	[pid   272] stat("/usr/local/share/locale/C/libc.cat", 0xbffff5c8) = -1 ENOENT (No such file or directory)
Now watch closely:
	[pid   272] write(2, "/bin/sh: ", 9)    = 9
	[pid   272] write(2, "/", 1)            = 1
	[pid   272] write(2, "usr/bin/jumpas: No such file or "..., 41) = 41
	[pid   272] write(2, "\n", 1)           = 1
	[pid   272] _exit(126)                  = ?
	[pid   271] <... wait4 resumed> [WIFEXITED(s) && WEXITSTATUS(s) == 126], WUNTRACED, NULL) = 272
	[pid   271] sigprocmask(SIG_BLOCK, [CHLD], [CHLD]) = 0
	[pid   271] sigprocmask(SIG_SETMASK, [CHLD], NULL) = 0
	[pid   271] sigprocmask(SIG_SETMASK, [], NULL) = 0
	[pid   271] sigaction(SIGINT, {0x8003650, [], 0}, {0x80134e0, [INT], 0}) = 0
	[pid   271] _exit(126)                  = ?
	<... wait4 resumed> [WIFEXITED(s) && WEXITSTATUS(s) == 126], 0, NULL) = 271
	write(2, "make: ", 6make: )                   = 6
	write(2, "*** [readline.o] Error 126", 26*** [readline.o] Error 126) = 26
	write(2, "\n", 1
	)                       = 1
	chdir("/exp/build/zooi9/librl-2.0.3/readline") = 0
	_exit(2)                                = ?
The child process did do write's, but they don't show up. If I read the
make source correctly, the parent process should be reading this message
from a pipe, and write it later. Maybe shell_function_completed != -1,
although it should be? (see function.c, near line 456)
	zensunni root 18:05 /exp/build/zooi9/librl-2.0.3/readline# ^Dexit

	Script done on Sun Jul 30 18:05:36 1995
--

I think this example case is easily reproducible.

Regards,
Ray
--
Cyberspace, a final frontier. These are the voyages of my messages,
on a lightspeed mission to explore strange new systems and to boldly go
where no data has gone before.


Reply to: