NetBSD Problem Report #45103

From www@NetBSD.org  Tue Jun 28 08:57:03 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 18F1163BC12
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 28 Jun 2011 08:57:03 +0000 (UTC)
Message-Id: <20110628085702.411C463B970@www.NetBSD.org>
Date: Tue, 28 Jun 2011 08:57:02 +0000 (UTC)
From: KOT@MATPOCKuH.Ru
Reply-To: KOT@MATPOCKuH.Ru
To: gnats-bugs@NetBSD.org
Subject: security/openssl fails to build on Solaris10 with gcc in 64bit mode
X-Send-Pr-Version: www-1.0

>Number:         45103
>Category:       pkg
>Synopsis:       security/openssl fails to build on Solaris10 with gcc in 64bit mode
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 28 09:00:00 +0000 2011
>Closed-Date:    Thu Feb 07 14:10:17 +0000 2013
>Last-Modified:  Thu Feb 07 14:10:17 +0000 2013
>Originator:     Dmitry Afanasiev
>Release:        
>Organization:
>Environment:
SunOS sunray 5.10 Generic_144489-01 i86pc i386 i86pc
>Description:
databases/db4 fails to build on Solaris 10 on configure state:

# bmake configure
===> Configuring for openssl-0.9.8qnb2
cd /root/pkgsrc/security/openssl/work/openssl-0.9.8q && /usr/pkg/bin/perl util/perlpath.pl /usr/pkg/bin/perl
Configuring for solaris64-x86-gcc
Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [enable-montasm] [no-asm] [no-dso] [no-krb5] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]

pick os/compiler from:
[skipped]

pkgsrc tries to use "solaris64-x86-gcc" as os/compiler, but there must be used "solaris64-x86_64-gcc".
>How-To-Repeat:
On Solaris10/amd64:
# ./bootstrap --abi=64
# cd ../security/openssl
# bmake
>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Wed, 20 Jul 2011 12:48:03 +0000
Responsible-Changed-Why:
Problem on Solaris.


From: Tim Zingelman <zingelman@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/45103 (security/openssl fails to build on Solaris10 with gcc
 in 64bit mode)
Date: Wed, 20 Jul 2011 07:54:30 -0500

 Are you using an up to date version of pkgsrc?  Is ABI=64 set in your
 /usr/pkg/etc/mk.conf?

 This problem was fixed in early April of this year, see PR#44769

From: Tim Zingelman <zingelman@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/45103 (security/openssl fails to build on Solaris10 with gcc
 in 64bit mode)
Date: Wed, 20 Jul 2011 07:59:13 -0500

 Sorry... you must perhaps also set MACHINE_ARCH=x86_64 in mk.conf
 because uname returns i386 even for 64-bit on Solaris/intel.

 Does this solve it?

 I agree we need a better way... so if ABI=64 && cpu is intel and OS is
 SunOS that MACHINE_ARCH is set correctly by the infrastructure.

State-Changed-From-To: open->feedback
State-Changed-By: tez@NetBSD.org
State-Changed-When: Wed, 20 Jul 2011 13:12:54 +0000
State-Changed-Why:
feedback requested


From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/45103 (security/openssl fails to build on Solaris10 with gcc
 in 64bit mode)
Date: Wed, 20 Jul 2011 23:23:51 +0900

 On Wed, 20 Jul 2011 22:00:10 +0900, Tim Zingelman <zingelman@gmail.com> wrote:

 > The following reply was made to PR pkg/45103; it has been noted by GNATS.
 >
 > From: Tim Zingelman <zingelman@gmail.com>
 > To: gnats-bugs@netbsd.org
 > Cc:
 > Subject: Re: pkg/45103 (security/openssl fails to build on Solaris10 with gcc
 >  in 64bit mode)
 > Date: Wed, 20 Jul 2011 07:59:13 -0500
 >
 >  Sorry... you must perhaps also set MACHINE_ARCH=x86_64 in mk.conf
 >  because uname returns i386 even for 64-bit on Solaris/intel.
 > Does this solve it?
 > I agree we need a better way... so if ABI=64 && cpu is intel and OS is
 >  SunOS that MACHINE_ARCH is set correctly by the infrastructure.

 Probably, you can use same trick as doing for Darwin in pkgsrc/mk/bsd.prefs.mk.

 -- 
 OBATA Akio / obache@NetBSD.org

