NetBSD Problem Report #54903

From  Tue Jan 28 09:23:08 2020
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer " CA" (not verified))
	by (Postfix) with ESMTPS id D7CE67A110
	for <>; Tue, 28 Jan 2020 09:23:07 +0000 (UTC)
Message-Id: <>
Date: Tue, 28 Jan 2020 09:23:06 +0000 (UTC)
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
System: FreeBSD 12.0-RELEASE-p12 FreeBSD 12.0-RELEASE-p12 GENERIC  amd64
Architecture: x86_64
Machine: amd64
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

bmake[1]: stopped in /usr/pkgsrc/devel/libusb-compat
*** Error code 1

bmake: stopped in /usr/pkgsrc/devel/libusb-compat

The dependency devel/libusb1 is not build despite .include "../../devel/libusb1/"
cd /usr/pkgsrc/devel/libusb-compat && make configure



Responsible-Changed-From-To: pkg-manager->freebsd-pkg-people
Responsible-Changed-When: Tue, 28 Jan 2020 11:55:28 +0000
FreeBSD problem.

From: Sevan Janiyan <>
To: "" <>
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?


From: Frederic Fauberteau <>
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/ to use it.

From: Frederic Fauberteau <>
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/ 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/ in which we could define:
 BUILTIN_PKGCONFIG_DIRS?= /usr/lib/pkgconfig \
                          /usr/libdata/pkgconfig \

State-Changed-From-To: open->closed
State-Changed-When: Sat, 10 Oct 2020 14:20:04 +0000
devel/libusb1/ has been fixed.

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:
 Added Files:

 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/
 cvs rdiff -u -r1.14 -r1.15 pkgsrc/mk/buildlink3/
 cvs rdiff -u -r0 -r1.1 pkgsrc/mk/buildlink3/

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.