NetBSD Problem Report #31491

From www@netbsd.org  Thu Oct  6 10:20:38 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 0783463B8A6; Thu,  6 Oct 2005 10:20:38 +0000 (UTC)
Message-Id: <20051006102038.0783463B8A6@narn.netbsd.org>
Date: Thu,  6 Oct 2005 10:20:38 +0000 (UTC)
From: freebsd@generalresources.com
Reply-To: freebsd@generalresources.com
To: gnats-bugs@netbsd.org
Subject: Compilations fail with pkgsrc on solaris 9
X-Send-Pr-Version: www-1.0

>Number:         31491
>Category:       pkg
>Synopsis:       Compilations fail with pkgsrc on solaris 9
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 06 10:21:00 +0000 2005
>Closed-Date:    Thu Feb 07 14:30:52 +0000 2013
>Last-Modified:  Thu Feb 07 14:30:52 +0000 2013
>Originator:     C. Hall
>Release:        pkgsrc on Solaris 9
>Organization:
>Environment:
SunOS 5.9 Generic_117171-11 sun4u sparc SUNW,UltraAX-i2
>Description:
many compilations fail in particular
  perl5
  patch
  cvs
  nbsed
  rsync

The workaround below allowed me to compile perl and patch
and I will try with the others
>How-To-Repeat:
cd /usr/pkgsrc/lang/perl5
bmake

>Fix:
  Many Solaris headers have lines like:

    #if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)

  Programs like perl need the "__STDC__ - 0 == 0" to be true

  lang/gcc34 creates the following directory (and some sub directories)

    /usr/pkg/gcc34/lib/gcc/sparc-sun-solaris2.9/3.4.4/include/

  These files are generated from Solaris headers

  gcc handles the __STDC__ definition in a special way

    if the file is in one of the "System" directories
    then __STDC__ == 0
    else __STDC__ == 1

  pkgsrc has a process called buildlink3 which creates a directory tree
  e.g.
    /tmp/work-pkg/lang/perl5/work/.buildlink/gcc34
  this is populated by symbolic links to the actual files

  The result is that compiling under pkgsrc the gcc compiler picks files from:
    /tmp/work-pkg/lang/perl5/work/.buildlink/gcc34/lib/gcc/sparc-sun-solaris2.9/3.4.4/include/
  instead of the one under /usr/pkg gcc does not consider these symbolic links to be
  system files, therefore __STDC__ == 1

  lang/perl5 compiled successfully by doing:

    rm -rf /tmp/work-pkg/lang/perl5/work/.buildlink/gcc34/lib/gcc/sparc-sun-solaris2.9/3.4.4/include
  prior to starting compiles.

  Possible workarounds:

    1) do not create links this directory tree (best solution?)

    2) create actual files that contain one line:
         #include "/absolute/path/to/file.h"

    3) modify gcc to resolve symbolic links to find actual file name
       then it will match them as system files

    4) The workaround I am trying for the other failed programs is:

cd /usr/pkgsrc/some/prog
bmake configure
rm -rf work/.buildlink/gcc34/lib/gcc/sparc-sun-solaris2.9/3.4.4/include
bmake

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: reed@netbsd.org
Responsible-Changed-When: Thu, 06 Oct 2005 16:10:38 +0000
Responsible-Changed-Why:
Assigned to pkgsrc developers who can help with Solaris.


State-Changed-From-To: open->closed
State-Changed-By: jperkin@NetBSD.org
State-Changed-When: Thu, 07 Feb 2013 14:30:52 +0000
State-Changed-Why:
I don't see a need to keep this PR around any longer.


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