NetBSD Problem Report #36847
From martin@duskware.de Sun Aug 26 19:01:42 2007
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 9DBA763B852
for <gnats-bugs@gnats.netbsd.org>; Sun, 26 Aug 2007 19:01:42 +0000 (UTC)
Message-Id: <20070826151007.7C3E363B8D8@narn.NetBSD.org>
Date: Sun, 26 Aug 2007 15:10:07 +0000 (UTC)
From: cfuhrman@pobox.com
Reply-To: cfuhrman@pobox.com
To: netbsd-bugs-owner@NetBSD.org
Subject: sysutils/gamin make fails : gamin.c:9:20: error: Python.h: No such file or directory
X-Send-Pr-Version: www-1.0
>Number: 36847
>Category: pkg
>Synopsis: sysutils/gamin make fails : gamin.c:9:20: error: Python.h: No such file or directory
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Aug 26 19:05:00 +0000 2007
>Closed-Date: Sat Dec 22 23:20:12 +0000 2007
>Last-Modified: Sat Dec 22 23:20:12 +0000 2007
>Originator: Chris Fuhrman
>Release: 4.0_BETA2
>Organization:
>Environment:
NetBSD hiromi.den.fuhrbear.com 4.0_BETA2 NetBSD 4.0_BETA2 (GENERIC) #10: Fri Jul 27 13:23:23 EDT 2007 root@hiromi.den.fuhrbear.com:/usr/src/sys/arch/i386/compile/GENERIC i386
>Description:
sysutils/gamin fails to compile after a make when lang/python24 is installed:
...
cc -DHAVE_CONFIG_H -I. -I.. -I/export0/pkgsrc/sysutils/gamin/work/.buildlink/include/python2.4 -I../libgamin -I../lib -I/export0/pkgsrc/sysutils/gamin/work/.buildlink/include -O2 -MT gamin.lo -MD -MP -MF .deps/gamin.Tpo -c gamin.c -fPIC -DPIC -o .libs/gamin.o
gamin.c:9:20: error: Python.h: No such file or directory
gamin.c:20: error: 'NULL' undeclared here (not in a function)
gamin.c: In function 'get_connection':
gamin.c:34: warning: incompatible implicit declaration of built-in function 'malloc'
gamin.c:40: warning: incompatible implicit declaration of built-in function 'memset'
gamin.c:52: warning: incompatible implicit declaration of built-in function 'memset'
gamin.c:57: warning: incompatible implicit declaration of built-in function 'malloc'
gamin.c: In function 'get_request':
gamin.c:89: warning: incompatible implicit declaration of built-in function 'malloc'
gamin.c:95: warning: incompatible implicit declaration of built-in function 'memset'
gamin.c:107: warning: incompatible implicit declaration of built-in function 'memset'
gamin.c:112: warning: incompatible implicit declaration of built-in function 'malloc'
gamin.c: At top level:
gamin.c:157: error: expected ')' before '*' token
gamin.c:175: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:180: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:191: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:206: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:218: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:242: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:274: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:289: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:304: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:336: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:368: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
gamin.c:431: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gaminMethods'
gamin.c: In function 'init_gamin':
gamin.c:458: error: 'gaminMethods' undeclared (first use in this function)
gamin.c:458: error: (Each undeclared identifier is reported only once
gamin.c:458: error: for each function it appears in.)
*** Error code 1
Stop.
make: stopped in /export0/pkgsrc/sysutils/gamin/work/gamin-0.1.5/python
*** Error code 1
Stop.
make: stopped in /export0/pkgsrc/sysutils/gamin/work/gamin-0.1.5/python
*** Error code 1
Stop.
make: stopped in /export0/pkgsrc/sysutils/gamin/work/gamin-0.1.5
*** Error code 1
Stop.
make: stopped in /export0/pkgsrc/sysutils/gamin/work/gamin-0.1.5
*** Error code 1
Stop.
make: stopped in /export0/pkgsrc/sysutils/gamin
*** Error code 1
Stop.
make: stopped in /usr/pkgsrc/sysutils/gamin
The error output above was from the pkgsrc-2007Q2 branch. Please note this affects HEAD as well.
The problem appears to be that the pkgsrc toolchain finds python okay but as it isn't listed as a dependency, Python.h cannot be found. From GNU AutoTools output:
checking abstract socket namespace... no
checking for python... /usr/pkg/bin/python
Found Python version 2.4
configure: creating ./config.status
>How-To-Repeat:
1) check out pkgsrc-2007Q2 or HEAD
2) Install lang/python24 (other versions of python may possibly trigger
this bug as well)
3) cd sysutils/gamin
4) make
>Fix:
A comprehensive solution is to make the enabling of python bindings optional. The following patch does the following:
1) Adds an options.mk file containing a python PKG_OPTION. When
python is specified as an option, the appropriate buildlink is
included along with the appropriate GNU Configure option.
2) .include the options file in the Makefile
NOTE: This diff is based off the pkgsrc-2007Q2 branch. This will need to be applied to HEAD as well.
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/gamin/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile 13 Apr 2006 18:27:24 -0000 1.9
+++ Makefile 26 Aug 2007 15:04:37 -0000
@@ -19,6 +19,8 @@
CONFIGURE_ARGS+= --without-threads
CONFIGURE_ARGS+= --with-html-dir=${DOCDIR:Q}
+.include "./options.mk"
+
PKG_SYSCONFSUBDIR= gamin
DOCDIR= ${PREFIX}/share/doc/gamin
Index: options.mk
===================================================================
RCS file: options.mk
diff -N options.mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ options.mk 26 Aug 2007 15:04:37 -0000
@@ -0,0 +1,14 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.gamin
+PKG_SUPPORTED_OPTIONS= python
+
+.include "../../mk/bsd.options.mk"
+
+.if empty(PKG_OPTIONS:Mpython)
+CONFIGURE_ARGS+= --without-python
+.else
+.include "../../lang/python24/buildlink3.mk"
+.endif
+
+
>Release-Note:
>Audit-Trail:
From: "OBATA Akio" <obache@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/36847: sysutils/gamin make fails : gamin.c:9:20: error: Python.h: No such file or directory
Date: Mon, 17 Sep 2007 11:02:16 +0900
On Mon, 27 Aug 2007 04:05:01 +0900, <cfuhrman@pobox.com> wrote:
> checking for python... /usr/pkg/bin/python
> Found Python version 2.4
Probably using pkg_alternatives.
>> Fix:
> A comprehensive solution is to make the enabling of python bindings optional. The following patch does the
Or should be separate package?
--
"Of course I love NetBSD":-)
OBATA Akio / obache@NetBSD.org
From: OBATA Akio <obache@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/36847 CVS commit: pkgsrc/sysutils/gamin
Date: Mon, 24 Sep 2007 12:57:04 +0000 (UTC)
Module Name: pkgsrc
Committed By: obache
Date: Mon Sep 24 12:57:04 UTC 2007
Modified Files:
pkgsrc/sysutils/gamin: Makefile
Log Message:
Exactly disable python detection.
Fixes PR 36847.
To generate a diff of this commit:
cvs rdiff -r1.11 -r1.12 pkgsrc/sysutils/gamin/Makefile
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: tnn@netbsd.org
State-Changed-When: Sat, 22 Dec 2007 23:20:12 +0000
State-Changed-Why:
fixed on 2007-09-24 by obache@
Thanks for the PR.
>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.