While building security/metasploit on FreeBSD10.3S, I experience consistent build failures with the textproc/rubygem-nokogiri dependency. It is not easy to reproduce! I build a large number of ports by passing to portmaster the main ports of interest, rubygem-nokogiri fails to "package". However if I build directly on the command line with "make package", the port completes. Examining the two log files provides a clue: With portmaster - and failure ===> Building for rubygem-nokogiri-1.6.8 Successfully built RubyGem Name: nokogiri Version: 1.6.8 File: nokogiri-1.6.8.gem ===> Staging for rubygem-nokogiri-1.6.8 ===> Generating temporary packing list (cd /var/ports/usr/ports/textproc/rubygem-nokogiri/work/nokogiri-1.6.8; /usr/bin/env RB_USER_INSTALL=yes LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_CTYPE=UTF-8 /usr/local/bin/gem22 install -l --no-update-sources --install-dir /var/ports/usr/ports/textproc/rubygem-nokogiri/work/stage/usr/local/lib/ruby/gems/2.2 --ignore-dependencies --bindir=/var/ports/usr/ports/textproc/rubygem-nokogiri/work/stage/usr/local/bin --no-rdoc --no-ri nokogiri-1.6.8.gem -- --build-args --use-system-libraries) Building native extensions with: '--build-args --use-system-libraries' This could take a while... ERROR: Error installing nokogiri-1.6.8.gem: ERROR: Failed to build gem native extension. With make - and success ===> Building for rubygem-pkg-config-1.1.7_1 Successfully built RubyGem Name: pkg-config Version: 1.1.7 File: pkg-config-1.1.7.gem ===> Staging for rubygem-pkg-config-1.1.7_1 ===> rubygem-pkg-config-1.1.7_1 depends on file: /usr/local/bin/ruby22 - found ===> rubygem-pkg-config-1.1.7_1 depends on file: /usr/local/bin/gem22 - found ===> Generating temporary packing list (cd /var/ports/usr/ports/devel/rubygem-pkg-config/work/pkg-config-1.1.7; /usr/bin/env RB_USER_INSTALL=yes LANG=en_U Successfully installed pkg-config-1.1.7 1 gem installed I haven't determined where the problem lies, but the "fix" is to =================================================================== --- /usr/ports/textproc/rubygem-nokogiri/Makefile (revision 424946) +++ /usr/ports/textproc/rubygem-nokogiri/Makefile (working copy) @@ -10,6 +10,7 @@ LICENSE= MIT +BUILD_DEPENDS= rubygem-pkg-config>=1.1.7:devel/rubygem-pkg-config RUN_DEPENDS= rubygem-pkg-config>=1.1.7:devel/rubygem-pkg-config USE_RUBY= yes and metasploit completes packaging :)
A commit references this bug: Author: swills Date: Mon Dec 5 20:04:34 UTC 2016 New revision: 427918 URL: https://svnweb.freebsd.org/changeset/ports/427918 Log: textproc/rubygem-nokogiri: fails to build PR: 213959 Submitted by: dewayne@heuristicsystems.com.au Changes: head/textproc/rubygem-nokogiri/Makefile
I think that is the right solution, so I went ahead and committed that. The RUN_DEPENDS may even not be needed, but no harm leaving it for now, I think. So, change committed, thanks!