NetBSD Problem Report #38398

From martin@duskware.de  Thu Apr 10 09:45:45 2008
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id B74E863B8C8
	for <gnats-bugs@gnats.netbsd.org>; Thu, 10 Apr 2008 09:45:45 +0000 (UTC)
Message-Id: <20080410094523.09CA763B8C8@narn.NetBSD.org>
Date: Thu, 10 Apr 2008 09:45:23 +0000 (UTC)
From: cheusov@tut.by
Reply-To: cheusov@tut.by
To: netbsd-bugs-owner@NetBSD.org
Subject: bootstrap fails with Intel C Compiler
X-Send-Pr-Version: www-1.0

>Number:         38398
>Category:       pkg
>Synopsis:       bootstrap fails with Intel C Compiler
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 10 09:50:00 +0000 2008
>Closed-Date:    Sun May 13 06:57:18 +0000 2012
>Last-Modified:  Sun May 13 06:57:18 +0000 2012
>Originator:     Aleksey Cheusov
>Release:        Linux
>Organization:
home
>Environment:
>Description:
0 bootstrap> env CC=/opt/intel/cc/10.1.008/bin/icc CXX=/opt/intel/cc/10.1.008/bin/icpc ac_cv___attribute__=yes ./bootstrap --unprivileged  --prefix ~/pkg --workdir /tmp/tmp-pkgsrc-icc
...
===> Installing dependencies for bmake-20080215
=> Build dependency gcc>=2.95.3nb7: NOT found
=> Verifying reinstall for ../../lang/gcc
...
=> Returning to build of gcc-2.95.3nb7
/bin/sh: /home/cheusov/pkg/sbin/audit-packages: No such file or directory
===> Skipping vulnerability checks.
WARNING: No /pkg-vulnerabilities file found.
WARNING: To fix run: `/home/cheusov/pkg/sbin/download-vulnerability-list'.
=> Checksum SHA1 OK for gcc-2.95.3.tar.gz
=> Checksum RMD160 OK for gcc-2.95.3.tar.gz
=> Checksum SHA1 OK for gcc-2.95.3-diff-2002-08-29.gz
=> Checksum RMD160 OK for gcc-2.95.3-diff-2002-08-29.gz
===> Installing dependencies for gcc-2.95.3nb7
===> Overriding tools for gcc-2.95.3nb7
===> Extracting for gcc-2.95.3nb7
/var/local/syntagma2/cheusov/pkgsrc/mk/extract/extract: line 273: /home/cheusov/pkg/bin/tar: No such file or directory
*** Error code 1

Stop.
bmake: stopped in /var/local/syntagma2/cheusov/pkgsrc/lang/gcc
*** Error code 1

Stop.
bmake: stopped in /var/local/syntagma2/cheusov/pkgsrc/lang/gcc
*** Error code 1

Stop.
bmake: stopped in /var/local/syntagma2/cheusov/pkgsrc/devel/bmake
===> exited with status 1
aborted.
1 bootstrap>

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Tobias Nygren <tnn@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: cheusov@tut.by
Subject: Re: pkg/38398: bootstrap fails with Intel C Compiler
Date: Thu, 10 Apr 2008 21:03:17 +0200

 > 0 bootstrap> env CC=/opt/intel/cc/10.1.008/bin/icc CXX=/opt/intel/cc/10.1.008/bin/icpc ac_cv___attribute__=yes ./bootstrap --unprivileged  --prefix ~/pkg --workdir /tmp/tmp-pkgsrc-icc

 Seems you forgot to give --compiler to ./bootstrap, that might cause it
 to fail in the way described.

From: Aleksey Cheusov <cheusov@tut.by>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/38398: bootstrap fails with Intel C Compiler
Date: Fri, 11 Apr 2008 10:27:21 +0300

  >> 0 bootstrap> env CC=/opt/intel/cc/10.1.008/bin/icc CXX=/opt/intel/cc/10.1.008/bin/icpc ac_cv___attribute__=yes ./bootstrap --unprivileged  --prefix ~/pkg --workdir /tmp/tmp-pkgsrc-icc
 >  
 >  Seems you forgot to give --compiler to ./bootstrap, that might cause it
 >  to fail in the way described.

 I followed the instructions which needs to be fixed.

 pkgsrc guide:
    3.3.5 Linux
    ...

    To bootstrap using icc, assuming the default icc installation directory:

    env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \
    ac_cv___attribute__=yes ./bootstrap

    ...

    After bootstrapping, you should set PKGSRC_COMPILER in mk.conf:
    ^^^^^^^^^^^^^^^^^^^

    PKGSRC_COMPILER=        icc

 -- 
 Best regards, Aleksey Cheusov.

From: David Holland <dholland-pbugs@netbsd.org>
To: Aleksey Cheusov <cheusov@tut.by>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/38398: bootstrap fails with Intel C Compiler
Date: Sat, 1 Aug 2009 18:18:32 +0000

 On Fri, Apr 11, 2008 at 10:27:21AM +0300, Aleksey Cheusov wrote:
  > >  Seems you forgot to give --compiler to ./bootstrap, that might cause it
  > >  to fail in the way described.
  > 
  > I followed the instructions which needs to be fixed.

 It looks as if setting ICCBASE in mk.conf and using --compiler=icc
 should be sufficient. Although since bootstrap is supposed to create
 mk.conf, and it'll need it before bootstrap finishes, I'm not sure how
 the former part is supposed to work.

 Is the -static-libcxa thing still required? And should the default
 ICCBASE be adjusted to something like a recent version?

 (The ac_cv___attribute__ thing is now definitely handled by icc.mk.)

 Preliminary patch:

 Index: files/platforms.xml
 ===================================================================
 RCS file: /cvsroot/pkgsrc/doc/guide/files/platforms.xml,v
 retrieving revision 1.60
 diff -u -r1.60 platforms.xml
 --- files/platforms.xml	7 May 2008 09:10:19 -0000	1.60
 +++ files/platforms.xml	1 Aug 2009 18:15:47 -0000
 @@ -444,28 +444,13 @@
        directory:</para>

        <programlisting>
 -env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \
 -ac_cv___attribute__=yes ./bootstrap
 +env LDFLAGS=-static-libcxa ./bootstrap --compiler=icc
        </programlisting>

        <note>
  	<para>icc 8.1 needs the `-i-static' argument instead of -static-libcxa.</para>
        </note>

 -      <para>icc supports __attribute__, but the GNU configure test uses a nested
 -      function, which icc does not support. #undef'ing __attribute__ has the
 -      unfortunate side-effect of breaking many of the Linux header files, which
 -      cannot be compiled properly without __attribute__. The test must be
 -      overridden so that __attribute__ is assumed supported by the
 -      compiler.</para>
 -
 -      <para>After bootstrapping, you should set <varname>PKGSRC_COMPILER</varname>
 -      in &mk.conf;:</para>
 -
 -      <programlisting>
 -PKGSRC_COMPILER=        icc
 -      </programlisting>
 -
        <para>The default installation directory for icc is
        <filename>/opt/intel_cc_80</filename>, which
        is also the pkgsrc default. If you have installed it into a different


 -- 
 David A. Holland
 dholland@netbsd.org

