pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/42265: devel/libdaemon build complains (and fails) with undefined libc symbols (NetBSD 4.0/i386)
>Number: 42265
>Category: pkg
>Synopsis: devel/libdaemon build complains (and fails) with undefined
>libc symbols (NetBSD 4.0/i386)
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Nov 04 14:55:00 +0000 2009
>Originator: Robert Elz
>Release: NetBSD 4.0 / i386
>Organization:
Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE
(JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008
kre%jade.coe.psu.ac.th@localhost:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
Attempting to build devel/libdaemon (libdaemon-0.14) fails with
many undefined symbol errors at the link stage - with the undefined
symbols all being things we'd expect to find in libc.
>How-To-Repeat:
I use pkg_comp with libkver and NetBSD 4.0 sets installed
(except x* but that's irrelevant here). This is a fairly
good approximation to a pure, unmodified, NetBSD 4.0 installation.
In that environment I see ...
===> Building for libdaemon-0.14
/usr/bin/make all-recursive
Making all in libdaemon
CC dlog.lo
CC dfork.lo
CC dsignal.lo
CC dnonblock.lo
CC dpid.lo
CC dexec.lo
CCLD libdaemon.la
.libs/dlog.o: In function `daemon_ident_from_argv0':
dlog.c:(.text+0x1b): undefined reference to `strrchr'
.libs/dlog.o: In function `daemon_logv':
dlog.c:(.text+0x4d): undefined reference to `__errno'
dlog.c:(.text+0x78): undefined reference to `openlog'
dlog.c:(.text+0x8c): undefined reference to `vsyslog'
dlog.c:(.text+0xa9): undefined reference to `__errno'
dlog.c:(.text+0xc5): undefined reference to `__sF'
dlog.c:(.text+0xce): undefined reference to `vfprintf'
dlog.c:(.text+0xd8): undefined reference to `fputc'
dlog.c:(.text+0xed): undefined reference to `__sF'
And many more similar errors (from lots of different
source files and functions) but all apparently libc symbols.
This doesn't appear to be something that pkgsrc is doing,
I get the same results if I build outside pkgsrc.
I have taken a look to see what the difference is between
this version of libdaemon (0.14) and the previous version (0.13)
which worked fine (well, built fine, I am not certain if I
have used any of the packages that use it, but probably).
Aside from large numbers of autodisaster changes, and a few
obvious bug fixes, I see very few changes, the one change I
do see that looks material is ...
134c168,169
< LIBDAEMON_VERSION_INFO = 4:0:4
---
> LDFLAGS_NOUNDEFINED = -Wl,--no-undefined
> LIBDAEMON_VERSION_INFO = 5:0:5
That's from libdaemon/Makefile - the (generated) Makefile for the
directory where the problems occur.
If I remove the "-Wl,--no-undefined" (outside pkgsrc for now)
the library builds fine. On the other hand, if I add "-lc"
as a library explicitly (instead of that change), it also
builds fine.
It seems obvious (which probably means it is wrong) that the
"--no-undefined" linker option is why we're getting undefined
symbols reported as errors - but it also seems obvious that this
is a deliberate change, and I also note that no-one else seems
to be observing any problems with this, so perhaps there's a
difference between NetBSD 4 and NetBSD 5 & current in this
area?
Other random info that might perhaps help from what I have
discovered - libdaemon has its own libtool, pkgsrc claims to
replace use of that with the standard pkgsrc libtool (and
probably does, it is hard to tell) but in any case it makes
no difference (I deliberately and definitely replaced the
libtool script included with pkgsrc's libtool when I did a
build outside pkgsrc, and tried that, I also tried with the
libtool supplied, none of that made any difference).
>Fix:
???
Whether the right thing is to link against libc and keep
the "--no-undefined-symbols" check/error, or whether not linking
against libc (which would be done again when libdaemon is
used with any other application anyway, I would expect) and
then removing the deliberately added error check, and how
much of this should depend upon NetBSD 4 rather than simply
applying generally I really have no idea.
However, this package is needed for building quite a bit of
other stuff, so I have marked this as a high priority bug...
Home |
Main Index |
Thread Index |
Old Index