NetBSD Problem Report #52244

From www@NetBSD.org  Fri May 19 07:16:19 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(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 D8EA87A26C
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 19 May 2017 07:16:19 +0000 (UTC)
Message-Id: <20170519071618.B1E387A295@mollari.NetBSD.org>
Date: Fri, 19 May 2017 07:16:18 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: can't compile print/luatex any longer on Solaris 11, mprf.h
X-Send-Pr-Version: www-1.0

>Number:         52244
>Category:       pkg
>Synopsis:       can't compile print/luatex any longer on Solaris 11, mprf.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    minskim
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 19 07:20:00 +0000 2017
>Last-Modified:  Mon May 22 19:45:47 +0000 2017
>Originator:     Joern Clausen
>Release:        
>Organization:
University of Bielefeldcan
>Environment:
>Description:
Compiling print/luatex suddenly fails on Solaris 11 with

gcc -DHAVE_CONFIG_H -I. -I./w2c  -I/usr/include -I/usr/include -I/opt/pkg-hrz/20170105/include/cairo -I/opt/pkg-hrz/20170105/include/pixman-1 -I/opt/pkg-hrz/20170105/include -I/opt/pkg-hrz/20170105/include/freetype2 -I/opt/pkg-hrz/20170105/include/libpng16 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT  -I/opt/pkg-hrz/20170105/include/pixman-1  -I/opt/pkg-hrz/20170105/include/libpng16  -I/opt/pkg-hrz/20170105/include -I/opt/pkg-hrz/20170105/lib -I/opt/pkg-hrz/20170105/include  -I./mplibdir -I/usr/include/gmp -I/opt/pkg-hrz/20170105/include -I/opt/pkg-hrz/20170105/include/freetype2 -I/usr/include -Wimplicit -Wreturn-type -Wdeclaration-after-statement -Wno-unknown-pragmas -O2 -std=gnu99 -D_XOPEN_SOURCE_EXTENDED=0 -I/usr/include/gmp -I/opt/pkg-hrz/20170105/include -I/opt/pkg-hrz/20170105/include/freetype2 -I/usr/include -MT libmplib_a-mp.o -MD -MP -MF .deps/libmplib_a-mp.Tpo -c -o libmplib_a-mp.o `test -f 'mp.c' || echo './'`mp.c
./mplibdir/mp.w:160:34: fatal error: mpfr.h: No such file or directory
 #include <mpfr.h>               /* for |MPFR_VERSION_STRING|, |mpfr_get_version()| */
                                  ^
compilation terminated.


math/mpfr is installed and mpfr.h is provided by that package. The dependency on mpfr is nothing new and I was able to build this package with the same compiler in the past.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: joern.clausen@uni-bielefeld.de
Subject: Re: pkg/52244: can't compile print/luatex any longer on Solaris 11,
 mprf.h
Date: Fri, 19 May 2017 07:50:03 +0000

 It seems we pass this as a CONFIGURE_ARGS:
 CONFIGURE_ARGS+=	--with-system-mpfr \
 			--with-mpfr-includes=${BUILDLINK_PREFIX.mpfr}/include \
 			--with-mpfr-libdir=${BUILDLINK_PREFIX.mpfr}/lib

 And in my case:
 $ make show-var VARNAME=BUILDLINK_PREFIX.mpfr
 /usr/pkg

 $ file /usr/pkg/include/mpfr.h
 /usr/pkg/include/mpfr.h: ASCII text

 Can double check with
 "make show-var VARNAME=CONFIGURE_ARGS" to see that it is indeed passed correctly.

 seems like it is supposed to be read by pkgsrc/print/luatex/work/texlive-20160523-source/texk/web2c/configure

 # Check whether --with-mpfr-includes was given.
 if test "${with_mpfr_includes+set}" = set; then :
   withval=$with_mpfr_includes;
 fi
 ..

 if test "x$with_system_mpfr" = xyes; then
   if test "x$with_mpfr_includes" != x && test "x$with_mpfr_includes" != xyes; then
   MPFR_INCLUDES="-I$with_mpfr_includes"
 fi

 Later, in some else case (I don't know what it is 'else' for, it's lacking
 appropriate indentation and ),
 else
   MPFR_INCLUDES="-I$kpse_BLD/libs/mpfr/include"
 ... more overrides ..

 I'm curious:
 - Double check that mpfr.h is indeed in ${BUILDLINK_PREFIX.mpfr}/include
   (cd pkgsrc/*/luatex; bmake show-var VARNAME=BUILDLINK_PREFIX.mpfr)
 - Double check that -I${BUILDLINK_PREFIX.mpfr}/include is passed in
   your case via CONFIGURE_ARGS (bmake show-var VARNAME=CONFIGURE_ARGS)
 - What is MPFR_INCLUDES? this should be in one of the config.log files.
   My quick route is find . -name config.log |xargs grep MPFR_INCLUDES,
   but it should probably be in
   work/texlive-20160523-source/texk/web2c/config.log

 If it starts wrong, I suspect it could be something wrong with the use of
 builtin mpfr.
 If it is wrong towards the end, it might be the else case - I'm not sure
 what it is 'else' for.
 If all those are correct, perhaps we need to check if some makefile is not
 using MPFR_INCLUDES.

From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/52244: can't compile print/luatex any longer on Solaris 11,
 mprf.h
Date: Fri, 19 May 2017 08:02:48 +0000

 Specifically mpfr/builtin.mk looks wrong.

From: =?UTF-8?Q?J=c3=b6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: coypu@sdf.org, gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52244: can't compile print/luatex any longer on Solaris 11,
 mprf.h
Date: Fri, 19 May 2017 10:31:44 +0200

 > And in my case:
 > $ make show-var VARNAME=BUILDLINK_PREFIX.mpfr
 > /usr/pkg

 Interesting:

 $ bmake show-var VARNAME=BUILDLINK_PREFIX.mpfr
 /usr

 And I was just about to open another PR regarding gmp not found for 
 security/gnutls:

 $ bmake show-var VARNAME=BUILDLINK_PREFIX.gmp
 /usr

 But other packages are found in the right spot:

 $ bmake show-var VARNAME=BUILDLINK_PREFIX.png
 /opt/pkg-hrz/20170105

 Both packages are installed, of course, and have been for a long time. I 
 see no significant changes in these packages (luatex, gnutls, mpfr and 
 gmp) since all this built a few weeks ago. Are there any changes in 
 pkgsrc's infrastructure (handling of GCC?) that can explain this? These 
 are two packages that are used when bootstrapping GCC, maybe this is 
 relevant.

 Joern

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 BITS - Bielefelder IT-Servicezentrum

 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/bits

From: =?UTF-8?Q?J=c3=b6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: coypu@sdf.org, gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52244: can't compile print/luatex any longer on Solaris 11,
 mprf.h
Date: Fri, 19 May 2017 10:44:19 +0200

 FWIW: security/nettle is another package using gmp, and here the 
 dependency is okay:

 $ bmake show-var VARNAME=BUILDLINK_PREFIX.gmp
 /opt/pkg-hrz/20170105

 and the package builds without problems.

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 BITS - Bielefelder IT-Servicezentrum

 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/bits

From: =?UTF-8?Q?J=c3=b6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: coypu@sdf.org, gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/52244: can't compile print/luatex any longer on Solaris 11,
 mprf.h
Date: Fri, 19 May 2017 11:00:02 +0200

 Aaaaaand I just tried this in an archived source tree of pkgsrc from 
 some time ago. Here in print/luatex

 $ bmake show-var VARNAME=BUILDLINK_PREFIX.gmp
 /opt/pkg-hrz/20160711

 I get the correct result.

 BTW: Is it correct that BUILDLINK_PREFIX.gmp is only defined when the 
 work directory is present?

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 BITS - Bielefelder IT-Servicezentrum

 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/bits

Responsible-Changed-From-To: pkg-manager->minskim
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Mon, 22 May 2017 19:45:47 +0000
Responsible-Changed-Why:
Over to maintainer.


>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-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.