From: Aleksey Cheusov <cheusov@tut.by>
To: David Holland <dholland-pbugs@netbsd.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: pkg/38398: bootstrap fails with Intel C Compiler
Date: Sun, 09 Aug 2009 18:18:20 +0300

 > On Fri, Apr 11, 2008 at 10:27:21AM +0300, Aleksey Cheusov wrote:
  >> >  Seems you forgot to give --compiler to ./bootstrap, that might cause it
  >> >  to fail in the way described.
  >> 
  >> I followed the instructions which needs to be fixed.

 > It looks as if setting ICCBASE in mk.conf and using --compiler=icc
 > should be sufficient.
 Yes.

 > Although since bootstrap is supposed to create
 > mk.conf, and it'll need it before bootstrap finishes, I'm not sure how
 > the former part is supposed to work.
 After bootstrapping ICCBASE variable should added to mk.conf manually.
 PKGSRC_COMPILER=icc is added automatically (--compiler=icc).

 > Is the -static-libcxa thing still required?
 -static-libcxa is deprecated in icc-10.1 (I have no earlier icc).

        icc(1)
        ...
        -shared-libcxa
               No suggested replacement.


        -static-libcxa
               No suggested replacement.

 icc warns about it

     icc: command line remark #10010: option '-static-libcxa' is \
     deprecated and will be removed in a future release. See '-help \
     deprecated'

 > And should the default
 > ICCBASE be adjusted to something like a recent version?
 I tested mk.conf without ICCBASE but with CC and CXX set to icc and icpc
 respectively. It seems it works fine, at least for packages I tested.

 > (The ac_cv___attribute__ thing is now definitely handled by icc.mk.)
 Yes, for bootstrapping ac_cv___attribute__=yes is not needed.

 > --- files/platforms.xml	7 May 2008 09:10:19 -0000	1.60
 > +++ files/platforms.xml	1 Aug 2009 18:15:47 -0000
 > @@ -444,28 +444,13 @@
 >        directory:</para>
 >  
 >        <programlisting>
 > -env CC=/opt/intel_cc_80/bin/icc LDFLAGS=-static-libcxa \
 > -ac_cv___attribute__=yes ./bootstrap
 > +env LDFLAGS=-static-libcxa ./bootstrap --compiler=icc
 >        </programlisting>

 I think the following variant is more correct and easier

    env ICCBASE=/opt/intel/cc/10.1.008 ./bootstrap --compiler=icc

 The following also works fine

    env CC=/opt/intel/cc/10.1.008/bin/icc ./bootstrap --compiler=icc

 >        <note>
 >  	<para>icc 8.1 needs the `-i-static' argument instead of -static-libcxa.</para>
 >        </note>

 -i-static and -i-dynamic options are also deprecated in icc-10

        -i-dynamic
               Link  Intel  provided libraries dynamically.  This option has been depre-
               cated for this release.  Suggested replacement -shared-intel.


        -i-static
               Links Intel-provided libraries statically.  This option has  been  depre-
               cated for this release.  Suggested replacement -static-intel.

 > -      <para>icc supports __attribute__, but the GNU configure test uses a nested
 > -      function, which icc does not support. #undef'ing __attribute__ has the
 > -      unfortunate side-effect of breaking many of the Linux header files, which
 > -      cannot be compiled properly without __attribute__. The test must be
 > -      overridden so that __attribute__ is assumed supported by the
 > -      compiler.</para>
 Yes, nested functions are still not supported by icc but this is not a problem.

 > -      <para>After bootstrapping, you should set <varname>PKGSRC_COMPILER</varname>
 > -      in &mk.conf;:</para>
 > -      <programlisting>
 > -PKGSRC_COMPILER=        icc
 > -      </programlisting>
 Yes, there is no need for this.

 >        <para>The default installation directory for icc is
 >        <filename>/opt/intel_cc_80</filename>, which
 >        is also the pkgsrc default. If you have installed it into a different

 -- 
 Best regards, Aleksey Cheusov.

From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/38398 CVS commit: pkgsrc/doc/guide/files
Date: Sun, 13 May 2012 05:36:29 +0000

 Module Name:	pkgsrc
 Committed By:	dholland
 Date:		Sun May 13 05:36:28 UTC 2012

 Modified Files:
 	pkgsrc/doc/guide/files: platforms.xml

 Log Message:
 Update section on icc from PR 38398. This update is probably itself
 substantially out of date, but it's what we've got...


 To generate a diff of this commit:
 cvs rdiff -u -r1.70 -r1.71 pkgsrc/doc/guide/files/platforms.xml

 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: dholland@NetBSD.org
State-Changed-When: Sun, 13 May 2012 06:57:18 +0000
State-Changed-Why:
committed, finally


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