pkgsrc-Bugs archive

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

pkg/46779: heimdal 1.5.2nb2 compilation failure on PC's due to a gcc error

>Number:         46779
>Category:       pkg
>Synopsis:       pkgsrc/security/heimdal 1.5.2nb2 compilation failure on PC's
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 07 12:10:00 +0000 2012
>Originator:     Ken'ichi Fukamachi
>Release:        NetBSD 5.1.2

                System: NetBSD 5.1.2 NetBSD 5.1.2 (HOME_SERVER) #0: Sat 
Feb 18 21:03:22 JST 2012 i386
                Architecture: i386
                Machine: i386


We cannot comile pkgsrc/security/heimdal 1.5.2nb2 on PC's since the proper 
CFLAGS is not given to GCC.

We can see the following errors on several PCs:

undefined reference to `__sync_add_and_fetch_4'
   *** Error code 1

For example, NetBSD 5.1.2/i386 (and 5.1.2_PATCH taken and built from
anoncvs) reveals this problem but NetBSD 6.0_BETA/i386 and NetBSD
6.0_BETA/i386 on KVM (with a kvm hack) NOT.

The patch attached below resolves it on the following limited environments:
(1) using GCC on Intel CPU,
(2) pkgsrc/devel/cpuflags works well,
(3) maybe NetBSD 5.x.y/i386.

The more smart solution is that pkgsrc/mk framework should be changed
to use by default.

Also, the following quick hacks found in pkgsrc may be or should be
changed to framework:

  .if ${MACHINE_ARCH} == "i386"
    CFLAGS+=        -march=i486
    CXXFLAGS+=      -march=i486


        build pkgsrc/security/heimdal on NetBSD 5.x.y/i386


diff --exclude=CVS -ubr security/heimdal/Makefile nsrg/heimdal/Makefile
--- security/heimdal/Makefile   2012-08-07 15:53:13.000000000 +0900
+++ nsrg/heimdal/Makefile       2012-08-07 15:18:55.000000000 +0900
@@ -24,6 +24,12 @@
+# check cpu types
+.if ${MACHINE_ARCH} == "i386"
+BUILD_DEPENDS+=                cpuflags-[0-9]*:../../devel/cpuflags
 .include "../../mk/"
 .include ""
@@ -91,6 +97,11 @@
        ${TOUCH} ${WRKSRC}/po/localefiles
+# check cpu types
+.if exists(${LOCALBASE}/share/mk/
+.   include "${LOCALBASE}/share/mk/"
 .include "../../databases/sqlite3/"
 .include "../../devel/readline/"
 .include "../../security/openssl/"

                since the proper CFLAGS is not given to GCC.

Home | Main Index | Thread Index | Old Index