public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* build failure
@ 2003-01-03 23:34 Richard Henderson
  2003-01-03 23:50 ` Jakub Jelinek
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Henderson @ 2003-01-03 23:34 UTC (permalink / raw)
  To: libc-hacker

Anyone know what is supposed to be going on here, and why it doesn't
seem to be working?


r~



make[4]: Entering directory `/dorothy/rth/libc/libc/linuxthreads'
Makefile:119: warning: overriding commands for target `/usr/lib/libpthread.so'
../o-iterator.mk:9: warning: ignoring old commands for target `/usr/lib/libpthread.so'
gcc alloca_cutoff.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -mieee  -fpic    -I../include -I. -I/dorothy/rth/libc/build/linuxthreads -I.. -I../libio  -I/dorothy/rth/libc/build -I../linuxthreads/sysdeps/alpha/elf -I../sysdeps/alpha/elf -I../linuxthreads/sysdeps/unix/sysv/linux/alpha -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/alpha -I../sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/alpha -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/alpha/alphaev67/fpu -I../sysdeps/alpha/alphaev6/fpu -I../sysdeps/alpha/alphaev67 -I../sysdeps/alpha/alphaev6 -I../sysdeps/alpha/alphaev5 -I../sysdeps/alpha/fpu -I../sysdeps/alpha -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic   -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC -DSHARED     -DNOT_IN_libc=1 -DIS_IN_rtld=1 -o /dorothy/rth/libc/build/linuxthreads/rtld-alloca_cutoff.os
alloca_cutoff.c: In function `__libc_alloca_cutoff':
alloca_cutoff.c:31: warning: implicit declaration of function `LIBC_THREAD_GETMEM'
alloca_cutoff.c:31: error: `p_alloca_cutoff' undeclared (first use in this function)
alloca_cutoff.c:31: error: (Each undeclared identifier is reported only once
alloca_cutoff.c:31: error: for each function it appears in.)
alloca_cutoff.c:31: warning: comparison between signed and unsigned
make[4]: *** [/dorothy/rth/libc/build/linuxthreads/rtld-alloca_cutoff.os] Error 1
make[4]: Leaving directory `/dorothy/rth/libc/libc/linuxthreads'
make[3]: *** [/dorothy/rth/libc/build/linuxthreads/rtld-alloca_cutoff.os] Error 2
make[3]: Leaving directory `/dorothy/rth/libc/libc/elf'
make[2]: *** [/dorothy/rth/libc/build/elf/rtld-libc.a] Error 2
make[2]: Leaving directory `/dorothy/rth/libc/libc/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/dorothy/rth/libc/libc'
make: *** [all] Error 2

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: build failure
  2003-01-03 23:34 build failure Richard Henderson
@ 2003-01-03 23:50 ` Jakub Jelinek
  2003-01-03 23:57   ` Jakub Jelinek
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Jelinek @ 2003-01-03 23:50 UTC (permalink / raw)
  To: libc-hacker

On Fri, Jan 03, 2003 at 03:32:26PM -0800, Richard Henderson wrote:
> Anyone know what is supposed to be going on here, and why it doesn't
> seem to be working?
> 
> make[4]: Entering directory `/dorothy/rth/libc/libc/linuxthreads'
> Makefile:119: warning: overriding commands for target `/usr/lib/libpthread.so'
> ../o-iterator.mk:9: warning: ignoring old commands for target `/usr/lib/libpthread.so'
> gcc alloca_cutoff.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -mieee  -fpic    -I../include -I. -I/dorothy/rth/libc/build/linuxthreads -I.. -I../libio  -I/dorothy/rth/libc/build -I../linuxthreads/sysdeps/alpha/elf -I../sysdeps/alpha/elf -I../linuxthreads/sysdeps/unix/sysv/linux/alpha -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/alpha -I../sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/alpha -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/alpha/alphaev67/fpu -I../sysdeps/alpha/alphaev6/fpu -I../sysdeps/alpha/alphaev67 -I../sysdeps/alpha/alphaev6 -I../sysdeps/alpha/alphaev5 -I../sysdeps/alpha/fpu -I../sysdeps/alpha -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic   -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC -DSHARED     -DNOT_IN_libc=1 -DIS_IN_rtld=1 -o /dorothy/rth/libc/build/linuxthreads/rtld-alloca_cutoff.os
> alloca_cutoff.c: In function `__libc_alloca_cutoff':
> alloca_cutoff.c:31: warning: implicit declaration of function `LIBC_THREAD_GETMEM'
> alloca_cutoff.c:31: error: `p_alloca_cutoff' undeclared (first use in this function)
> alloca_cutoff.c:31: error: (Each undeclared identifier is reported only once
> alloca_cutoff.c:31: error: for each function it appears in.)
> alloca_cutoff.c:31: warning: comparison between signed and unsigned
> make[4]: *** [/dorothy/rth/libc/build/linuxthreads/rtld-alloca_cutoff.os] Error 1
> make[4]: Leaving directory `/dorothy/rth/libc/libc/linuxthreads'
> make[3]: *** [/dorothy/rth/libc/build/linuxthreads/rtld-alloca_cutoff.os] Error 2
> make[3]: Leaving directory `/dorothy/rth/libc/libc/elf'
> make[2]: *** [/dorothy/rth/libc/build/elf/rtld-libc.a] Error 2
> make[2]: Leaving directory `/dorothy/rth/libc/libc/elf'
> make[1]: *** [elf/subdir_lib] Error 2
> make[1]: Leaving directory `/dorothy/rth/libc/libc'
> make: *** [all] Error 2

