NetBSD Problem Report #38197

From gilles@mailhost.gravier.org  Sat Mar  8 18:19:55 2008
Return-Path: <gilles@mailhost.gravier.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id DAB4463B8E3
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  8 Mar 2008 18:19:54 +0000 (UTC)
Message-Id: <200803081819.m28IJR5e019177@mailhost.gravier.org>
Date: Sat, 8 Mar 2008 19:19:27 +0100 (CET)
From: Gilles@Gravier.org
Reply-To: Gilles@Gravier.org
To: gnats-bugs@gnats.NetBSD.org
Subject: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
X-Send-Pr-Version: 3.95

>Number:         38197
>Category:       pkg
>Synopsis:       libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    tron
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 08 18:20:00 +0000 2008
>Closed-Date:    Wed Mar 26 20:12:53 +0000 2008
>Last-Modified:  Wed Mar 26 20:12:53 +0000 2008
>Originator:     Gravier.org Root
>Release:        NetBSD 3.1
>Organization:
Famille Gravier
>Environment:
System: NetBSD mailhost 3.1 NetBSD 3.1 (MAILHOST) #0: Fri May 25 13:28:50 CEST 2007 root@mailhost:/usr/src/sys/arch/i386/compile/MAILHOST i386
Architecture: i386
Machine: i386
>Description:
	After latest sup -s, libgcrypt 1.4.0 (replacing 1.2.4) doesn't build anymore.
  This results in many things like gnome-terminal not building anymore.
>How-To-Repeat:
	cd /usr/pkgsrc/security/libgcrypt
	make clean
	make

Results in :

cc -DHAVE_CONFIG_H -I. -I.. -I../src -I/usr/pkgsrc/security/libgcrypt/work/.buildlink/include -O2 -Wall -Wpointer-arith -MT rijndael.lo -MD -MP -MF .deps/rijndael.Tpo -c rijndael.c -o rijndael.o >/dev/null 2>&1
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/security/libgcrypt/work/libgcrypt-1.4.0/cipher


>Fix:
	N/A

>Release-Note:

>Audit-Trail:

