pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45337: mail/evolution{,-data-server} library link errors (NetBSD 4.0)



>Number:         45337
>Category:       pkg
>Synopsis:       mail/evolution{,-data-server} library link errors (NetBSD 4.0)
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 07 13:05:00 +0000 2011
>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@localhost:/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



Home | Main Index | Thread Index | Old Index