NetBSD Problem Report #54903
From triaxx@netbsd.org Tue Jan 28 09:23:08 2020
Return-Path: <triaxx@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 "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id D7CE67A110
for <gnats-bugs@gnats.NetBSD.org>; Tue, 28 Jan 2020 09:23:07 +0000 (UTC)
Message-Id: <20200128092306.E92A67A1AB@mollari.NetBSD.org>
Date: Tue, 28 Jan 2020 09:23:06 +0000 (UTC)
From: triaxx@netbsd.org
Reply-To: triaxx@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: devel/libusb-compat configuration fails on FreeBSD
X-Send-Pr-Version: 3.95
>Number: 54903
>Category: pkg
>Synopsis: devel/libusb-compat configuration fails on FreeBSD
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-pkg-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 28 09:25:00 +0000 2020
>Closed-Date: Sat Oct 10 14:20:04 +0000 2020
>Last-Modified: Sat Oct 10 14:35:01 +0000 2020
>Originator: Frédéric Fauberteau
>Release: FreeBSD 12.0-RELEASE-p12
>Organization:
>Environment:
System: FreeBSD cocoon.triaxx.org 12.0-RELEASE-p12 FreeBSD 12.0-RELEASE-p12 GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
The configuration step fails with the following log:
===> Configuring for libusb-compat-0.1.7
[...]
checking for LIBUSB_1_0... no
configure: error: Package requirements (libusb-1.0 >= 0.9.1) were not met:
Package 'libusb-1.0', required by 'virtual:world', not found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBUSB_1_0_CFLAGS
and LIBUSB_1_0_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
*** Error code 1
Stop.
bmake[1]: stopped in /usr/pkgsrc/devel/libusb-compat
*** Error code 1
Stop.
bmake: stopped in /usr/pkgsrc/devel/libusb-compat
The dependency devel/libusb1 is not build despite .include "../../devel/libusb1/buildlink3.mk"
>How-To-Repeat:
cd /usr/pkgsrc/devel/libusb-compat && make configure
>Fix:
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->freebsd-pkg-people
Responsible-Changed-By: leot@NetBSD.org
Responsible-Changed-When: Tue, 28 Jan 2020 11:55:28 +0000
Responsible-Changed-Why:
FreeBSD problem.
From: Sevan Janiyan <sevan@NetBSD.org>
To: "gnats-bugs@netbsd.org" <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: pkg/54903: devel/libusb-compat configuration fails on FreeBSD
Date: Thu, 11 Jun 2020 00:04:39 +0100
libusb is builtin on FreeBSD and I don't believe they provide a
pkg-config file (or at least didn't used to). Could it be that the
builtin check is passing build buildlink is unable to do its thing
because of that?
Sevan
From: Frederic Fauberteau <triaxx@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/54903: devel/libusb-compat configuration fails on FreeBSD
Date: Wed, 7 Oct 2020 17:22:41 +0200
Yes, devel/libusb1 is builtin on FreeBSD and /usr/libdata/pkgconfig/libusb-1.0.pc is provided. I will update devel/libusb1/builtin.mk to use it.
From: Frederic Fauberteau <triaxx@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/54903: devel/libusb-compat configuration fails on FreeBSD
Date: Wed, 7 Oct 2020 19:01:28 +0200
Actually, the problem is not as easy to solve as I could let it think in my previous mail.
I have the feeling that devel/libusb1/builtin.mk produces an invalid .pc file because:
* LIBUSB_PREFIX is not defined
* BUILTIN_VERSION.libusb1 is not defined since PKGCONFIG_FILE.libusb1 is not defined
To fix the PR, I could define PKGCONFIG_FILE.libusb1= /usr/libdata/pkgconfig/libusb-1.0.pc but the path is different on other systems.
The solution of generating a .pc file seems to be complicated because the version is defined in /usr/include/libusb.h in the following manner:
/* Internally, LIBUSB_API_VERSION is defined as follows:
* (libusb major << 24) | (libusb minor << 16) | (16 bit incremental) */
#define LIBUSB_API_VERSION 0x01000102
Is there an objection if I try to add mk/buildlink3/find-pcfiles.mk in which we could define:
BUILTIN_PKGCONFIG_DIRS?= /usr/lib/pkgconfig \
/usr/libdata/pkgconfig \
/usr/lib/x86_64-linux-gnu/pkgconfig
State-Changed-From-To: open->closed
State-Changed-By: triaxx@NetBSD.org
State-Changed-When: Sat, 10 Oct 2020 14:20:04 +0000
State-Changed-Why:
devel/libusb1/builtin.mk has been fixed.
From: =?UTF-8?B?RnLDqWTDqXJpYyBGYXViZXJ0ZWF1?= <triaxx@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/54903 CVS commit: pkgsrc
Date: Sat, 10 Oct 2020 14:17:03 +0000
Module Name: pkgsrc
Committed By: triaxx
Date: Sat Oct 10 14:17:03 UTC 2020
Modified Files:
pkgsrc/devel/libusb1: builtin.mk
pkgsrc/mk/buildlink3: bsd.builtin.mk
Added Files:
pkgsrc/mk/buildlink3: find-pkgconfig-files.mk
Log Message:
libusb1: Fix PR pkg/54903
pkgsrc changes:
---------------
* Remove the pkgconfig file generation since the version of libusb1 cannot
be obtained by parsing LIBUSB_API_VERSION from libusb.h (e.g. FreeBSD
provides 0x01000102 for 1.0.13 and Arch provides 0x01000107 for 1.0.23).
* At least FreeBSD, Debian and Arch provides a libusb-1.0.pc file for
their native implementation. Link this file to ${BUILDLINK_DIR}.
* Add logic in mk/buildlink3 to find pkgconfig files in common pkgconfig
directories (for at least FreeBSD, Debian and Arch).
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/libusb1/builtin.mk
cvs rdiff -u -r1.14 -r1.15 pkgsrc/mk/buildlink3/bsd.builtin.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/mk/buildlink3/find-pkgconfig-files.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.