NetBSD Problem Report #48134
From www@NetBSD.org Sun Aug 18 07:26:45 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 3041D71404
for <gnats-bugs@gnats.NetBSD.org>; Sun, 18 Aug 2013 07:26:45 +0000 (UTC)
Message-Id: <20130818072643.AFCA8716A2@mollari.NetBSD.org>
Date: Sun, 18 Aug 2013 07:26:43 +0000 (UTC)
From: o.vd.linden@quicknet.nl
Reply-To: o.vd.linden@quicknet.nl
To: gnats-bugs@NetBSD.org
Subject: crypto++ doesn't compile on 32-bit i386
X-Send-Pr-Version: www-1.0
>Number: 48134
>Category: pkg
>Synopsis: crypto++ doesn't compile on 32-bit i386
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: ryoon
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Aug 18 07:30:00 +0000 2013
>Closed-Date: Fri Sep 06 16:17:46 +0000 2013
>Last-Modified: Fri Sep 06 16:17:46 +0000 2013
>Originator: Onno van der Linden
>Release: NetBSD 6.99.23
>Organization:
>Environment:
NetBSD sheep 6.99.23 NetBSD 6.99.23 (SHEEP) #0: Fri Aug 16 22:52:44 MEST 2013 onno@sheep:/usr/src/sys/arch/i386/compile/SHEEP i386
>Description:
===> Building for cryptopp-5.6.2
c++ -DCRYPTOPP_DISABLE_ASM -DNDEBUG -g -O2 -march=native -pipe -c wake.cpp
wake.cpp:1:0: error: bad value (native) for -march= switch
gmake: *** [wake.o] Error 1
*** Error code 2
>How-To-Repeat:
At least on an i386 box:
cd /usr/pkgsrc/security/crypto++
make
>Fix:
http://crypto-users.996303.n3.nabble.com/problem-compile-crypto-5-5-2-in-macosx-td868.html
says:
If I recall, GCC prior to 4.6 had a few [small?] issues with -
march=native.
So adding some extra logic around line 38 of GNUmakefile of crypto++
to check for gcc < 4.6 and/or 32-bit x86 should fix it.
(devel/cpuflags also generates -march native ...... won't work.)
or upgrade NetBSD's native compiler to gcc 4.6 or higher.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->ryoon
Responsible-Changed-By: ryoon@NetBSD.org
Responsible-Changed-When: Thu, 22 Aug 2013 12:51:38 +0000
Responsible-Changed-Why:
I will take it.
From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48134 CVS commit: pkgsrc/security/crypto++
Date: Thu, 22 Aug 2013 12:53:14 +0000
Module Name: pkgsrc
Committed By: ryoon
Date: Thu Aug 22 12:53:14 UTC 2013
Modified Files:
pkgsrc/security/crypto++: distinfo
pkgsrc/security/crypto++/patches: patch-aa
Log Message:
Fix build on NetBSD/i386 6.1's gcc 4.5.3.
For PR pkg/48134.
* Convert check of gcc 4.2 or later to 4.6 or later.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/security/crypto++/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/security/crypto++/patches/patch-aa
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: ryoon@NetBSD.org
State-Changed-When: Thu, 22 Aug 2013 12:56:28 +0000
State-Changed-Why:
Please try again.
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/48134 CVS commit: pkgsrc/security/crypto++
Date: Thu, 22 Aug 2013 15:00:03 +0200
On Thu, Aug 22, 2013 at 12:55:01PM +0000, Ryo ONODERA wrote:
> The following reply was made to PR pkg/48134; it has been noted by GNATS.
>
> From: "Ryo ONODERA" <ryoon@netbsd.org>
> To: gnats-bugs@gnats.NetBSD.org
> Cc:
> Subject: PR/48134 CVS commit: pkgsrc/security/crypto++
> Date: Thu, 22 Aug 2013 12:53:14 +0000
>
> Module Name: pkgsrc
> Committed By: ryoon
> Date: Thu Aug 22 12:53:14 UTC 2013
>
> Modified Files:
> pkgsrc/security/crypto++: distinfo
> pkgsrc/security/crypto++/patches: patch-aa
>
> Log Message:
> Fix build on NetBSD/i386 6.1's gcc 4.5.3.
> For PR pkg/48134.
>
> * Convert check of gcc 4.2 or later to 4.6 or later.
This is suboptimal. By default, it should *not* use -march=native as
that doesn't produce portable binaries.
Joerg
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, joerg@britannica.bec.de
Cc:
Subject: Re: PR/48134 CVS commit: pkgsrc/security/crypto++
Date: Thu, 22 Aug 2013 22:10:21 +0900 (JST)
From: Joerg Sonnenberger <joerg@britannica.bec.de>, Date: Thu, 22 Aug 2013 13:05:00 +0000 (UTC)
> The following reply was made to PR pkg/48134; it has been noted by GNATS.
>
> From: Joerg Sonnenberger <joerg@britannica.bec.de>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: PR/48134 CVS commit: pkgsrc/security/crypto++
> Date: Thu, 22 Aug 2013 15:00:03 +0200
>
> On Thu, Aug 22, 2013 at 12:55:01PM +0000, Ryo ONODERA wrote:
> > The following reply was made to PR pkg/48134; it has been noted by GNATS.
> >
> > From: "Ryo ONODERA" <ryoon@netbsd.org>
> > To: gnats-bugs@gnats.NetBSD.org
> > Cc:
> > Subject: PR/48134 CVS commit: pkgsrc/security/crypto++
> > Date: Thu, 22 Aug 2013 12:53:14 +0000
> >
> > Module Name: pkgsrc
> > Committed By: ryoon
> > Date: Thu Aug 22 12:53:14 UTC 2013
> >
> > Modified Files:
> > pkgsrc/security/crypto++: distinfo
> > pkgsrc/security/crypto++/patches: patch-aa
> >
> > Log Message:
> > Fix build on NetBSD/i386 6.1's gcc 4.5.3.
> > For PR pkg/48134.
> >
> > * Convert check of gcc 4.2 or later to 4.6 or later.
>
> This is suboptimal. By default, it should *not* use -march=native as
> that doesn't produce portable binaries.
I see. I will remove -march-native from GNUmakefile.
Thank you.
--
Ryo ONODERA // ryo_on@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48134 CVS commit: pkgsrc/security/crypto++
Date: Thu, 22 Aug 2013 13:15:05 +0000
Module Name: pkgsrc
Committed By: ryoon
Date: Thu Aug 22 13:15:05 UTC 2013
Modified Files:
pkgsrc/security/crypto++: Makefile distinfo
pkgsrc/security/crypto++/patches: patch-aa
Log Message:
Bump PKGREVISION.
Remove -march=native for portable binary.
For PR pkg/48134.
Thank you, joerg@.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/security/crypto++/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/security/crypto++/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/security/crypto++/patches/patch-aa
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Onno van der Linden <o.vd.linden@quicknet.nl>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/48134 CVS commit: pkgsrc/security/crypto++
Date: Thu, 22 Aug 2013 20:11:03 +0200
On Thu, Aug 22, 2013 at 01:20:01PM +0000, Ryo ONODERA wrote:
> The following reply was made to PR pkg/48134; it has been noted by GNATS.
>
> From: "Ryo ONODERA" <ryoon@netbsd.org>
> To: gnats-bugs@gnats.NetBSD.org
> Cc:
> Subject: PR/48134 CVS commit: pkgsrc/security/crypto++
> Date: Thu, 22 Aug 2013 13:15:05 +0000
>
> Module Name: pkgsrc
> Committed By: ryoon
> Date: Thu Aug 22 13:15:05 UTC 2013
>
> Modified Files:
> pkgsrc/security/crypto++: Makefile distinfo
> pkgsrc/security/crypto++/patches: patch-aa
>
> Log Message:
> Bump PKGREVISION.
>
> Remove -march=native for portable binary.
> For PR pkg/48134.
> Thank you, joerg@.
With the fix above crypto++ compiles out of the box.
Trying to compile net/amule with this crypto++:
amule-ClientCreditsList.o: In function `CClientCreditsList::CreateKeyPair()':
ClientCreditsList.cpp:(.text+0x21c3): undefined reference to `CryptoPP::AlignedDeallocate(void*)'
amule-ClientCreditsList.o: In function `CryptoPP::Integer::~Integer()':
ClientCreditsList.cpp:(.text._ZN8CryptoPP7IntegerD2Ev[_ZN8CryptoPP7IntegerD5Ev]+0x2c): undefined reference to `CryptoPP::AlignedDeallocate(void*)'
With the appended fix in crypto++/patches/patch-ab I did
a make distinfo and a reinstall of crypto++ after which
net/amule also could be compiled, linked and installed
Onno
--- config.h.orig 2013-08-22 19:02:33.000000000 +0200
+++ config.h 2013-08-22 19:04:24.000000000 +0200
@@ -290,12 +290,6 @@
#define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 0
#endif
-#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
- #define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
-#else
- #define CRYPTOPP_BOOL_ALIGN16_ENABLED 0
-#endif
-
// how to allocate 16-byte aligned memory (for SSE2)
#if defined(CRYPTOPP_MSVC6PP_OR_LATER)
#define CRYPTOPP_MM_MALLOC_AVAILABLE
@@ -307,6 +301,13 @@
#define CRYPTOPP_NO_ALIGNED_ALLOC
#endif
+#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE) || !defined(CPRYPTO_NO_ALIGNED_ALLOC)
+ #define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
+#else
+ #define CRYPTOPP_BOOL_ALIGN16_ENABLED 0
+#endif
+
+
// how to disable inlining
#if defined(_MSC_VER) && _MSC_VER >= 1300
# define CRYPTOPP_NOINLINE_DOTDOTDOT
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, o.vd.linden@quicknet.nl
Cc:
Subject: Re: PR/48134 CVS commit: pkgsrc/security/crypto++
Date: Sat, 24 Aug 2013 15:55:09 +0900 (JST)
Hi,
From: Onno van der Linden <o.vd.linden@quicknet.nl>, Date: Thu, 22 Aug 2013 18:15:01 +0000 (UTC)
> With the fix above crypto++ compiles out of the box.
> Trying to compile net/amule with this crypto++:
>
> amule-ClientCreditsList.o: In function `CClientCreditsList::CreateKeyPair()':
> ClientCreditsList.cpp:(.text+0x21c3): undefined reference to `CryptoPP::AlignedDeallocate(void*)'
> amule-ClientCreditsList.o: In function `CryptoPP::Integer::~Integer()':
> ClientCreditsList.cpp:(.text._ZN8CryptoPP7IntegerD2Ev[_ZN8CryptoPP7IntegerD5Ev]+0x2c): undefined reference to `CryptoPP::AlignedDeallocate(void*)'
>
> With the appended fix in crypto++/patches/patch-ab I did
> a make distinfo and a reinstall of crypto++ after which
> net/amule also could be compiled, linked and installed
>
> Onno
>
> --- config.h.orig 2013-08-22 19:02:33.000000000 +0200
> +++ config.h 2013-08-22 19:04:24.000000000 +0200
> @@ -290,12 +290,6 @@
> #define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 0
> #endif
>
> -#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
> - #define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
> -#else
> - #define CRYPTOPP_BOOL_ALIGN16_ENABLED 0
> -#endif
> -
> // how to allocate 16-byte aligned memory (for SSE2)
> #if defined(CRYPTOPP_MSVC6PP_OR_LATER)
> #define CRYPTOPP_MM_MALLOC_AVAILABLE
> @@ -307,6 +301,13 @@
> #define CRYPTOPP_NO_ALIGNED_ALLOC
> #endif
>
> +#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE) || !defined(CPRYPTO_NO_ALIGNED_ALLOC)
> + #define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
> +#else
> + #define CRYPTOPP_BOOL_ALIGN16_ENABLED 0
> +#endif
> +
> +
> // how to disable inlining
> #if defined(_MSC_VER) && _MSC_VER >= 1300
> # define CRYPTOPP_NOINLINE_DOTDOTDOT
What is the meaning of moving definition to later location?
It seems that simply adding || !defined(CPRYPTO_NO_ALIGNED_ALLOC) is
sufficient for me, and works with amule.
--
Ryo ONODERA // ryo_on@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
From: Onno van der Linden <o.vd.linden@quicknet.nl>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: PR/48134 CVS commit: pkgsrc/security/crypto++
Date: Sat, 24 Aug 2013 09:10:11 +0200
> What is the meaning of moving definition to later location?
> It seems that simply adding || !defined(CPRYPTO_NO_ALIGNED_ALLOC) is
> sufficient for me, and works with amule.
At that point in config.h CRYPTO_NO_ALIGNED_ALLOC isn't
defined at all so you're effectively adding an always
true condition. By switching the two blocks like I did
you avoid that.
Onno
From: Ryo ONODERA <ryo_on@yk.rim.or.jp>
To: gnats-bugs@NetBSD.org, o.vd.linden@quicknet.nl
Cc:
Subject: Re: PR/48134 CVS commit: pkgsrc/security/crypto++
Date: Sat, 24 Aug 2013 16:31:09 +0900 (JST)
Hi,
From: Onno van der Linden <o.vd.linden@quicknet.nl>, Date: Sat, 24 Aug 2013 07:15:00 +0000 (UTC)
> By switching the two blocks like I did
> you avoid that.
My English skill is very bad sadly.
Could you explain the meaning of this sentence in plain English again?
Thank you.
--
Ryo ONODERA // ryo_on@yk.rim.or.jp
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
From: "Ryo ONODERA" <ryoon@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48134 CVS commit: pkgsrc/security/crypto++
Date: Sat, 24 Aug 2013 08:16:12 +0000
Module Name: pkgsrc
Committed By: ryoon
Date: Sat Aug 24 08:16:12 UTC 2013
Modified Files:
pkgsrc/security/crypto++: Makefile distinfo
Added Files:
pkgsrc/security/crypto++/patches: patch-config.h
Log Message:
Bump PKGREVISION.
Fix PR pkg/48134 with patch from Onno van der Linden.
Fix build of net/amule.
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 pkgsrc/security/crypto++/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/security/crypto++/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/security/crypto++/patches/patch-config.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Onno van der Linden <o.vd.linden@quicknet.nl>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/48134
Date: Fri, 6 Sep 2013 16:35:19 +0200
This works now and the PR can be closed.
Onno
State-Changed-From-To: feedback->closed
State-Changed-By: ryoon@NetBSD.org
State-Changed-When: Fri, 06 Sep 2013 16:17:46 +0000
State-Changed-Why:
confirmed fixed. thank you.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.