Bug 200752 - [patch] devel/libvirt: bad BUILD_DEPENDS with sasl support
Summary: [patch] devel/libvirt: bad BUILD_DEPENDS with sasl support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jason Helfman
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-06-10 02:27 UTC by SASAKI Katuhiro
Modified: 2015-06-15 20:53 UTC (History)
0 users

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


Attachments
Removes "SASL_BUILD_DEPENDS" line (433 bytes, patch)
2015-06-10 02:27 UTC, SASAKI Katuhiro
no flags Details | Diff
Log file of building & installing devel/libvirt with environmen security/cyrus-sasl2 already installed. (177.96 KB, text/plain)
2015-06-14 18:18 UTC, SASAKI Katuhiro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description SASAKI Katuhiro 2015-06-10 02:27:28 UTC
Created attachment 157596 [details]
Removes "SASL_BUILD_DEPENDS" line

If SASL option is enabled, fails to build below.
Although security/cyrus-sasl2 port does not install "sasl" executable, but "SASL_BUILD_DEPENDS=sasl:${PORTSDIR}/security/cyrus-sasl2" is specified. This is wrong. And, because SASL_LIB_DEPENDS was already added in Makefile, I think SASL_BUILD_DEPENDS is not needed.
My patch only removes "SASL_BUILD_DEPENDS" line.

> % sudo portmaster -gdw --delete-build-only devel/libvirt
> 
> portmaster: libvirt-1.2.16
> ===>>> Currently installed version: libvirt-1.2.16
> ===>>> Port directory: /usr/ports/devel/libvirt
> 
> ===>>> Gathering distinfo list for installed ports
> 
> ===>>> Launching 'make checksum' for devel/libvirt in background
> ===>>> Gathering dependency list for devel/libvirt from ports
> ===>>> Initial dependency check complete for devel/libvirt
> 
> ===>>> Starting build for devel/libvirt <<<===
> 
> ===>>> All dependencies are up to date
> 
> ===>   libvirt-1.2.16 depends on executable: dnsmasq - found
> ===>   libvirt-1.2.16 depends on executable: sasl - not found
> ===>    Verifying install for sasl in /usr/ports/security/cyrus-sasl2
> ===>  Installing for cyrus-sasl-2.1.26_9
> ===>   cyrus-sasl-2.1.26_9 depends on shared library: libpq.so.5 - found (/usr/local/lib/libpq.so.5)
> ===>   cyrus-sasl-2.1.26_9 depends on shared library: libmysqlclient.so.18 - found (/usr/local/lib/mysql/libmysqlclient.so.18)
> ===>   cyrus-sasl-2.1.26_9 depends on shared library: libdb-5.3.so - found (/usr/local/lib/libdb-5.3.so)
> ===>   cyrus-sasl-2.1.26_9 depends on shared library: libsqlite3.so - found (/usr/local/lib/libsqlite3.so)
> ===>  Checking if cyrus-sasl already installed
> ===>   cyrus-sasl-2.1.26_9 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 cyrus-sasl
>       without deleting it first, set the variable "FORCE_PKG_REGISTER"
>       in your environment or the "make install" command line.
> *** Error code 1
> 
> Stop.
> make[3]: stopped in /usr/ports/security/cyrus-sasl2
> *** Error code 1
> 
> Stop.
> make[2]: stopped in /usr/ports/security/cyrus-sasl2
> *** Error code 1
> 
> Stop.
> make[1]: stopped in /usr/ports/devel/libvirt
> *** Error code 1
> 
> Stop.
> make: stopped in /usr/ports/devel/libvirt
> 
> ===>>> make build failed for devel/libvirt
> ===>>> Aborting update
Comment 1 Jason Helfman freebsd_committer freebsd_triage 2015-06-10 16:59:45 UTC
Can you please attach a build log of the port with your patch? Do you use SASL option, or were you just testing the port? If you do you this option, and it builds, is there any functional difference in the port when using it with your patch?

Thanks!
jgh
Comment 2 SASAKI Katuhiro 2015-06-14 18:18:01 UTC
Created attachment 157733 [details]
Log file of building & installing devel/libvirt with environmen security/cyrus-sasl2 already installed.

I tested "time (sudo sh -c "make configure && make all -j2 && make deinstall install package clean")" at /usr/ports/devel/libvirt and atattched log file.

> Do you use SASL option, or were you just testing the port?
> 
Only testing at now.

> If you do you this option, and it builds, is there any functional difference in the port when using it with your patch?

If I enable SASL option. Below BUILD_DEPENDS and LIB_DEPENDS are used.
--
SASL_BUILD_DEPENDS=sasl:${PORTSDIR}/security/cyrus-sasl2
SASL_LIB_DEPENDS=libsasl2.so:${PORTSDIR}/security/cyrus-sasl2

The later, LIB_DEPENDES does not have any problem. But the former, BUILD_DEPENDS has problem.
The security/cyrus-sasl2 port does not install "sasl" executable. So, in the situation security/cyrus-sasl2 is already installed, installing devel/libvirt will always fail. Because, the devel/libvirt determins that security/cyrus-sasl2 is installed or not by checking "sasl" executable is present or not. And it is not present any time. So, devel/libvirt is going to install security/cyrus-sasl2 anyway. Of courese, when security/cyrus-sasl2 is installed, installing security/cyrus-sasl2 runs into error, if FORCE_PKG_REGISTER is not set.
These descriptions are about what happens when the errors in attached log file ocurred.

From the first, when LIB_DEPENDS is already defined, is there any reason why BUILD_DEPENDS must be defined?

Thank you.
Comment 3 Jason Helfman freebsd_committer freebsd_triage 2015-06-15 20:53:01 UTC
Thanks for the report!

-jgh
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-06-15 20:53:32 UTC
A commit references this bug:

Author: jgh
Date: Mon Jun 15 20:52:42 UTC 2015
New revision: 389751
URL: https://svnweb.freebsd.org/changeset/ports/389751

Log:
  - remove unneeded BUILD_DEPENDS define for SASL option

  PR:		200752
  Submitted by:	crest@sahiro.org

Changes:
  head/devel/libvirt/Makefile