GNU bug report logs -
#5942
8.4 "kill" program fails to link on AIX 5.3
Previous Next
Reported by: danielg <at> teragram.com
Date: Tue, 13 Apr 2010 22:21:02 UTC
Severity: normal
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5942 in the body.
You can then email your comments to 5942 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#5942
; Package
coreutils
.
(Tue, 13 Apr 2010 22:21:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
danielg <at> teragram.com
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Tue, 13 Apr 2010 22:21:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Building coreutils-8.4 on a 64-bit AIX 5.3 system using GCC, I get this:
gmake[1]: Entering directory `/tmp/coreutils-build/src'
CCLD kill
ld: 0711-317 ERROR: Undefined symbol: .pthread_once
ld: 0711-317 ERROR: Undefined symbol: .pthread_getspecific
ld: 0711-317 ERROR: Undefined symbol: .pthread_setspecific
ld: 0711-317 ERROR: Undefined symbol: .pthread_key_create
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
gmake[1]: *** [kill] Error 1
gmake[1]: Leaving directory `/tmp/coreutils-build/src'
gmake: *** [all] Error 2
Everything else builds and links fine. Does the "kill" program need some
special handling to make use of pthreads?
--Daniel
--
Daniel Richard G. || danielg <at> teragram.com || Software Developer
Teragram Linguistic Technologies (a division of SAS)
http://www.teragram.com/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#5942
; Package
coreutils
.
(Tue, 13 Apr 2010 23:46:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 5942 <at> debbugs.gnu.org (full text, mbox):
On 13/04/10 22:36, Daniel Richard G. wrote:
> Building coreutils-8.4 on a 64-bit AIX 5.3 system using GCC, I get this:
>
> gmake[1]: Entering directory `/tmp/coreutils-build/src'
> CCLD kill
> ld: 0711-317 ERROR: Undefined symbol: .pthread_once
> ld: 0711-317 ERROR: Undefined symbol: .pthread_getspecific
> ld: 0711-317 ERROR: Undefined symbol: .pthread_setspecific
> ld: 0711-317 ERROR: Undefined symbol: .pthread_key_create
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
> collect2: ld returned 8 exit status
> gmake[1]: *** [kill] Error 1
> gmake[1]: Leaving directory `/tmp/coreutils-build/src'
> gmake: *** [all] Error 2
>
> Everything else builds and links fine. Does the "kill" program need some
> special handling to make use of pthreads?
That's very strange.
Is the `timeout` util built for example as that uses
much the samem functions as `kill`.
It's like kill was being built with a different
toolchain (like xlc_r or something).
Could you provide the build output from `make V=1`.
cheers,
Pádraig.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#5942
; Package
coreutils
.
(Wed, 14 Apr 2010 23:08:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 5942 <at> debbugs.gnu.org (full text, mbox):
Pádraig Brady wrote:
>
> That's very strange.
> Is the `timeout` util built for example as that uses
> much the samem functions as `kill`.
> It's like kill was being built with a different
> toolchain (like xlc_r or something).
The vendor compiler isn't even installed on this system; only GCC.
> Could you provide the build output from `make V=1`.
Of course. Here is the output from compiling and linking the "timeout" and
"kill" programs:
$ gmake V=1 timeout kill
\
# source='/tmp/coreutils-8.4/src/timeout.c' object='timeout.o'
libtool=no
/tmp/coreutils-8.4/build-aux/compile
gcc -std=gnu99 -I. -I/tmp/coreutils-8.4/src -I../lib -I/tmp/coreutils-8.4/lib
-D_ALL_SOURCE -D_THREAD_SAFE -D_THREAD_SAFE -pedantic -pipe -fno-common -W
-Wall -Wcast-align -Wformat=2 -Wpointer-arith -Wundef -Waggregate-return -Wcast-qual
-Wmissing-declarations -Wnested-externs -Wstrict-prototypes -maix64 -mminimal-toc
-O3 -c /tmp/coreutils-8.4/src/timeout.c
In file included from /tmp/coreutils-8.4/src/timeout.c:63:
/tmp/coreutils-8.4/src/system.h:21:10: warning: "__GLIBC__" is not defined
/tmp/coreutils-8.4/src/system.h:51:5: warning: "MAJOR_IN_MKDEV" is not defined
In file included from /tmp/coreutils-8.4/src/system.h:233,
from /tmp/coreutils-8.4/src/timeout.c:63:
/tmp/coreutils-8.4/lib/gettext.h:23:5: warning: "ENABLE_NLS" is not defined
/tmp/coreutils-8.4/lib/gettext.h:185:6: warning: "__STRICT_ANSI__" is not
defined
/tmp/coreutils-8.4/lib/gettext.h:209:5: warning: "__STRICT_ANSI__" is not
defined
/tmp/coreutils-8.4/lib/gettext.h:224:6: warning: "__STRICT_ANSI__" is not
defined
/tmp/coreutils-8.4/lib/gettext.h:255:5: warning: "__STRICT_ANSI__" is not
defined
/tmp/coreutils-8.4/lib/gettext.h:270:6: warning: "__STRICT_ANSI__" is not
defined
In file included from /tmp/coreutils-8.4/src/timeout.c:63:
/tmp/coreutils-8.4/src/system.h:234:7: warning: "ENABLE_NLS" is not defined
In file included from /tmp/coreutils-8.4/src/system.h:302,
from /tmp/coreutils-8.4/src/timeout.c:63:
/tmp/coreutils-8.4/lib/openat.h:40:6: warning: "HAVE_OPENAT" is not defined
In file included from /tmp/coreutils-8.4/src/system.h:409,
from /tmp/coreutils-8.4/src/timeout.c:63:
/tmp/coreutils-8.4/lib/progname.h:39:5: warning: "ENABLE_RELOCATABLE" is not
defined
In file included from /tmp/coreutils-8.4/src/timeout.c:63:
/tmp/coreutils-8.4/src/system.h: In function 'ptr_align':
/tmp/coreutils-8.4/src/system.h:542: warning: cast discards qualifiers from
pointer target type
In file included from /tmp/coreutils-8.4/src/timeout.c:63:
/tmp/coreutils-8.4/src/system.h: In function 'bad_cast':
/tmp/coreutils-8.4/src/system.h:625: warning: cast discards qualifiers from
pointer target type
/tmp/coreutils-8.4/src/system.h: In function 'io_blksize':
/tmp/coreutils-8.4/src/system.h:670: warning: comparison between signed and
unsigned
/tmp/coreutils-8.4/src/system.h:670: warning: comparison between signed and
unsigned
/tmp/coreutils-8.4/build-aux/compile
gcc -std=gnu99 -pedantic -pipe -fno-common -W -Wall -Wcast-align -Wformat=2
-Wpointer-arith -Wundef -Waggregate-return -Wcast-qual -Wmissing-declarations
-Wnested-externs -Wstrict-prototypes -maix64 -mminimal-toc -O3 -o timeout
timeout.o operand2sig.o libver.a ../lib/libcoreutils.a ../lib/libcoreutils.a
\
# source='/tmp/coreutils-8.4/src/kill.c' object='kill.o' libtool=no
/tmp/coreutils-8.4/build-aux/compile
gcc -std=gnu99 -I. -I/tmp/coreutils-8.4/src -I../lib -I/tmp/coreutils-8.4/lib
-D_ALL_SOURCE -D_THREAD_SAFE -D_THREAD_SAFE -pedantic -pipe -fno-common -W
-Wall -Wcast-align -Wformat=2 -Wpointer-arith -Wundef -Waggregate-return -Wcast-qual
-Wmissing-declarations -Wnested-externs -Wstrict-prototypes -maix64 -mminimal-toc
-O3 -c /tmp/coreutils-8.4/src/kill.c
In file included from /tmp/coreutils-8.4/src/kill.c:35:
/tmp/coreutils-8.4/src/system.h:21:10: warning: "__GLIBC__" is not defined
/tmp/coreutils-8.4/src/system.h:51:5: warning: "MAJOR_IN_MKDEV" is not defined
In file included from /tmp/coreutils-8.4/src/system.h:233,
from /tmp/coreutils-8.4/src/kill.c:35:
/tmp/coreutils-8.4/lib/gettext.h:23:5: warning: "ENABLE_NLS" is not defined
/tmp/coreutils-8.4/lib/gettext.h:185:6: warning: "__STRICT_ANSI__" is not
defined
/tmp/coreutils-8.4/lib/gettext.h:209:5: warning: "__STRICT_ANSI__" is not
defined
/tmp/coreutils-8.4/lib/gettext.h:224:6: warning: "__STRICT_ANSI__" is not
defined
/tmp/coreutils-8.4/lib/gettext.h:255:5: warning: "__STRICT_ANSI__" is not
defined
/tmp/coreutils-8.4/lib/gettext.h:270:6: warning: "__STRICT_ANSI__" is not
defined
In file included from /tmp/coreutils-8.4/src/kill.c:35:
/tmp/coreutils-8.4/src/system.h:234:7: warning: "ENABLE_NLS" is not defined
In file included from /tmp/coreutils-8.4/src/system.h:302,
from /tmp/coreutils-8.4/src/kill.c:35:
/tmp/coreutils-8.4/lib/openat.h:40:6: warning: "HAVE_OPENAT" is not defined
In file included from /tmp/coreutils-8.4/src/system.h:409,
from /tmp/coreutils-8.4/src/kill.c:35:
/tmp/coreutils-8.4/lib/progname.h:39:5: warning: "ENABLE_RELOCATABLE" is not
defined
In file included from /tmp/coreutils-8.4/src/kill.c:35:
/tmp/coreutils-8.4/src/system.h: In function 'ptr_align':
/tmp/coreutils-8.4/src/system.h:542: warning: cast discards qualifiers from
pointer target type
In file included from /tmp/coreutils-8.4/src/kill.c:35:
/tmp/coreutils-8.4/src/system.h: In function 'bad_cast':
/tmp/coreutils-8.4/src/system.h:625: warning: cast discards qualifiers from
pointer target type
/tmp/coreutils-8.4/src/system.h: In function 'io_blksize':
/tmp/coreutils-8.4/src/system.h:670: warning: comparison between signed and
unsigned
/tmp/coreutils-8.4/src/system.h:670: warning: comparison between signed and
unsigned
/tmp/coreutils-8.4/build-aux/compile
gcc -std=gnu99 -pedantic -pipe -fno-common -W -Wall -Wcast-align -Wformat=2
-Wpointer-arith -Wundef -Waggregate-return -Wcast-qual -Wmissing-declarations
-Wnested-externs -Wstrict-prototypes -maix64 -mminimal-toc -O3 -o kill
kill.o operand2sig.o libver.a ../lib/libcoreutils.a ../lib/libcoreutils.a
ld: 0711-317 ERROR: Undefined symbol: .pthread_once
ld: 0711-317 ERROR: Undefined symbol: .pthread_getspecific
ld: 0711-317 ERROR: Undefined symbol: .pthread_setspecific
ld: 0711-317 ERROR: Undefined symbol: .pthread_key_create
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
gmake: *** [kill] Error 1
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#5942
; Package
coreutils
.
(Thu, 15 Apr 2010 09:46:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 5942 <at> debbugs.gnu.org (full text, mbox):
On 15/04/10 00:07, Daniel Richard G. wrote:
> Pádraig Brady wrote:
>>
>> That's very strange.
>> Is the `timeout` util built for example as that uses
>> much the samem functions as `kill`.
>> It's like kill was being built with a different
>> toolchain (like xlc_r or something).
>
> The vendor compiler isn't even installed on this system; only GCC.
>
>> Could you provide the build output from `make V=1`.
>
> Of course. Here is the output from compiling and linking the "timeout" and
> "kill" programs:
>
> $ gmake V=1 timeout kill
> \
> # source='/tmp/coreutils-8.4/src/timeout.c' object='timeout.o'
> gcc -std=gnu99 -I. -I/tmp/coreutils-8.4/src -I../lib -I/tmp/coreutils-8.4/lib
> -D_ALL_SOURCE -D_THREAD_SAFE -D_THREAD_SAFE -pedantic -pipe -fno-common -W
> -Wall -Wcast-align -Wformat=2 -Wpointer-arith -Wundef -Waggregate-return -Wcast-qual
> -Wmissing-declarations -Wnested-externs -Wstrict-prototypes -maix64 -mminimal-toc
> -O3 -c /tmp/coreutils-8.4/src/timeout.c
> gcc -std=gnu99 -pedantic -pipe -fno-common -W -Wall -Wcast-align -Wformat=2
> -Wpointer-arith -Wundef -Waggregate-return -Wcast-qual -Wmissing-declarations
> -Wnested-externs -Wstrict-prototypes -maix64 -mminimal-toc -O3 -o timeout
> timeout.o operand2sig.o libver.a ../lib/libcoreutils.a ../lib/libcoreutils.a
> gcc -std=gnu99 -I. -I/tmp/coreutils-8.4/src -I../lib -I/tmp/coreutils-8.4/lib
> -D_ALL_SOURCE -D_THREAD_SAFE -D_THREAD_SAFE -pedantic -pipe -fno-common -W
> -Wall -Wcast-align -Wformat=2 -Wpointer-arith -Wundef -Waggregate-return -Wcast-qual
> -Wmissing-declarations -Wnested-externs -Wstrict-prototypes -maix64 -mminimal-toc
> -O3 -c /tmp/coreutils-8.4/src/kill.c
> gcc -std=gnu99 -pedantic -pipe -fno-common -W -Wall -Wcast-align -Wformat=2
> -Wpointer-arith -Wundef -Waggregate-return -Wcast-qual -Wmissing-declarations
> -Wnested-externs -Wstrict-prototypes -maix64 -mminimal-toc -O3 -o kill
> kill.o operand2sig.o libver.a ../lib/libcoreutils.a ../lib/libcoreutils.a
> ld: 0711-317 ERROR: Undefined symbol: .pthread_once
> ld: 0711-317 ERROR: Undefined symbol: .pthread_getspecific
> ld: 0711-317 ERROR: Undefined symbol: .pthread_setspecific
> ld: 0711-317 ERROR: Undefined symbol: .pthread_key_create
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
> collect2: ld returned 8 exit status
So the above confirms that timeout and kill are being compiled and linked
with the same options. Therefore it must be something particular to kill.c
that's causing this. A quick look shows that kill.c uses strsignal()
while timeout doesn't and I can now see that the gnulib replacement for
this function is implemented using thread local storage.
gnulib/modules/tls says to link $(LIBTHREAD), so could you try the following.
It that doesn't work, could you change $(LIBTHREAD) to $(LIBMULTITHREAD).
cheers,
Pádraig.
diff --git a/src/Makefile.am b/src/Makefile.am
index 44f1237..20b306d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -394,6 +394,9 @@ who_LDADD += $(GETADDRINFO_LIB)
hostname_LDADD += $(GETHOSTNAME_LIB)
uname_LDADD += $(GETHOSTNAME_LIB)
+# for strsignal
+kill_LDADD += $(LIBTHREAD)
+
$(PROGRAMS): ../lib/libcoreutils.a
# Get the release year from ../lib/version-etc.c.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
:
bug#5942
; Package
coreutils
.
(Thu, 15 Apr 2010 15:02:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 5942 <at> debbugs.gnu.org (full text, mbox):
Pádraig Brady wrote:
>
> So the above confirms that timeout and kill are being
> compiled and linked
> with the same options. Therefore it must be something
> particular to kill.c
> that's causing this. A quick look shows that kill.c
> uses strsignal()
> while timeout doesn't and I can now see that the
> gnulib replacement for
> this function is implemented using thread local
> storage.
>
> gnulib/modules/tls says to link $(LIBTHREAD), so could
> you try the following.
> It that doesn't work, could you change $(LIBTHREAD) to
> $(LIBMULTITHREAD).
Indeed, that does the trick! Adding either of $(LIBTHREAD) or
$(LIBMULTITHREAD) to kill_LDADD allows the program to link successfully.
--Daniel
Reply sent
to
Pádraig Brady <P <at> draigBrady.com>
:
You have taken responsibility.
(Fri, 16 Apr 2010 00:21:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
danielg <at> teragram.com
:
bug acknowledged by developer.
(Fri, 16 Apr 2010 00:21:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 5942-done <at> debbugs.gnu.org (full text, mbox):
On 15/04/10 16:01, Daniel Richard G. wrote:
> Indeed, that does the trick! Adding either of $(LIBTHREAD) or
> $(LIBMULTITHREAD) to kill_LDADD allows the program to link successfully.
Thanks for testing.
I've just pushed that fix.
cheers,
Pádraig.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 14 May 2010 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 15 years and 100 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.