Bug 226858 - devel/py-libzfs: Build fails with IGNORE'd error even though kernel sources are installed
Summary: devel/py-libzfs: Build fails with IGNORE'd error even though kernel sources a...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
Depends on:
Reported: 2018-03-22 23:39 UTC by Serge
Modified: 2018-10-12 13:22 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (wg)


Note You need to log in before you can comment on or make changes to this bug.
Description Serge 2018-03-22 23:39:05 UTC
FreeBSD 11.1-RELEASE-p8 
I am trying to build py-libzfs with portmaster and even though system sources are installed properly, it still fails with the error:

===>>> Port directory: /usr/ports/devel/py-libzfs

	===>>> This port is marked IGNORE
	===>>> requires kernel source files in /usr/src

	===>>> If you are sure you can build it, remove the
	       IGNORE line in the Makefile and try again.

I am able to build the port normally if I remove the following lines from the port Makefile:

.if !exists(${SRC_BASE}/sys/Makefile)
IGNORE=       requires kernel source files in ${SRC_BASE}

It looks like at the point of checking for ${SRC_BASE}/sys/Makefile, the variable SRC_BASE is not yet defined, always triggering the IGNORE error.

If I move the .include <bsd.port.mk> in front of the check, it can be done normally and only triggers the error if ${SRC_BASE}/sys/Makefile is not present.

This is not that much of a problem, but the way it is now, the kernel source check does not work, at least on my machine.
Comment 1 commit-hook freebsd_committer 2018-10-12 13:22:00 UTC
A commit references this bug:

Author: tobik
Date: Fri Oct 12 13:21:31 UTC 2018
New revision: 481901
URL: https://svnweb.freebsd.org/changeset/ports/481901

  devel/py-libzfs: Fix build on systems that are missing the /sys symlink

  SRC_BASE is defined in bsd.port.mk and cannot be used in conditionals

  PR:		226858
  Reported by:	skh1002@hotmail.com
  Approved by:	wg (maintainer timeout, 6 months)