NetBSD Problem Report #51983

From www@NetBSD.org  Sat Feb 18 19:15:53 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 DF9397A169
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 18 Feb 2017 19:15:53 +0000 (UTC)
Message-Id: <20170218191552.A21B97A28D@mollari.NetBSD.org>
Date: Sat, 18 Feb 2017 19:15:52 +0000 (UTC)
From: org.netbsd@pooryorick.com
Reply-To: org.netbsd@pooryorick.com
To: gnats-bugs@NetBSD.org
Subject: valgrind - libmpiwrap.c:116:17: fatal error: mpi.h: No such file or directory
X-Send-Pr-Version: www-1.0

>Number:         51983
>Category:       pkg
>Synopsis:       valgrind - libmpiwrap.c:116:17: fatal error: mpi.h: No such file or directory
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Feb 18 19:20:00 +0000 2017
>Last-Modified:  Wed Feb 20 10:17:19 +0000 2019
>Originator:     Poor Yorick
>Release:        2016Q4
>Organization:
>Environment:
Linux xxx 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
>Description:
Building valgrind:

    /path/to/bin/mpicc    -I../include  -g -O -fno-omit-frame-pointer -Wall -fpic -m64 -Wno-deprecated-declarations  -MT libmpiwrap_amd64_linux_so-libmpiwrap.o -MD -MP -MF .deps/libmpiwrap_amd64_linux_so-libmpiwrap.Tpo -c -o libmpiwrap_amd64_linux_so-libmpiwrap.o `test -f 'libmpiwrap.c' || echo './'`libmpiwrap.c
libmpiwrap.c:116:17: fatal error: mpi.h: No such file or directory
compilation terminated.

The underlying problem here is that gcc5, which installs in pkgsrc/gcc5,
doesn't include ${PREFIX}/include in its set of search directories.  Furthermore, gcc5/Makefile includes this:

    CONFIGURE_ARGS+=  --with-local-prefix=${GCC_PREFIX:Q}

which is redundant, because that's what ${PREFIX} gets set to, which already
ensures  that $GCC_PREFIX will end up in the search paths for gcc.  A more productive use for --with-local-prefix would be to ensure that the standard include directory, i.e., ${LOCALBASE}/include is also on the search path for gcc:


    .if ${PREFIX} != ${LOCALBASE}
    CONFIGURE_ARGS+=  --with-local-prefix=${LOCALBASE:Q}
    .endif

And with that change, assuming mpi is installed, valgrind now builds
succesfully, with mpi enabled.

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.