NetBSD Problem Report #49982

From www@NetBSD.org  Wed Jun 17 06:57:56 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 64475A5B2E
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 17 Jun 2015 06:57:56 +0000 (UTC)
Message-Id: <20150617065754.CB565A65C0@mollari.NetBSD.org>
Date: Wed, 17 Jun 2015 06:57:54 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: graphics/py-cairo does not compile on Solaris
X-Send-Pr-Version: www-1.0

>Number:         49982
>Category:       pkg
>Synopsis:       graphics/py-cairo does not compile on Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 17 07:00:00 +0000 2015
>Closed-Date:    Sun Jun 28 20:04:13 +0000 2015
>Last-Modified:  Sun Jun 28 20:04:13 +0000 2015
>Originator:     Joern Clausen
>Release:        
>Organization:
University of Bielefeld
>Environment:
Solaris 11.2/i86, GCC 4.8.2
>Description:
Compilation of graphics/py-cairo fails on Solaris 11.2:

/usr/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.  -I/opt/pkg-hrz/20150608/include/python2.7 -I/opt/pkg-hrz/20150608/include/python2.7  -I/usr/include -I/opt/pkg-hrz/20150608/include -I/opt/pkg-hrz/20150608/include/freetype2  -O2 -I/usr/include -I/opt/pkg-hrz/20150608/include -I/opt/pkg-hrz/20150608/include/freetype2 -std=c99 -Wall -fno-strict-aliasing -MT _cairo_la-cairomodule.lo -MD -MP -MF .deps/_cairo_la-cairomodule.Tpo -c -o _cairo_la-cairomodule.lo `test -f 'cairomodule.c' || echo './'`cairomodule.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/.buildlink/include/python2.7 -I/opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/.buildlink/include -I/opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/.buildlink/include/freetype2 -O2 -Wall -fno-strict-aliasing -MT _cairo_la-cairomodule.lo -MD -MP -MF .deps/_cairo_la-cairomodule.Tpo -c cairomodule.c  -fPIC -DPIC -o .libs/_cairo_la-cairomodule.o
In file included from private.h:41:0,
                 from cairomodule.c:35:
pycairo.h:36:19: fatal error: cairo.h: No such file or directory
 #include <cairo.h>
                   ^
compilation terminated.


During extraction, this error/warning is shown:

===> Extracting for py27-cairo-1.10.0nb4
cd /opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/py2cairo-1.10.0 && touch ChangeLog && aclocal && automake -a
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/.tools/bin/automake line 3936.

