From owner-freebsd-ports@freebsd.org Sat Nov 26 16:41:21 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2267C57D58 for ; Sat, 26 Nov 2016 16:41:21 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A66013DE for ; Sat, 26 Nov 2016 16:41:21 +0000 (UTC) (envelope-from tech-lists@zyxst.net) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 5592120738 for ; Sat, 26 Nov 2016 11:41:20 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Sat, 26 Nov 2016 11:41:20 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=zyxst.net; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=egn4nhCYzKZYGGb XS+OqarzT0C4=; b=tVPRgDk3yJ8u3FwLlmjGBrvgKKFSfp1y9UnbPVUr93IszN2 1QVElBUh0l7s50T7ZUxy9XQSl5iad7iTr0WgPbDqgmWDyo1KoDvxxSN+wcNJJn7R ZqHgDD0uMFQbp0hgnTY4e9NViluKkukChpVIFZw9ko8zZLSH1vObly/SIzc8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= smtpout; bh=egn4nhCYzKZYGGbXS+OqarzT0C4=; b=C9SkITIMvtPmiZbnEzz7 8VE3/lMjjdmsRjHDLvxOnX1i9ZCWnSR2itm72hoHKU01NZdiI7QkjfHOacUVJfLt cx/uBqQ4v5iethb4ElGH8fu50vqwwgp86SvHutzN0EKTZjsQlop5yYFAEbdNzrc0 69ZBKltc+zeeHgqHINsHjgw= X-ME-Sender: X-Sasl-enc: WzGltfYpIeWVAKVnnj8WYN4UM/1Fp8GzXQXgCBJwsD6p 1480178480 Received: from pumpkin.growveg.org (pumpkin.growveg.org [82.70.91.101]) by mail.messagingengine.com (Postfix) with ESMTPA id E2C177E62F for ; Sat, 26 Nov 2016 11:41:19 -0500 (EST) Subject: Re: graphics/py3-cairo cannot find Python.h, but Python.h is present To: freebsd-ports@freebsd.org References: <30b728cd-4f5b-fb00-be41-c2f21e54eded@zyxst.net> <0c801f97-bb8f-3219-4923-5ae6c721d8af@FreeBSD.org> <862561bd-d6ed-d316-9de6-3807285ec0e9@zyxst.net> <15ecc8c9-40db-552b-c459-56507ac7e7c9@FreeBSD.org> From: tech-lists Message-ID: <555a5a00-3d6a-ad8d-a0c0-2800cf2e0d62@zyxst.net> Date: Sat, 26 Nov 2016 16:41:18 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <15ecc8c9-40db-552b-c459-56507ac7e7c9@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 16:41:21 -0000 On 26/11/2016 13:59, Kubilay Kocak wrote: > On 26/11/2016 9:11 PM, tech-lists wrote: >> On 26/11/2016 03:48, Kubilay Kocak wrote: >>> Include path ^^ has a double '/storage/storage/' prefix: >>> >>> '-I/storage/storage/usr/local/include/python3.5m' >>> >>> What's causing it is the question. It could be that something is not >>> PREFIX-safe. >> >> Interesting. Is this something I can fix myself in the Makefile? > > Difficult to answer that question without knowing what/where the cause > is. Off the top of my head, some avenues to investigate: > > - /etc/make.conf (or any other config sourced into the port build) > - the graphics/py3-cairo port > - Any USES=foo framework components that py3-cairo uses > - waf configuration for py3-cairo > - python3.5-config results > - if python3.5-config results contain the incorrect path, then the > lang/python35 port or Mk/Uses/python.mk looking for things that may be > PREFIX-unsafe. > > Which raises the question, what variable(s) is/are being overridden to > get things happening in /storage in your environment? A full > environment variable list while building the port would be good. Hi, /storage is a zpool. /usr/local is a symlink of /storage/usr/local OK, here is the output from env: # env TERM=xterm-256color BLOCKSIZE=K MAIL=/var/mail/root PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin SHELL=/bin/csh HOME=/root USER=root HOSTTYPE=FreeBSD VENDOR=amd OSTYPE=FreeBSD MACHTYPE=x86_64 SHLVL=1 PWD=/usr/ports/graphics/py3-cairo LOGNAME=root GROUP=wheel HOST=pumpkin.growveg.org EDITOR=vi PAGER=more Here is /etc/make.conf: MALLOC_PRODUCTION=yes MAKE_JOBS_NUMBER=18 WITH_MANCOMPRESS=YES WITHOUT_DEBUG=YES DEFAULT_VERSIONS+= ssl=libressl OPTIMIZED_CFLAGS=YES BUILD_OPTIMIZED=YES NO_SENDMAIL=true python3-config: # python3.5-config --prefix /storage/usr/local # I don't know what waf is or how it works. It's referenced in the makefile, as is reference to USES= Here's the makefile: # Created by: Michael Johnson # $FreeBSD: head/graphics/py3-cairo/Makefile 401900 2015-11-18 22:13:53Z rm $ # $MCom: ports/graphics/py-cairo/Makefile,v 1.28 2010/11/15 14:12:13 kwm Exp $ PORTNAME= cairo PORTVERSION= 1.10.0 PORTREVISION= 3 CATEGORIES= graphics python MASTER_SITES= http://cairographics.org/releases/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTNAME= py${PORTNAME}-${PORTVERSION} MAINTAINER= gnome@FreeBSD.org COMMENT= Python 3 bindings for Cairo USES= pkgconfig python:3 shebangfix tar:bzip2 waf USE_GNOME= cairo CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py .include .if ${PYTHON_REL} < 3500 PYOEXTENSION= pyo .else PYOEXTENSION= opt-1.pyc .endif PLIST_SUB+= PYTVER=${PYTHON_VER:S/.//} \ PYOEXTENSION=${PYOEXTENSION} post-patch: @${REINPLACE_CMD} -e 's|python %s|${PYTHON_CMD} %s|g' \ ${WRKSRC}/test/examples_test.py pre-configure: # Run waf configure twice, once to extract waflib and patch and then actual configure @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${CONFIGURE_CMD} || : @cd ${WRKSRC}/.waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6/ && \ ${PATCH} -p1 < ${FILESDIR}/pycairo-1.10.0-waf-py3_4.patch && \ ${PATCH} -p1 < ${FILESDIR}/pycairo-1.10.0-waf-py3_5.patch post-install: @${RM} ${STAGEDIR}${PYTHON_SITELIBDIR}/cairo/__init__.py[co] @cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ -d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} @cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \ -d ${PYTHONPREFIX_SITELIBDIR} -f ${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cairo/_cairo.so .include many thanks, -- J.