Bug 153049 - [build] PORTS_MODULES= seriously broken if port depends on an executable
Summary: [build] PORTS_MODULES= seriously broken if port depends on an executable
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-12 16:50 UTC by Pascal Stumpf
Modified: 2017-12-31 22:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Stumpf 2010-12-12 16:50:04 UTC
The PORTS_MODULES= variable in /etc/make.conf is supposed to automate
building and installing kernel modules from ports. However, it seems
there is a bug in the build system that breaks the build of any port
that depends on an executable (libraries are completely fine though).
Example:

cd ${PORTSDIR:-/usr/ports}/net/bwn-firmware-kmod; SYSDIR=/usr/src/sys make -B deinstall deinstall reinstall
===>  Deinstalling for net/bwn-firmware-kmod
===>   Deinstalling bwn-firmware-kmod-0.1.0
===>   bwn-firmware-kmod-0.1.0 depends on executable: b43-fwcutter - not found
===>    Verifying reinstall for b43-fwcutter in /usr/ports/sysutils/b43-fwcutter
===>  Installing for b43-fwcutter-012
===>   Generating temporary packing list
===>  Checking if sysutils/b43-fwcutter already installed
===>   b43-fwcutter-012 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of sysutils/b43-fwcutter
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop in /usr/ports/sysutils/b43-fwcutter.
*** Error code 1

Stop in /usr/ports/sysutils/b43-fwcutter.
*** Error code 1

Stop in /usr/ports/net/bwn-firmware-kmod.
*** Error code 1

Stop in /usr/ports/net/bwn-firmware-kmod.
*** Error code 1

Stop in /usr/obj/usr/src/sys/CUSTOM.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
/usr/src # which b43-fwcutter
/usr/local/bin/b43-fwcutter
/usr/src # 


Note how it fails to detect that b43-fwcutter even though it's present
on the system. This results in an attempted reinstall of
sysutils/b43-fwcutter, which fails because it is already installed.
Therefore, rebuilding net/bwn-firmware-kmod also fails.

Fix: 

I'm not an expert in the build system of /usr/src, but to me it seems
that $PATH ist not picked up from the environment (which it should be
when building ports).
Comment 1 Garrett Cooper 2012-06-09 20:24:08 UTC
Seems like a dupe of ports/161452 ; dougb has another patch out to
improve this as well:
http://lists.freebsd.org/pipermail/freebsd-current/2012-June/034526.html
. What should be committed is an intersection of the two patches.
-Garrett
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:12 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped