NetBSD Problem Report #45337
From kre@munnari.OZ.AU Wed Sep 7 13:04:04 2011
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 51E8763C093
for <gnats-bugs@gnats.NetBSD.org>; Wed, 7 Sep 2011 13:04:04 +0000 (UTC)
Message-Id: <201109071303.p87D3ot5021948@jade.coe.psu.ac.th>
Date: Wed, 7 Sep 2011 20:03:50 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@gnats.NetBSD.org
Subject: mail/evolution{,-data-server} library link errors (NetBSD 4.0)
X-Send-Pr-Version: 3.95
>Number: 45337
>Category: pkg
>Synopsis: mail/evolution{,-data-server} library link errors (NetBSD 4.0)
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: joerg
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 07 13:05:00 +0000 2011
>Closed-Date: Wed Nov 13 18:57:06 +0000 2019
>Last-Modified: Wed Nov 13 18:57:06 +0000 2019
>Originator: Robert Elz
>Release: NetBSD 4.0 (pkgsrc -current 2011-09-07)
>Organization:
Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 5.1 NetBSD 5.1 (JADE-1.12-20101117) #5: Wed Nov 17 05:30:55 ICT 2010 kre@jade.coe.psu.ac.th:/usr/obj/5.1/kernels/i386/JADE i386
Architecture: i386
Machine: i386
>Description:
mail/evolution and mail/evolution-data-server both encounter
a bug described by joerg as
"the spec for GCC is wrong and it
has only been fixed around netbsd-4.99.x"
when compiled on NetBSD 4.0 (which is before 4.99.x obviously).
Other gnome based packages have had the same problem in the
past, at least some of them (like audio/pulseaudio) have
been fixed in the past (see PR 42820 for that one).
This seems to have started becoming a problem when the gnome
system was upgraded to the 2.30 gnome release around July 2010
(for me, the evolution packages have not been rebuilt since
that ime).
>How-To-Repeat:
Attempt to build mail/evolution or mail/evolution-data-server
on a NetBSD 4.0 (unpatched) system (some later pullup to
the netbsd-4 branch may have corrected it - I don't know -
for later NetBSD 4 based builds, but none of those has ever
been actually released).
Expect to see the builds fail with errors like ...
CCLD libart_lgpl.la
.libs/libart_lgpl_la-art_gray_svp.o: In function `art_gray_svp_callback':
art_gray_svp.c:(.text+0xf3): undefined reference to `memset'
art_gray_svp.c:(.text+0x141): undefined reference to `memset'
art_gray_svp.c:(.text+0x169): undefined reference to `memset'
art_gray_svp.c:(.text+0x187): undefined reference to `memset'
.libs/libart_lgpl_la-art_misc.o: In function `art_realloc':
art_misc.c:(.text+0x1a): undefined reference to `realloc'
.libs/libart_lgpl_la-art_misc.o: In function `art_free':
art_misc.c:(.text+0x3b): undefined reference to `free'
.libs/libart_lgpl_la-art_misc.o: In function `art_alloc':
art_misc.c:(.text+0x5f): undefined reference to `malloc'
.libs/libart_lgpl_la-art_misc.o: In function `art_warn':
art_misc.c:(.text+0x87): undefined reference to `__sF'
art_misc.c:(.text+0x92): undefined reference to `vfprintf'
.libs/libart_lgpl_la-art_misc.o: In function `art_die':
for mail/evolution, and ...
CCLD libedataserver-1.2.la
.libs/libedataserver_1_2_la-e-account-list.o: In function `.L8':
e-account-list.c:(.text+0x6c): undefined reference to `strcmp'
.libs/libedataserver_1_2_la-e-account-list.o: In function `.L12':
e-account-list.c:(.text+0xe5): undefined reference to `strcmp'
.libs/libedataserver_1_2_la-e-account-list.o: In function `.L9':
e-account-list.c:(.text+0x100): undefined reference to `strcmp'
.libs/libedataserver_1_2_la-e-account-list.o: In function `.L10':
e-account-list.c:(.text+0x128): undefined reference to `strcmp'
.libs/libedataserver_1_2_la-e-account-list.o: In function `e_account_list_get_default':
e-account-list.c:(.text+0x234): undefined reference to `strcmp'
.libs/libedataserver_1_2_la-e-account-list.o:e-account-list.c:(.text+0x648): more undefined references to `strcmp' follow
for mail/evolution-data-server - in both cases with rather
more undefined symbols than I have included here.
All the missing symbols come from libc - if the library
in question were linked with -lc there would be no problem,
but (apparently because of the gcc spec bug) that doesn't
happen on NetBSD 4. Since no real program ever runs without
-lc linked in at run time, leaving those symbols undefined
in the shared libraries that are being built, and satisfying
them when ld.so puts it all together at program startup time
seems relatively harmless, so that is the solution adopted.
>Fix:
The patch below changes the Makefiles for both mail/evolution
and mail/evolution-data-server so that on NetBSD-4 based
systems the --no-undefined swictch is not passed through
gcc to the linker. This is really a work-around for the
problem, but seems to be the standard NetBSD 4 solution.
This fix originated with joerg@ or he@ not me ... I'm just
applying it to these packages. With these patches in
place, both packages now successfully build for NetBSD 4.0
Apply the patch below in pkgsrc/mail and both Makefiles should be
corrected (evolution/Makefile and evolution-data-server/Makefile).
No revbump needed, as without this patch, these packages don't
build on NetBSD 4 (and if a netbsd-4 based system has been
corrected so they do build, the patch will not change anything
that makes a difference.)
Index: evolution/Makefile
===================================================================
RCS file: /cvsroot/NetBSD/pkgsrc/mail/evolution/Makefile,v
retrieving revision 1.174
diff -u -r1.174 Makefile
--- evolution/Makefile 10 Jun 2011 09:39:45 -0000 1.174
+++ evolution/Makefile 7 Sep 2011 08:41:12 -0000
@@ -52,6 +52,12 @@
BUILDLINK_TRANSFORM+= rm:-DG_DISABLE_DEPRECATED
BUILDLINK_TRANSFORM+= rm:-DGTK_DISABLE_DEPRECATED
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD" && !empty(OS_VERSION:M4.*)
+BUILDLINK_TRANSFORM+= rm:-Wl,--no-undefined
+.endif
+
.if !exists(/usr/include/semaphore.h)
LDFLAGS+= -lsemaphore
.include "../../devel/pthread-sem/buildlink3.mk"
Index: evolution-data-server/Makefile
===================================================================
RCS file: /cvsroot/NetBSD/pkgsrc/mail/evolution-data-server/Makefile,v
retrieving revision 1.111
diff -u -r1.111 Makefile
--- evolution-data-server/Makefile 10 Jun 2011 09:39:43 -0000 1.111
+++ evolution-data-server/Makefile 5 Sep 2011 13:08:32 -0000
@@ -33,6 +33,9 @@
.include "../../devel/pthread-sem/buildlink3.mk"
LIBS+= -lsemaphore
.endif
+.if ${OPSYS} == "NetBSD" && !empty(OS_VERSION:M4.*)
+BUILDLINK_TRANSFORM+= rm:-Wl,--no-undefined
+.endif
.if ${OPSYS} == "Darwin"
CPPFLAGS+= -DBIND_8_COMPAT
>Release-Note:
>Audit-Trail:
From: Sergey Svishchev <svs@ropnet.ru>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/45337
Date: Wed, 7 Sep 2011 22:30:32 +0400
This may also fix the PR:
Index: devel/libtool/patches/patch-ac
===================================================================
RCS file: /vol/2/cvsup/pkgsrc/devel/libtool/patches/patch-ac,v
retrieving revision 1.26
diff -u -r1.26 patch-ac
--- devel/libtool/patches/patch-ac 14 May 2011 16:49:45 -0000 1.26
+++ devel/libtool/patches/patch-ac 15 Jul 2011 21:16:29 -0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.26 2011/05/14 16:49:45 bsiegert Exp $
+$NetBSD$
--- libltdl/config/ltmain.sh.orig 2009-11-16 13:23:18.000000000 +0000
+++ libltdl/config/ltmain.sh
@@ -51,7 +51,7 @@
verstring=""
fi
-@@ -6476,7 +6480,7 @@ func_mode_link ()
+@@ -6476,16 +6480,13 @@ func_mode_link ()
if test "$build_libtool_libs" = yes; then
if test -n "$rpath"; then
case $host in
@@ -60,3 +60,12 @@
# these systems don't actually have a c library (as such)!
;;
*-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs System.ltframework"
+ ;;
+- *-*-netbsd*)
+- # Don't link with libc until the a.out ld.so is fixed.
+- ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
--
Sergey Svishchev
From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/45337
Date: Thu, 08 Sep 2011 17:12:54 +0700
Date: Wed, 7 Sep 2011 18:45:02 +0000 (UTC)
From: Sergey Svishchev <svs@ropnet.ru>
Message-ID: <20110907184502.9DBB463C093@www.NetBSD.org>
| This may also fix the PR:
I'll try that, but I'm not sure that the fix/workaround proposed
isn't better anyway - with the one big exception of it being needed
in many packages, rather than just once in libtool - which exception
would be significant if it weren't for the fact that almost all the
packages that need the fix seem to have been found now, and fixed
(though without fixes for all yet committed).
kre
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45337 CVS commit: pkgsrc/mail/evolution
Date: Thu, 22 Sep 2011 11:54:23 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Thu Sep 22 11:54:22 UTC 2011
Modified Files:
pkgsrc/mail/evolution: Makefile
Log Message:
Fix build on NetBSD-4. From Robert Elz in PR 45337.
To generate a diff of this commit:
cvs rdiff -u -r1.174 -r1.175 pkgsrc/mail/evolution/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: pkg-manager->shattered
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Thu, 22 Sep 2011 11:56:40 +0000
Responsible-Changed-Why:
Shattered suggested a better fix.
State-Changed-From-To: open->feedback
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Thu, 22 Sep 2011 11:56:40 +0000
State-Changed-Why:
Waiting for feedback on the better fix.
(The workaround has been committed in the meantime.)
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 30 Apr 2012 22:55:31 +0000
State-Changed-Why:
Looks to me like the better fix should be committed.
Responsible-Changed-From-To: shattered->joerg
Responsible-Changed-By: shattered@NetBSD.org
Responsible-Changed-When: Mon, 29 Oct 2012 19:01:51 +0000
Responsible-Changed-Why:
Let maintainer handle this. (This package is too tricky.)
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Wed, 13 Nov 2019 18:57:06 +0000
State-Changed-Why:
netbsd-4 is pretty end of life, and it's a problem in netbsd-4, not the package. I don't see any value in continuing to keep the bug report oepn nowadays.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.