Bug 849 - build failure with nptl
Summary: build failure with nptl
Status: RESOLVED DUPLICATE of bug 333
Alias: None
Product: glibc
Classification: Unclassified
Component: nptl (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-14 21:12 UTC by Alan Hourihane
Modified: 2006-06-19 13:02 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Hourihane 2005-04-14 21:12:49 UTC
I'm getting a build failure with glibc 2.3.5, below is the error when building nptl.

gcc ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c -c -std=gnu99 -O2 -Wall
-Winline -Wstrict-prototypes -Wwrite-strings -g -mpreferred-stack-boundary=2   
 -I../include -I. -I/usr/src/glibc-build/nptl -I.. -I../libio 
-I/usr/src/glibc-build -I../sysdeps/i386/elf
-I../nptl/sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux
-I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../nptl/sysdeps/unix/sysv
-I../nptl/sysdeps/unix -I../nptl/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common
-I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386
-I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix
-I../sysdeps/posix -I../sysdeps/i386/fpu -I../sysdeps/i386
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem
/tools/lib/gcc/i686-pc-linux-gnu/3.4.3/include -isystem /usr/include
-D_LIBC_REENTRANT -D_LIBC_REENTRANT -include ../include/libc-symbols.h       -o
/usr/src/glibc-build/nptl/libc-lowlevellock.o -MD -MP -MF
/usr/src/glibc-build/nptl/libc-lowlevellock.o.dt -MT
/usr/src/glibc-build/nptl/libc-lowlevellock.o
In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:29: error: conflicting types for
'__lll_lock_wait'
../nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:227: error: previous
declaration of '__lll_lock_wait' was here
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:29: error: conflicting types for
'__lll_lock_wait'
../nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:227: error: previous
declaration of '__lll_lock_wait' was here
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function `__lll_lock_wait':
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:32: warning: implicit declaration
of function `atomic_compare_and_exchange_val_acq'
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:36: warning: implicit declaration
of function `atomic_compare_and_exchange_bool_acq'
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function `__lll_timedlock_wait':
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:71: warning: implicit declaration
of function `lll_futex_timed_wait'
make[3]: *** [/usr/src/glibc-build/nptl/libc-lowlevellock.o] Error 1
make[3]: Leaving directory `/usr/src/glibc-2.3.5/nptl'
make[2]: *** [nptl/subdir_lib] Error 2
make[2]: Leaving directory `/usr/src/glibc-2.3.5'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/glibc-build'
make: *** [/usr/src/log/glibc-2.3.5] Error 2
Comment 1 Ulrich Drepper 2005-04-14 21:26:37 UTC

*** This bug has been marked as a duplicate of 333 ***
Comment 2 tirathp 2006-01-28 08:10:38 UTC
(In reply to comment #1)
> 
> *** This bug has been marked as a duplicate of 333 ***

With gcc-3.4.4 and glibc-2.3.6 this error still persists

In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21:
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:29: error: conflicting types for
'__lll_lock_wait'
../nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:227: error: previous
declaration of '__lll_lock_wait' was here
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:29: error: conflicting types for
'__lll_lock_wait'
../nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h:227: error: previous
declaration of '__lll_lock_wait' was here
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function `__lll_lock_wait':
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:32: warning: implicit declaration
of function `atomic_compare_and_exchange_val_acq'
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:36: warning: implicit declaration
of function `atomic_compare_and_exchange_bool_acq'
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c: In function `__lll_timedlock_wait':
../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:71: warning: implicit declaration
of function `lll_futex_timed_wait'
make[2]: ***
[/opt/bak/bak_os/lbe/crosscomp-src/glibc/glibc-build/nptl/libc-lowlevellock.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory
`/opt/bak/bak_os/lbe/crosscomp-src/glibc/glibc-2.3.6/nptl'
make[1]: *** [nptl/subdir_lib] Error 2
make[1]: Leaving directory `/opt/bak/bak_os/lbe/crosscomp-src/glibc/glibc-2.3.6'
make: *** [all] Error 2
Comment 3 Denis Vlasenko 2006-06-19 11:33:39 UTC
The problem seems to be here:

nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h (fixed):

//vda: seems like bug?
//extern int __lll_lock_wait (int val, int *__futex)
//     __attribute ((regparm (2))) attribute_hidden;
extern int __lll_lock_wait (int *__futex)               //
     /* __attribute ((regparm (1))) */ attribute_hidden;      //

All other arches have __lll_lock_wait() with ONE argument (int *__futex),
and nptl/sysdeps/unix/sysv/linux/lowlevellock.c does expect that.

Why this bug is marked as a dup of a bug 333 "This is a placeholder bug; other
bugs are marked as duplicates of this bug when they are improper reports about
problems compiling glibc" - is beyond me.
Comment 4 Jakub Jelinek 2006-06-19 11:39:07 UTC
Because it is a user error - you are trying to build NPTL on an architecture that
is not supported by NPTL.  On i?86 NPTL only supports i486, i586, i686 or newer,
not i386 (which doesn't have the minimal set of atomic instructions that is
required for NPTL.

*** This bug has been marked as a duplicate of 333 ***
Comment 5 Denis Vlasenko 2006-06-19 13:02:00 UTC
Awwwwwww how stupid! THANKS! Rebuilding for i486...