From: Dmitry Afanasiev <KOT@MATPOCKuH.Ru>
To: gnats-bugs@NetBSD.org
Cc: Tim Zingelman <zingelman@gmail.com>, solaris-pkg-people@NetBSD.org, 
 gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/45103 (security/openssl fails to build on Solaris10 with
 gcc in 64bit mode)
Date: Wed, 20 Jul 2011 18:25:26 +0400

 On 20.07.2011 17:00, Tim Zingelman wrote:

 >   Sorry... you must perhaps also set MACHINE_ARCH=x86_64 in mk.conf
 >   because uname returns i386 even for 64-bit on Solaris/intel.
 >
 >   Does this solve it?
 Yes, thanks You!

 >   I agree we need a better way... so if ABI=64&&  cpu is intel and OS is
 >   SunOS that MACHINE_ARCH is set correctly by the infrastructure.
 Is possible to forcibly set MACHINE_ARCH=x86_64 in mk.conf while 
 bootstrap'ing?
 Maybe it would be a solution?

State-Changed-From-To: feedback->open
State-Changed-By: tez@NetBSD.org
State-Changed-When: Wed, 20 Jul 2011 21:30:58 +0000
State-Changed-Why:
feedback received


From: "Filip Hajny" <filip@joyent.com>
To: <gnats-bugs@NetBSD.org>
Cc: <solaris-pkg-people@NetBSD.org>,
	<gnats-admin@netbsd.org>,
	<pkgsrc-bugs@netbsd.org>,
	<KOT@MATPOCKuH.Ru>
Subject: Re: pkg/45103 (security/openssl fails to build on Solaris10 with gcc in 64bit mode)
Date: Fri, 22 Jul 2011 01:22:07 +0200

 On 20. 7. 2011, at 15:00, Tim Zingelman wrote:

 > Sorry... you must perhaps also set MACHINE_ARCH=x86_64 in mk.conf
 > because uname returns i386 even for 64-bit on Solaris/intel.
 > 
 > Does this solve it?
 > 
 > I agree we need a better way... so if ABI=64 && cpu is intel and OS is
 > SunOS that MACHINE_ARCH is set correctly by the infrastructure.
 > 

 FYI I have been doing this on my local git repo, works fine.

 -F

 diff --git a/security/openssl/Makefile b/security/openssl/Makefile
 index 953d587..a5c5d9b 100644
 --- a/security/openssl/Makefile
 +++ b/security/openssl/Makefile
 @@ -55,7 +55,11 @@ CONFIGURE_ARGS+=     shared threads no-fips
  .  if ${MACHINE_ARCH} == "sparc"
  OPENSSL_MACHINE_ARCH=  ${SPARC_TARGET_ARCH}
  .  elif ${MACHINE_ARCH} == "i386"
 +.    if !empty(ABI:M64)
 +OPENSSL_MACHINE_ARCH=  x86_64
 +.    else
  OPENSSL_MACHINE_ARCH=  x86
 +.    endif
  .  elif ${MACHINE_ARCH} == "x86_64"
  OPENSSL_MACHINE_ARCH=  ${MACHINE_ARCH}
  .  endif

State-Changed-From-To: open->closed
State-Changed-By: jperkin@NetBSD.org
State-Changed-When: Thu, 07 Feb 2013 14:10:17 +0000
State-Changed-Why:
This should have been resolved for a while now since I added explicit
setting of MACHINE_ARCH for Solaris systems.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.