From: OBATA Akio <obache@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/38197: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
Date: Sun, 09 Mar 2008 12:46:24 +0900

 >> Confidential:   yes

 Why?

 > cc -DHAVE_CONFIG_H -I. -I.. -I../src
 > -I/usr/pkgsrc/security/libgcrypt/work/.buildlink/include -O2 -Wall
 > -Wpointer-arith -MT rijndael.lo -MD -MP -MF .deps/rijndael.Tpo -c
 > rijndael.c -o rijndael.o >/dev/null 2>&1 *** Error code 1
 >
 > Stop.
 > make: stopped in
 > /usr/pkgsrc/security/libgcrypt/work/libgcrypt-1.4.0/cipher

 Here are error messages catch from /dev/null:
 rijndael.c: In function `do_padlock':
 rijndael.c:2062: error: can't find a register in class `GENERAL_REGS' while 
 reloading `asm'

 Hit GCC Bug 11203?
 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203>

 -- 
 "Of course I love NetBSD":-)
 OBATA Akio / obache@NetBSD.org

From: Gilles Gravier <gilles@gravier.org>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, 
 pkgsrc-bugs@netbsd.org
Subject: Re: pkg/38197: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
Date: Sun, 09 Mar 2008 09:10:24 +0100

 Sorry... The "CONFIDENTIAL" is a TYPO. It is NOT confidential.

 Gilles.

 OBATA Akio wrote:
 > The following reply was made to PR pkg/38197; it has been noted by GNATS.
 >
 > From: OBATA Akio <obache@NetBSD.org>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: pkg/38197: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
 > Date: Sun, 09 Mar 2008 12:46:24 +0900
 >
 >  >> Confidential:   yes
 >  
 >  Why?
 >  
 >  > cc -DHAVE_CONFIG_H -I. -I.. -I../src
 >  > -I/usr/pkgsrc/security/libgcrypt/work/.buildlink/include -O2 -Wall
 >  > -Wpointer-arith -MT rijndael.lo -MD -MP -MF .deps/rijndael.Tpo -c
 >  > rijndael.c -o rijndael.o >/dev/null 2>&1 *** Error code 1
 >  >
 >  > Stop.
 >  > make: stopped in
 >  > /usr/pkgsrc/security/libgcrypt/work/libgcrypt-1.4.0/cipher
 >  
 >  Here are error messages catch from /dev/null:
 >  rijndael.c: In function `do_padlock':
 >  rijndael.c:2062: error: can't find a register in class `GENERAL_REGS' while 
 >  reloading `asm'
 >  
 >  Hit GCC Bug 11203?
 >  <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203>
 >  
 >  -- 
 >  "Of course I love NetBSD":-)
 >  OBATA Akio / obache@NetBSD.org
 >  
 >   

From: Gilles Gravier <gilles@gravier.org>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, 
 pkgsrc-bugs@netbsd.org
Subject: Re: pkg/38197: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
Date: Sun, 09 Mar 2008 09:20:30 +0100

 Makefile speficies -O2 ... not -O0 and... I've replaced the -O2 with -O3 
 but no change.

 Gilles.

 OBATA Akio wrote:
 > The following reply was made to PR pkg/38197; it has been noted by GNATS.
 >
 > From: OBATA Akio <obache@NetBSD.org>
 > To: gnats-bugs@netbsd.org
 > Cc: 
 > Subject: Re: pkg/38197: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
 > Date: Sun, 09 Mar 2008 12:46:24 +0900
 >
 >  >> Confidential:   yes
 >  
 >  Why?
 >  
 >  > cc -DHAVE_CONFIG_H -I. -I.. -I../src
 >  > -I/usr/pkgsrc/security/libgcrypt/work/.buildlink/include -O2 -Wall
 >  > -Wpointer-arith -MT rijndael.lo -MD -MP -MF .deps/rijndael.Tpo -c
 >  > rijndael.c -o rijndael.o >/dev/null 2>&1 *** Error code 1
 >  >
 >  > Stop.
 >  > make: stopped in
 >  > /usr/pkgsrc/security/libgcrypt/work/libgcrypt-1.4.0/cipher
 >  
 >  Here are error messages catch from /dev/null:
 >  rijndael.c: In function `do_padlock':
 >  rijndael.c:2062: error: can't find a register in class `GENERAL_REGS' while 
 >  reloading `asm'
 >  
 >  Hit GCC Bug 11203?
 >  <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203>
 >  
 >  -- 
 >  "Of course I love NetBSD":-)
 >  OBATA Akio / obache@NetBSD.org
 >  
 >   

From: OBATA Akio <obache@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: Gilles Gravier <gilles@gravier.org>
Subject: Re: pkg/38197: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
Date: Mon, 10 Mar 2008 23:00:57 +0900

 --On 2008/03/09 9:20 +0100 Gilles Gravier <gilles@gravier.org> wrote:

 > Makefile speficies -O2 ... not -O0 and... I've replaced the -O2 with -O3
 > but no change.

 In this case, build fine with -O0.
 -- 
 "Of course I love NetBSD":-)
 OBATA Akio / obache@NetBSD.org

From: Gilles Gravier <gilles@gravier.org>
To: OBATA Akio <obache@NetBSD.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/38197: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
Date: Tue, 11 Mar 2008 16:41:52 +0100

 Indeed. It works. So looks like it's the OPPOSITE of GCC Bugzilla Bug 
 11203...

 Gilles.


 OBATA Akio wrote:
 >
 >
 > --On 2008/03/09 9:20 +0100 Gilles Gravier <gilles@gravier.org> wrote:
 >
 >> Makefile speficies -O2 ... not -O0 and... I've replaced the -O2 with -O3
 >> but no change.
 >
 > In this case, build fine with -O0.

State-Changed-From-To: open->feedback
State-Changed-By: seb@NetBSD.org
State-Changed-When: Mon, 17 Mar 2008 09:12:04 +0000
State-Changed-Why:
Could you please your pkgsrc tree, in order to get
pkgsrc/security/libgcrypt/hacks.mk version 1.3,
and try again to build this package ?

Cheers, Stoned.


From: Robert Wappler <slrn_robert@yahoo.de>
To: NetBSD Bug Database <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/38197: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
Date: Wed, 19 Mar 2008 00:57:55 +0100

 Thanks, your hacks.mk fixed it for me.

 -- 

 	Robert...

From: Gilles Gravier <gilles@gravier.org>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, 
 gnats-admin@netbsd.org, seb@NetBSD.org
Subject: Re: pkg/38197 (libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386)
Date: Wed, 19 Mar 2008 07:01:53 +0100

 Works for me now. Thanks.

 Gilles.

 seb@NetBSD.org wrote:
 > Synopsis: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: seb@NetBSD.org
 > State-Changed-When: Mon, 17 Mar 2008 09:12:04 +0000
 > State-Changed-Why:
 > Could you please your pkgsrc tree, in order to get
 > pkgsrc/security/libgcrypt/hacks.mk version 1.3,
 > and try again to build this package ?
 >
 > Cheers, Stoned.
 >
 >
 >
 >   

 -- 
 /*Gilles Gravier*/ *=* *Gilles@Gravier.org* <mailto:Gilles@Gravier.org> 
 *=* *http://www.gravier.org/*
 ICQ : *77488526* 
 <http://www.icq.com/whitepages/about_me.php?Uin=77488526> * || *MSN 
 Messenger : Gilles@Gravier.org <http://members.msn.com/Gilles@Gravier.org>*
 *Skype : ggravier <callto://ggravier>* || *Y! : ggravier 
 <http://profiles.yahoo.com/ggravier> || AOL : gillesgravier 
 <aim:goim?screenname=gillesgravier>
 PGP Key ID : *0x8DE6D026* 
 <http://pgp.mit.edu:11371/pks/lookup?search=0x8DE6D026&op=index>
 "Chastity is its own punishment." (/Solomon Short/) [/David Gerrold/]
 "De toutes les aberrations sexuelles, la chasteté est la plus 
 aberrante." [Anatole France]

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 19 Mar 2008 06:46:22 +0000
State-Changed-Why:
Submitter confirmed problem is fixed. Thanks for the feedback!


From: "Volkmar Seifert" <vs@nifelheim.info>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/38197 (libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386)
Date: Tue, 25 Mar 2008 10:26:47 +0100 (CET)

 Hello,

 I fear I have to disagree. It does not work on my netbsd-box, I tried -O0
 through -O3, and I have an up-to-date pkgsrc-current, the hacks.mk with
 its statement that gcc 3.3.3 does not compile is present.

 Any ideas what it still might be that is breaking the compilation of the
 rijndael.c file?

 - Volkmar

 On Wed, March 19, 2008 07:46, wiz@NetBSD.org wrote:
 > Synopsis: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
 >
 > State-Changed-From-To: feedback->closed
 > State-Changed-By: wiz@NetBSD.org
 > State-Changed-When: Wed, 19 Mar 2008 06:46:22 +0000
 > State-Changed-Why:
 > Submitter confirmed problem is fixed. Thanks for the feedback!

From: Matthias Scheler <tron@zhadum.org.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/38197 (libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386)
Date: Tue, 25 Mar 2008 12:44:56 +0000

 On Tue, Mar 25, 2008 at 10:30:03AM +0000, Volkmar Seifert wrote:
 > The following reply was made to PR pkg/38197; it has been noted by GNATS.
 > 
 > From: "Volkmar Seifert" <vs@nifelheim.info>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/38197 (libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386)
 > Date: Tue, 25 Mar 2008 10:26:47 +0100 (CET)
 > 
 >  Hello,
 >  
 >  I fear I have to disagree. It does not work on my netbsd-box, I tried -O0
 >  through -O3, and I have an up-to-date pkgsrc-current, the hacks.mk with
 >  its statement that gcc 3.3.3 does not compile is present.
 >  
 >  Any ideas what it still might be that is breaking the compilation of the
 >  rijndael.c file?

 Does the package build if you add "CONFIGURE_ARGS+= --disable-asm" to
 "pkgsrc/security/libgcrypt/Makefile"?

 	Kind regards

 -- 
 Matthias Scheler                                  http://zhadum.org.uk/

From: "Volkmar Seifert" <vs@nifelheim.info>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org,
        gilles@gravier.org
Subject: Re: pkg/38197 (libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386)
Date: Tue, 25 Mar 2008 21:40:48 +0100 (CET)

 ------=_20080325214047_97489
 Content-Type: text/plain; charset="iso-8859-1"
 Content-Transfer-Encoding: 8bit

 >
 >  Does the package build if you add "CONFIGURE_ARGS+= --disable-asm" to
 >  "pkgsrc/security/libgcrypt/Makefile"?

 I just tested that, and it did not compile.

 Anyhow, I have found a way to compile and install it, and that is by
 excluding padlock completely by adding

 CONFIGURE_ARGS+= --disable-padlock-support

 to the Makefile.

 Since padlock-support is completely unnecessary in most cases, and only
 useful on a few comparably rare CPUs such as VIA Nehemia etc, I have
 patched the options.mk and added a new option "nopadlock", which is a
 default-option, too, to have that option added through the
 options-framework.
 The patch is attached to this mail, since I think it rather useful. One
 should not need to compile code which is useless on one's machine, and I
 feel this padlock-support should be the user's decision.

 - Volkmar
 ------=_20080325214047_97489
 Content-Type: text/x-patch; name="libgcrypt.options.mk.patch"
 Content-Transfer-Encoding: 8bit
 Content-Disposition: attachment; filename="libgcrypt.options.mk.patch"

 --- options.mk.orig	2008-03-25 11:24:51.000000000 +0100
 +++ options.mk	2008-03-25 10:42:44.000000000 +0100
 @@ -1,10 +1,16 @@
  # $NetBSD$

  PKG_OPTIONS_VAR=	PKG_OPTIONS.libgcrypt
 -PKG_SUPPORTED_OPTIONS=	idea
 +PKG_SUPPORTED_OPTIONS=	idea nopadlock
 +PKG_SUGGESTED_OPTIONS=	nopadlock

  .include "../../mk/bsd.options.mk"

 +.if !empty(PKG_OPTIONS:Mnopadlock)
 +# disable padlock
 +CONFIGURE_ARGS+=        --disable-padlock-support
 +.endif
 +
  .if !empty(PKG_OPTIONS:Midea)
  # use of IDEA as crypto function
  LICENSE=	idea-license
 ------=_20080325214047_97489--

Responsible-Changed-From-To: pkg-manager->tron
Responsible-Changed-By: tron@NetBSD.org
Responsible-Changed-When: Tue, 25 Mar 2008 21:46:28 +0000
Responsible-Changed-Why:
I'll handle this PR.


State-Changed-From-To: closed->open
State-Changed-By: tron@NetBSD.org
State-Changed-When: Tue, 25 Mar 2008 21:46:28 +0000
State-Changed-Why:
The problem was apparently not fixed yet.


From: Matthias Scheler <tron@NetBSD.org>
To: NetBSD GNATS <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/38197 (libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386)
Date: Tue, 25 Mar 2008 21:50:10 +0000

 On Tue, Mar 25, 2008 at 09:46:29PM +0000, tron@NetBSD.org wrote:
 > Synopsis: libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386
 > 
 > Responsible-Changed-From-To: pkg-manager->tron
 > Responsible-Changed-By: tron@NetBSD.org
 > Responsible-Changed-When: Tue, 25 Mar 2008 21:46:28 +0000
 > Responsible-Changed-Why:
 > I'll handle this PR.
 > 
 > 
 > State-Changed-From-To: closed->open
 > State-Changed-By: tron@NetBSD.org
 > State-Changed-When: Tue, 25 Mar 2008 21:46:28 +0000
 > State-Changed-Why:
 > The problem was apparently not fixed yet.

 The following patch should fix the problem.

 	Kind regards

 -- 
 Matthias Scheler                                  http://zhadum.org.uk/

 Index: hacks.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/security/libgcrypt/hacks.mk,v
 retrieving revision 1.3
 diff -u -r1.3 hacks.mk
 --- hacks.mk	16 Mar 2008 20:14:38 -0000	1.3
 +++ hacks.mk	25 Mar 2008 21:47:55 -0000
 @@ -10,10 +10,3 @@
  		${MV} ${WRKSRC}/src/gcrypt.h ${WRKSRC}/src/gcrypt.h.old; \
  		${SED} -e "s,^/\* socklen_t \*/,$$socklen," \
  			${WRKSRC}/src/gcrypt.h.old > ${WRKSRC}/src/gcrypt.h
 -
 -# GCC 3.x (at least 3.3.3 on NetBSD) fails to compile asm() call in
 -# cipher/rijndael.c:do_padlock()
 -.include "../../mk/compiler.mk"
 -.if !empty(CC_VERSION:Mgcc-3.*)
 -CFLAGS+=	 -fomit-frame-pointer
 -.endif
 Index: options.mk
 ===================================================================
 RCS file: /cvsroot/pkgsrc/security/libgcrypt/options.mk,v
 retrieving revision 1.1
 diff -u -r1.1 options.mk
 --- options.mk	29 Aug 2007 23:11:38 -0000	1.1
 +++ options.mk	25 Mar 2008 21:47:55 -0000
 @@ -3,6 +3,18 @@
  PKG_OPTIONS_VAR=	PKG_OPTIONS.libgcrypt
  PKG_SUPPORTED_OPTIONS=	idea

 +.include "../../mk/bsd.prefs.mk"
 +
 +.if ${MACHINE_ARCH} == "i386"
 +.  include "../../mk/compiler.mk"
 +# GCC 3.x (at least 3.3.3 on NetBSD) fails to compile asm() call in
 +# cipher/rijndael.c:do_padlock()
 +.  if empty(CC_VERSION:Mgcc-3.*)
 +PKG_SUPPORTED_OPTIONS+=	padlock
 +PKG_SUGGESTED_OPTIONS+=	padlock
 +.  endif
 +.endif
 +
  .include "../../mk/bsd.options.mk"

  .if !empty(PKG_OPTIONS:Midea)
 @@ -26,3 +38,9 @@
  pre-configure:
  	cd ${WRKSRC} && autoreconf -i -v
  .endif
 +
 +.if empty(PKG_OPTIONS:Mpadlock)
 +# disable padlock
 +CONFIGURE_ARGS+=        --disable-padlock-support
 +.endif
 +

From: "Volkmar Seifert" <vs@nifelheim.info>
To: gnats-bugs@NetBSD.org
Cc: tron@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org,
        gilles@gravier.org
Subject: Re: pkg/38197 (libgcrypt 1.4.0 doesn't build on NetBSD 3.1 x386)
Date: Wed, 26 Mar 2008 10:12:56 +0100 (CET)

 >
 >  The following patch should fix the problem.

 It did, yes, and in more elegant way than my own patch. Thanks.

From: Matthias Scheler <tron@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38197 CVS commit: pkgsrc/security/libgcrypt
Date: Wed, 26 Mar 2008 20:09:43 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	tron
 Date:		Wed Mar 26 20:09:43 UTC 2008

 Modified Files:
 	pkgsrc/security/libgcrypt: hacks.mk options.mk

 Log Message:
 Add a new option "via-padlock" which enables support for the
 VIA PadLock Security Engine:
 - The new option is turned on by default.
 - The new option is only available on i386 systems except Mac OS X (which
   doesn't work on VIA CPU).
 - The new option isn't available on system which uses GCC 3.x because it
   causes build failures. This fixes PR pkg/38197.

 Approved by Dieter Baron.


 To generate a diff of this commit:
 cvs rdiff -r1.3 -r1.4 pkgsrc/security/libgcrypt/hacks.mk
 cvs rdiff -r1.1 -r1.2 pkgsrc/security/libgcrypt/options.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: tron@NetBSD.org
State-Changed-When: Wed, 26 Mar 2008 20:12:53 +0000
State-Changed-Why:
I've committed a fix based on the change suggested by Volkmar Seifert in
http://blog.nifelheim.info/tech/2008/03/25/pkgsrclibgcrypt-problems/ .


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.