NetBSD Problem Report #17775
Received: (qmail 2850 invoked by uid 605); 31 Jul 2002 08:27:14 -0000
Message-Id: <20020731082713.5A8A611122@narn.netbsd.org>
Date: Wed, 31 Jul 2002 01:27:13 -0700 (PDT)
From: julien.letessier@sun.com
Sender: gnats-bugs-owner@netbsd.org
Reply-To: julien.letessier@sun.com
To: gnats-bugs@gnats.netbsd.org
Subject: minor buildlink.mk fixes for Zoularis
X-Send-Pr-Version: www-1.0
>Number: 17775
>Category: pkg
>Synopsis: minor buildlink.mk fixes for Zoularis
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: jlam
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Jul 31 08:28:00 +0000 2002
>Closed-Date: Wed Aug 07 19:30:53 +0000 2002
>Last-Modified: Wed Aug 07 19:32:01 +0000 2002
>Originator: Julien T. Letessier
>Release: Zoularis/Solaris8
>Organization:
Sun Labs Europe
>Environment:
SunOS mikdemia 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-Enterprise
>Description:
Under Solaris, several bundled libraries are either obsolete or otherwise unreliable. Some (e.g. gettext) can even only be linked to with the Sun CCS linker, not with GNU ld.
>How-To-Repeat:
Try to compile e.g. devel/bonobo or x11/qt3-libs under Zoularis/Solaris8, with GCC.
>Fix:
The buildlink.mk files for the mentionned libraries (devel/zlib, archivers/bzip2, devel/gettext-lib, devel/ncurses, devel/readline) can be patched by allowing the environment to forcibly use the pkgsrc version of the libs.
The SunOS-specific makefile stub can the be patched to enforce use of the pkgsrc libraries.
Patches follow.
Index: devel/zlib/buildlink.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/zlib/buildlink.mk,v
retrieving revision 1.7
diff -r1.7 buildlink.mk
23c23
< _NEED_ZLIB= NO
---
> _NEED_ZLIB?= NO
25c25
< _NEED_ZLIB= YES
---
> _NEED_ZLIB?= YES
Index: archivers/bzip2/buildlink.mk
===================================================================
RCS file: /cvsroot/pkgsrc/archivers/bzip2/buildlink.mk,v
retrieving revision 1.6
diff -r1.6 buildlink.mk
34c34
< _NEED_BZIP2= YES
---
> _NEED_BZIP2?= YES
36c36
< _NEED_BZIP2= NO
---
> _NEED_BZIP2?= NO
Index: devel/ncurses//buildlink.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/ncurses/buildlink.mk,v
retrieving revision 1.18
diff -r1.18 buildlink.mk
25c25
< _NEED_NCURSES= YES
---
> _NEED_NCURSES?= YES
28c28
< _NEED_NCURSES= NO
---
> _NEED_NCURSES?= NO
33c33
< _NEED_NCURSES= YES
---
> _NEED_NCURSES?= YES
38c38
< _NEED_NCURSES= YES
---
> _NEED_NCURSES?= YES
Index: devel/readline/buildlink.mk
===================================================================
RCS file: /cvsroot/pkgsrc/devel/readline/buildlink.mk,v
retrieving revision 1.17
diff -r1.17 buildlink.mk
26c26
< _NEED_GNU_READLINE= YES
---
> _NEED_GNU_READLINE?= YES
29c29
< _NEED_GNU_READLINE= NO
---
> _NEED_GNU_READLINE?= NO
31c31
< _NEED_GNU_READLINE= YES
---
> _NEED_GNU_READLINE?= YES
This should be added to mk/defs.SunOS.mk:
> # rather use a {d,r}ecent version of zlib and others...
> _NEED_ZLIB= YES #
> _NEED_BZIP2= YES #
> _NEED_NCURSES= YES #
> _NEED_GNU_READLINE= YES #
> USE_GNU_GETTEXT= YES # often broken on Solaris
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->jlam
Responsible-Changed-By: wiz
Responsible-Changed-When: Tue Aug 6 16:26:20 PDT 2002
Responsible-Changed-Why:
jlam said he'd handle it (differently than suggested).
From: "Johnny C. Lam" <jlam@netbsd.org>
To: julien.letessier@sun.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/17775: minor buildlink.mk fixes for Zoularis
Date: Tue, 6 Aug 2002 23:21:10 -0700
On Wed, Jul 31, 2002 at 01:27:13AM -0700, julien.letessier@sun.com wrote:
> >Description:
> Under Solaris, several bundled libraries are either obsolete or otherwise
> unreliable. Some (e.g. gettext) can even only be linked to with the Sun
> CCS linker, not with GNU ld.
> >How-To-Repeat:
> Try to compile e.g. devel/bonobo or x11/qt3-libs under Zoularis/Solaris8,
> with GCC.
> >Fix:
> The buildlink.mk files for the mentionned libraries (devel/zlib,
> archivers/bzip2, devel/gettext-lib, devel/ncurses, devel/readline) can be
> patched by allowing the environment to forcibly use the pkgsrc version of
> the libs.
>
> The SunOS-specific makefile stub can the be patched to enforce use of the
> pkgsrc libraries.
I've taken a slightly different approach to modifying the buildlink.mk
files that should accomplish the same thing as your proposed patches.
From the commit log:
-------
Create new variables INCOMPAT_ZLIB, INCOMPAT_BZIP2, INCOMPAT_READLINE,
INCOMPAT_GETTEXT that are analogous to INCOMPAT_ICONV and contain lists of
shell wildcards intended to match against ${MACHINE_PLATFORM}. These
variables are used to note those platforms that have the named packages in
the base system but are incompatible in some way from the pkgsrc version
of the same package. Change INCOMPAT_CURSES to have the same sematics as
above. These variables allow much greater precision in specifying which
platforms have broken (for the purposes of pkgsrc) versions of software in
the base system that must be ignored.
The buildlink.mk files for these packages define private _INCOMPAT_*
versions of these variables, and they contain the default lists of
platforms that are known to have incompatible software bits.
This addresses pkg/17775 submitted by Julien T. Letessier
<julien.letessier at sun dot com>.
-------
> This should be added to mk/defs.SunOS.mk:
>
> > # rather use a {d,r}ecent version of zlib and others...
> > _NEED_ZLIB= YES #
> > _NEED_BZIP2= YES #
> > _NEED_NCURSES= YES #
> > _NEED_GNU_READLINE= YES #
> > USE_GNU_GETTEXT= YES # often broken on Solaris
The appropriate places to note these incompatibilities is in the individual
buildlink.mk files for these packages. I've started with:
_INCOMPAT_ZLIB= SunOS-*-*
_INCOMPAT_GETTEXT= SunOS-*-*
The benefit is that we are able to name the "bad" platforms much more
precisely. If you are familiar with the various versions of Solaris, do
you think you can narrow the above wildcard patterns to something more
appropriate? Also, could you supply good definitions for _INCOMPAT_BZIP2,
_INCOMPAT_NCURSES, _INCOMPAT_ICONV, and _INCOMPAT_READLINE?
Thanks,
-- Johnny Lam <jlam@netbsd.org>
State-Changed-From-To: open->feedback
State-Changed-By: jlam
State-Changed-When: Tue Aug 6 23:22:11 PDT 2002
State-Changed-Why:
Awaiting feedback from the PR author to complete the definitions for
_INCOMPAT_* before this PR may be closed.
State-Changed-From-To: feedback->closed
State-Changed-By: jlam
State-Changed-When: Wed Aug 7 12:29:40 PDT 2002
State-Changed-Why:
Follow PR author's recommendation as it's difficult to know which version
of Solaris has "good enough" software to satisfy the pkgsrc dependencies.
Thanks for the PR!
From: Julien Letessier <julien.letessier@sun.com>
To: "Johnny C. Lam" <jlam@netbsd.org>
Cc: tech-pkg@netbsd.org
Subject: Re: pkg/17775: minor (?) buildlink.mk fixes for Zoularis
Date: Wed, 07 Aug 2002 09:45:45 +0200
Johnny C. Lam wrote:
> On Wed, Jul 31, 2002 at 01:27:13AM -0700, julien.letessier@sun.com wrote:
>
> I've taken a slightly different approach to modifying the buildlink.mk
> files that should accomplish the same thing as your proposed patches.
> From the commit log:
>
> -------
> Create new variables INCOMPAT_ZLIB, INCOMPAT_BZIP2, INCOMPAT_READLINE,
> INCOMPAT_GETTEXT that are analogous to INCOMPAT_ICONV and contain lists of
> shell wildcards intended to match against ${MACHINE_PLATFORM}. These
> variables are used to note those platforms that have the named packages in
> the base system but are incompatible in some way from the pkgsrc version
> of the same package. Change INCOMPAT_CURSES to have the same sematics as
> above. These variables allow much greater precision in specifying which
> platforms have broken (for the purposes of pkgsrc) versions of software in
> the base system that must be ignored.
>
> The buildlink.mk files for these packages define private _INCOMPAT_*
> versions of these variables, and they contain the default lists of
> platforms that are known to have incompatible software bits.
Hi Johnny,
This method is IMHO extremely satisfying, even though it complexifies
the buillink.mk "API" a little.
> The appropriate places to note these incompatibilities is in the individual
> buildlink.mk files for these packages. I've started with:
>
> _INCOMPAT_ZLIB= SunOS-*-*
> _INCOMPAT_GETTEXT= SunOS-*-*
>
> The benefit is that we are able to name the "bad" platforms much more
> precisely. If you are familiar with the various versions of Solaris, do
> you think you can narrow the above wildcard patterns to something more
> appropriate? Also, could you supply good definitions for _INCOMPAT_BZIP2,
> _INCOMPAT_NCURSES, _INCOMPAT_ICONV, and _INCOMPAT_READLINE?
I've (informally) chatted with a few guys here in the Labs about this
subject. None of us know Solaris enough to give a precise answer, but
Solaris tends to carry arround different versions of these different
libs, sometimes broken, sometimes not, and generally with only one set
of non-standard headers.
Even worse, a single version of Solaris (e.g. Solaris 8) can have
different versions of the standard libs, depending on what patches the
sysadmin applied ('Service Packs'), which can be broken or not,
compatible or not. For instance, a service pack can replace libfoobar
with a newer, incompatible (or patched) version... and thus break your
pkgsrc-compiled software :(
This leads to a pretty dark picture when it comes to compiling
third-party software on Solaris. Our conclusions were that loosing a few
megs of disk space by using the (reliable) pkgsrc libs was probably the
best solution... as it probably is for most proprietary OS, which have
opaque policies concerning 'default' software bits.
<troll> Except MacOS X, of course, since it only is a masqueraded
FreeBSD ;) </troll>
Conclusion: SunOS-*-* is IMO the best incompatibility definition you can
give for all these libs, but I'm open to suggestions :)
BTW, I'm CCing to tech-pkg, since this thread can be of interest for
the folks out there (hi list!).
Cheers,
--
Julien T. Letessier
Sun Labs Europe, Meylan, France
julien.letessier@sun.com
>Unformatted:
(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.