Does the following patch fix it?
It doesn't fail on IA-32/x86-64/IA-64, because
apparently rtld-alloca-cutoff.os is not compiled at all on those arches.
Wonder what object sucks it in.

2003-01-04  Jakub Jelinek  <jakub@redhat.com>

	* internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
	even if NOT_IN_libc is defined.

--- libc/linuxthreads/internals.h.jj	2003-01-03 14:11:54.000000000 +0100
+++ libc/linuxthreads/internals.h	2003-01-04 02:10:56.000000000 +0100
@@ -43,15 +43,13 @@
 # define THREAD_SETMEM_NC(descr, member, value) descr->member = (value)
 #endif
 
-#ifndef NOT_IN_libc
-# ifdef FLOATING_STACKS
-#  define LIBC_THREAD_GETMEM(descr, member) THREAD_GETMEM (descr, member)
-#  define LIBC_THREAD_SETMEM(descr, member, value) \
+#if !defined NOT_IN_libc && defined FLOATING_STACKS
+# define LIBC_THREAD_GETMEM(descr, member) THREAD_GETMEM (descr, member)
+# define LIBC_THREAD_SETMEM(descr, member, value) \
   THREAD_SETMEM (descr, member, value)
-# else
-#  define LIBC_THREAD_GETMEM(descr, member) descr->member
-#  define LIBC_THREAD_SETMEM(descr, member, value) descr->member = (value)
-# endif
+#else
+# define LIBC_THREAD_GETMEM(descr, member) descr->member
+# define LIBC_THREAD_SETMEM(descr, member, value) descr->member = (value)
 #endif
 
 typedef void (*destr_function)(void *);


	Jakub

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: build failure
  2003-01-03 23:50 ` Jakub Jelinek
@ 2003-01-03 23:57   ` Jakub Jelinek
  2003-01-05  2:09     ` Richard Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Jelinek @ 2003-01-03 23:57 UTC (permalink / raw)
  To: Richard Henderson, Glibc hackers

On Sat, Jan 04, 2003 at 12:50:02AM +0100, Jakub Jelinek wrote:
> Does the following patch fix it?
> It doesn't fail on IA-32/x86-64/IA-64, because
> apparently rtld-alloca-cutoff.os is not compiled at all on those arches.
> Wonder what object sucks it in.

No longer wonder. I think it is writev. And alloca-cutoff.c is not needed
in ld.so on IA-32/x86-64/IA-64/sparc/sparc64 because it has INTERNAL_SYSCALL
macro implemented, while Alpha does not.
That one would be good to have...

	Jakub

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: build failure
  2003-01-03 23:57   ` Jakub Jelinek