which is a difference to building this package e.g. on NetBSD. It is unclear to me, though, where this regex is found and who actually tries to use it.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Wed, 17 Jun 2015 10:01:43 +0200

 On Wed, Jun 17, 2015 at 07:00:00AM +0000, joern.clausen@uni-bielefeld.de wrote:
 > Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/.tools/bin/automake line 3936.

 This is the actual line you should look at.
 perl finds
 m/\${([^ \t=:+{}]+)}/
 and doesn't like the unquoted '{'.

 I grepped for this in the automake-1.15 sources but couldn't find it.
 Which version do you have installed?
  Thomas

From: =?ISO-8859-15?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: Thomas Klausner <wiz@NetBSD.org>, pkg-manager@NetBSD.org,
 gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Wed, 17 Jun 2015 11:08:28 +0200

 >   This is the actual line you should look at.
 >   perl finds
 >   m/\${([^ \t=:+{}]+)}/
 >   and doesn't like the unquoted '{'.
 >
 >   I grepped for this in the automake-1.15 sources but couldn't find it.

 That's the reason I asked. grepping for this is probably a little bit 
 tricky...

 >   Which version do you have installed?

 $ pkg_info -I automake
 automake-1.15nb1    GNU Standards-compliant Makefile generator

 and pkgsrc's is the only version on this system:

 $ where automake
 /opt/pkg-hrz/20150608/bin/automake

 The local pkgsrc tree is kept up-to-date while I am trying to install my 
 set of packages.

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 Hochschulrechenzentrum

 Universität Bielefeld
 Universitätsstraße 25
 33615 Bielefeld
 Telefon: +49 521 106-12601
 E-Mail: joern.clausen@uni-bielefeld.de

 http://www.uni-bielefeld.de/hrz

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Wed, 17 Jun 2015 11:24:18 +0000
Responsible-Changed-Why:
Solaris pkgsrc problem


From: =?ISO-8859-15?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Wed, 17 Jun 2015 14:10:26 +0200

 >   This is the actual line you should look at.
 >   perl finds
 >   m/\${([^ \t=:+{}]+)}/
 >   and doesn't like the unquoted '{'.
 >
 >   I grepped for this in the automake-1.15 sources but couldn't find it.
 >   Which version do you have installed?

 I thought this was from some file automake includes and didn't realize 
 that it is the automake script itself. The linenumber is accurate:

 sub substitute_ac_subst_variables
 {
    my ($text) = @_;
    $text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker 
 ($1)/ge;
    return $text;
 }

 The culprit is Perl from pkgsrc. Issuing

 $ /usr/bin/perl <pkgsrcpath>/automake

 generates the files without errors whereas

 $ <pkgsrcpath>/bin/perl <pkgsrcpath>/automake

 shows the behavior mentioned before.

 Builtin Perl is v5.12.5, pkgsrc perl is v5.22.0.


 But it seems this is not the root cause for the compile problems. 
 Although there are some differences in the generated Makefile.in, the 
 compile error (not finding cairo.h) remains and seems unrelated to these 
 differences.

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 Hochschulrechenzentrum

 Universität Bielefeld
 Universitätsstraße 25
 33615 Bielefeld
 Telefon: +49 521 106-12601
 E-Mail: joern.clausen@uni-bielefeld.de

 http://www.uni-bielefeld.de/hrz

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Thu, 18 Jun 2015 02:48:12 +0000

 On Wed, Jun 17, 2015 at 07:00:00AM +0000, joern.clausen@uni-bielefeld.de wrote:
  > libtool: compile:  gcc -DHAVE_CONFIG_H -I.
  >   -I/opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/.buildlink/include/python2.7
  >   -I/opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/.buildlink/include
  >   -I/opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/.buildlink/include/freetype2
  >   -O2 -Wall -fno-strict-aliasing
  >   -MT _cairo_la-cairomodule.lo -MD -MP -MF .deps/_cairo_la-cairomodule.Tpo
  >   -c cairomodule.c
  >   -fPIC -DPIC -o .libs/_cairo_la-cairomodule.o

 My corresponding compile line (on NetBSD) looks like this:

  > libtool: compile:  gcc -DHAVE_CONFIG_H -I.
  >   -I/usr/pkgsrc/graphics/py-cairo/work/.buildlink/include/python2.7
  >   -D_REENTRANT
  >   -I/usr/pkgsrc/graphics/py-cairo/work/.buildlink/include/cairo
  >   -I/usr/pkgsrc/graphics/py-cairo/work/.x11-buildlink/include/pixman-1
  >   -I/usr/pkgsrc/graphics/py-cairo/work/.x11-buildlink/include
  >   -I/usr/pkgsrc/graphics/py-cairo/work/.x11-buildlink/include/freetype2
  >   -I/usr/pkgsrc/graphics/py-cairo/work/.buildlink/include/libpng16
  >   -I/usr/pkgsrc/graphics/py-cairo/work/.buildlink/include
  >   -I/usr/pkgsrc/graphics/py-cairo/work/.x11-buildlink/include/libdrm
  >   -O2 -std=c99 -Wall -fno-strict-aliasing
  >   -MT _cairo_la-cairomodule.lo -MD -MP -MF .deps/_cairo_la-cairomodule.Tpo
  >   -c cairomodule.c
  >   -fPIC -DPIC -o .libs/_cairo_la-cairomodule.o

 The lack of .buildlink/include/cairo in yours is why it doesn't build
 (otherwise the cairo header is cairo/cairo.h) so the question is where
 that went. (And the -I for png too, probably. I'm assuming the
 .x11-buildlink differences are harmless until proven otherwise.)

 The configure script says "checking for CAIRO... yes" so it's probably
 doing it with pkg-config.

 Is there a native cairo.pc that it might be finding by accident?

  > During extraction, this error/warning is shown:
  > 
  > ===> Extracting for py27-cairo-1.10.0nb4
  > cd /opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/py2cairo-1.10.0 && touch ChangeLog && aclocal && automake -a
  > Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /opt/pkgsrc/pkg-hrz/pkgsrc/graphics/py-cairo/work.pkgsrc-sol11i86/.tools/bin/automake line 3936.
  > 
  > which is a difference to building this package e.g. on NetBSD. It
  > is unclear to me, though, where this regex is found and who
  > actually tries to use it.

 I am seeing this on NetBSD too and it doesn't seem to be important.

 -- 
 David A. Holland
 dholland@netbsd.org

From: =?ISO-8859-15?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: David Holland <dholland-pbugs@NetBSD.org>, solaris-pkg-people@NetBSD.org,
 gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Thu, 18 Jun 2015 10:39:33 +0200

 >   The configure script says "checking for CAIRO... yes" so it's probably
 >   doing it with pkg-config.

 Yes. And it does so with the native pkg-config:

 $ where pkg-config
 /usr/bin/pkg-config
 /usr/ccs/bin/pkg-config

 And cairo and pycairo are both packages installed natively.

 I tried compilation of py-cairo with PKG_CONFIG_PATH set to pkgsrc's 
 directory, but the error remained.

 After installing devel/pkg-config, I can compile graphics/py-cairo.

 Now I wonder what other packages have accidentally picked up stuff from 
 native libraries, when they should have used pkgsrc...

 I think this PR can be closed.

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 Hochschulrechenzentrum

 Universität Bielefeld
 Universitätsstraße 25
 33615 Bielefeld
 Telefon: +49 521 106-12601
 E-Mail: joern.clausen@uni-bielefeld.de

 http://www.uni-bielefeld.de/hrz

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Thu, 18 Jun 2015 19:05:49 +0000

 On Thu, Jun 18, 2015 at 08:40:01AM +0000, J?rn Clausen wrote:
  >  >   The configure script says "checking for CAIRO... yes" so it's probably
  >  >   doing it with pkg-config.
  >  
  >  Yes. And it does so with the native pkg-config:
  >  
  >  $ where pkg-config
  >  /usr/bin/pkg-config
  >  /usr/ccs/bin/pkg-config
  >  
  >  And cairo and pycairo are both packages installed natively.
  >  
  >  I tried compilation of py-cairo with PKG_CONFIG_PATH set to pkgsrc's 
  >  directory, but the error remained.
  >  
  >  After installing devel/pkg-config, I can compile graphics/py-cairo.

 aha...

  >  Now I wonder what other packages have accidentally picked up stuff from 
  >  native libraries, when they should have used pkgsrc...
  >  
  >  I think this PR can be closed.

 Well... shouldn't we have a mechanism to make sure that pkgsrc
 pkg-config gets installed when it's needed? Not sure how that would
 work offhand.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Thu, 18 Jun 2015 21:22:21 +0200

 On Thu, Jun 18, 2015 at 07:10:07PM +0000, David Holland wrote:
 >  Well... shouldn't we have a mechanism to make sure that pkgsrc
 >  pkg-config gets installed when it's needed? Not sure how that would
 >  work offhand.

 USE_TOOLS for this package does include pkg-config.
 Why isn't it installed and used?
  Thomas

From: Jonathan Perkin <jperkin@pkgsrc.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Thu, 18 Jun 2015 20:27:40 +0100

 * On 2015-06-18 at 20:25 BST, Thomas Klausner wrote:

 > The following reply was made to PR pkg/49982; it has been noted by GNATS.
 > 
 > From: Thomas Klausner <wiz@NetBSD.org>
 > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
 > Cc: 
 > Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
 > Date: Thu, 18 Jun 2015 21:22:21 +0200
 > 
 >  On Thu, Jun 18, 2015 at 07:10:07PM +0000, David Holland wrote:
 >  >  Well... shouldn't we have a mechanism to make sure that pkgsrc
 >  >  pkg-config gets installed when it's needed? Not sure how that would
 >  >  work offhand.
 >  
 >  USE_TOOLS for this package does include pkg-config.
 >  Why isn't it installed and used?

 mk/tools/tools.SunOS.mk:

   .if ${OS_VERSION} == "5.11" && exists(/usr/bin/pkg-config)
   TOOLS_PLATFORM.pkg-config?=     /usr/bin/pkg-config
   .endif

 Cygwin is the only other platform to define TOOLS_PLATFORM for pkg-config,
 and I'm not sure we should be doing it for SunOS.

 We do not ship /usr/bin/pkg-config on SmartOS, which is likely why our
 bulk builds do not show these failures.

 I'm +1 for ripping it out so that USE_TOOLS+=pkg-config DTRT.

 -- 
 Jonathan Perkin       www.perkin.org.uk
 github.com/jperkin  twitter.com/jperkin

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Thu, 18 Jun 2015 22:00:38 +0200

 On Thu, Jun 18, 2015 at 07:30:00PM +0000, Jonathan Perkin wrote:
 >  I'm +1 for ripping it out so that USE_TOOLS+=pkg-config DTRT.

 Me too. More consistency can only be better, and it's a small tool.
  Thomas

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Thu, 18 Jun 2015 20:14:57 +0000

 On Thu, Jun 18, 2015 at 08:05:01PM +0000, Thomas Klausner wrote:
  > The following reply was made to PR pkg/49982; it has been noted by GNATS.
  > 
  > From: Thomas Klausner <wiz@NetBSD.org>
  > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
  > Cc: 
  > Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
  > Date: Thu, 18 Jun 2015 22:00:38 +0200
  > 
  >  On Thu, Jun 18, 2015 at 07:30:00PM +0000, Jonathan Perkin wrote:
  >  >  I'm +1 for ripping it out so that USE_TOOLS+=pkg-config DTRT.
  >  
  >  Me too. More consistency can only be better, and it's a small tool.

 Seems reasonable to me, for what that's worth. Now or after thawing?

 -- 
 David A. Holland
 dholland@netbsd.org

From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
Date: Fri, 19 Jun 2015 11:27:03 +0200

 On Thu, Jun 18, 2015 at 08:05:01PM +0000, Thomas Klausner wrote:
 > The following reply was made to PR pkg/49982; it has been noted by GNATS.
 > 
 > From: Thomas Klausner <wiz@NetBSD.org>
 > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
 > Cc: 
 > Subject: Re: pkg/49982: graphics/py-cairo does not compile on Solaris
 > Date: Thu, 18 Jun 2015 22:00:38 +0200
 > 
 >  On Thu, Jun 18, 2015 at 07:30:00PM +0000, Jonathan Perkin wrote:
 >  >  I'm +1 for ripping it out so that USE_TOOLS+=pkg-config DTRT.
 >  
 >  Me too. More consistency can only be better, and it's a small tool.

 It's not a small tool as it builds or depends on half of glib. But I
 don't think the pain involved here justifies the gain.

 Joerg

From: "Jonathan Perkin" <jperkin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49982 CVS commit: pkgsrc/mk/tools
Date: Fri, 19 Jun 2015 15:22:44 +0000

 Module Name:	pkgsrc
 Committed By:	jperkin
 Date:		Fri Jun 19 15:22:44 UTC 2015

 Modified Files:
 	pkgsrc/mk/tools: tools.SunOS.mk

 Log Message:
 Don't use the platform /usr/bin/pkg-config.  As per PR#49982 it causes
 problems that are fixed by using the pkgsrc version, and no platform
 other than Cygwin tries to use a native version.

 Consensus is that due to the limited impact and clear benefit this is
 ok to go in during the freeze despite being an infrastructure change.


 To generate a diff of this commit:
 cvs rdiff -u -r1.47 -r1.48 pkgsrc/mk/tools/tools.SunOS.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: dholland@NetBSD.org
State-Changed-When: Sun, 28 Jun 2015 20:04:13 +0000
State-Changed-Why:
Committed, thanks.


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