@ 2003-01-05  2:09     ` Richard Henderson
  2003-01-05  7:51       ` Jakub Jelinek
  2003-01-05 21:51       ` Roland McGrath
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Henderson @ 2003-01-05  2:09 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Richard Henderson, Glibc hackers

On Sat, Jan 04, 2003 at 12:57:15AM +0100, Jakub Jelinek wrote:
> No longer wonder. I think it is writev. And alloca-cutoff.c is not needed
> in ld.so on IA-32/x86-64/IA-64/sparc/sparc64 because it has INTERNAL_SYSCALL
> macro implemented, while Alpha does not.
> That one would be good to have...

The interface is lousy.

  (1) I'd have to generate an error return value.

      Unlike x86, the error indication is out of band from the
      return value.  Normally, this is a Good Thing.

  (2) The single place the error return value is checked, it's
      done with a variable that's too narrow.

I suggest that INTERNAL_SYSCALL be re-architected to return an error
indication as an output argument to the macro, i.e.

  result = INTERNAL_SYSCALL (errno, name, nr, args...) 

with errno == 0 on success.  This lets you get rid of 
INTERNAL_SYSCALL_ERROR_P and INTERNAL_SYSCALL_ERRNO.
In theory, you're not doing any additional work on x86
(or others, since all callers should be checking the
return result anyway, right?  And if you don't, the
computation should be removed as dead code.


r~

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: build failure
  2003-01-05  2:09     ` Richard Henderson
@ 2003-01-05  7:51       ` Jakub Jelinek
  2003-01-05 21:51       ` Roland McGrath
  1 sibling, 0 replies; 7+ messages in thread
From: Jakub Jelinek @ 2003-01-05  7:51 UTC (permalink / raw)
  To: Richard Henderson, Glibc hackers

On Sat, Jan 04, 2003 at 06:07:05PM -0800, Richard Henderson wrote:
> On Sat, Jan 04, 2003 at 12:57:15AM +0100, Jakub Jelinek wrote:
> > No longer wonder. I think it is writev. And alloca-cutoff.c is not needed
> > in ld.so on IA-32/x86-64/IA-64/sparc/sparc64 because it has INTERNAL_SYSCALL
> > macro implemented, while Alpha does not.
> > That one would be good to have...
> 
> The interface is lousy.
> 
>   (1) I'd have to generate an error return value.
> 
>       Unlike x86, the error indication is out of band from the
>       return value.  Normally, this is a Good Thing.
> 
>   (2) The single place the error return value is checked, it's
>       done with a variable that's too narrow.
> 
> I suggest that INTERNAL_SYSCALL be re-architected to return an error
> indication as an output argument to the macro, i.e.
> 
>   result = INTERNAL_SYSCALL (errno, name, nr, args...) 
> 
> with errno == 0 on success.  This lets you get rid of 
> INTERNAL_SYSCALL_ERROR_P and INTERNAL_SYSCALL_ERRNO.
> In theory, you're not doing any additional work on x86
> (or others, since all callers should be checking the
> return result anyway, right?  And if you don't, the
> computation should be removed as dead code.

I agree.

	Jakub

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: build failure
  2003-01-05  2:09     ` Richard Henderson
  2003-01-05  7:51       ` Jakub Jelinek
@ 2003-01-05 21:51       ` Roland McGrath
  2003-01-06  0:17         ` Richard Henderson
  1 sibling, 1 reply; 7+ messages in thread
From: Roland McGrath @ 2003-01-05 21:51 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Jakub Jelinek, Richard Henderson, Glibc hackers

> The interface is lousy.
> I suggest that INTERNAL_SYSCALL be re-architected to return an error
> indication as an output argument to the macro, i.e.
> 
>   result = INTERNAL_SYSCALL (errno, name, nr, args...) 

That is ok by me.  I considered a hairier interface to begin with.  At
first the uses of INTERNAL_SYSCALL were for a few special cases that cannot
fail and so weren't checked, so I just kept the macro interface minimal.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: build failure
  2003-01-05 21:51       ` Roland McGrath
@ 2003-01-06  0:17         ` Richard Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2003-01-06  0:17 UTC (permalink / raw)
  To: Roland McGrath; +Cc: Jakub Jelinek, Richard Henderson, Glibc hackers

On Sun, Jan 05, 2003 at 01:51:21PM -0800, Roland McGrath wrote:
> That is ok by me.  I considered a hairier interface to begin with.  At
> first the uses of INTERNAL_SYSCALL were for a few special cases that cannot
> fail and so weren't checked, so I just kept the macro interface minimal.

Ok.  I've got a patch in testing.


r~

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-01-06  0:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-03 23:34 build failure Richard Henderson
2003-01-03 23:50 ` Jakub Jelinek
2003-01-03 23:57   ` Jakub Jelinek
2003-01-05  2:09     ` Richard Henderson
2003-01-05  7:51       ` Jakub Jelinek
2003-01-05 21:51       ` Roland McGrath
2003-01-06  0:17         ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).