Summary: | dns/bind918: 9.18.x fails to build | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Jonathan Chen <jonc> | ||||||
Component: | Individual Port(s) | Assignee: | Mathieu Arnold <mat> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Only Me | CC: | Trond.Endrestol, borjam, brd, chris, dvl, eugen, freebsd.bugs, fsbruva, fullermd, j.kelly.hays, lwhsu, majo-bugs.freebsd.org, me, michael.osipov, olivierw1+bugzilla-freebsd, swills, vvd | ||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(mat) |
||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262662 | ||||||||
Attachments: |
|
Description
Jonathan Chen
2022-03-25 01:49:43 UTC
There is some stuff on the Makefile that doesn't work with BSD Make. It can be avoided if you don't build the man pages. Otherwise, it builds with GNU Make. I told the ISC developers but they haven't said anything yet. Also, the MANPAGES option doesn´t really work. Even though I disabled it, it tried to build the manpages (and failed) because Sphinx is present. Adding gmake to the USES line fixes the build, but it won't install. # make install ===> Installing for bind918-9.18.1 ===> Checking if bind918 is already installed ===> Registering installation for bind918-9.18.1 pkg-static: Unable to access file /usr/ports/dns/bind918/work/stage/usr/local/include/dns/timer.h:No such file or directory pkg-static: Unable to access file /usr/ports/dns/bind918/work/stage/usr/local/lib/libbind9-9.18.0.so:No such file or directory pkg-static: Unable to access file /usr/ports/dns/bind918/work/stage/usr/local/lib/libdns-9.18.0.so:No such file or directory pkg-static: Unable to access file /usr/ports/dns/bind918/work/stage/usr/local/lib/libirs-9.18.0.so:No such file or directory pkg-static: Unable to access file /usr/ports/dns/bind918/work/stage/usr/local/lib/libisc-9.18.0.so:No such file or directory pkg-static: Unable to access file /usr/ports/dns/bind918/work/stage/usr/local/lib/libisccc-9.18.0.so:No such file or directory pkg-static: Unable to access file /usr/ports/dns/bind918/work/stage/usr/local/lib/libisccfg-9.18.0.so:No such file or directory pkg-static: Unable to access file /usr/ports/dns/bind918/work/stage/usr/local/lib/libns-9.18.0.so:No such file or directory *** Error code 1 The only way to build it, for now, is to remove Sphinx before building. And just adding gmake to USES doesn't fix it either despite the fact that extracting the original tarball and building manually works with gmake. Created attachment 232721 [details] patch to Makefile.docs The issue is caused by this upstream commit: https://gitlab.isc.org/isc-projects/bind9/-/commit/b42681c4e973fc819a42c36b18cfb59415d0fcba Here's a proposed patch, which is probably not 100% right, that at least avoids the build issue. Created attachment 232729 [details]
Patch for dns/bind918/pkg-plist
(In reply to Steve Wills from comment #3) I have tried your patch and it has no effect in 14.0-CURRENT of 2022-03-16 when the options DOCS and MANPAGES are on, by themselves or together. (In reply to Trond.Endrestol from comment #5) Admittedly my CURRENT is a bit old, it's from January. But also, I tested only on the upstream git repo, the patch was to be applied to the source, not the port, so some work to compensate for that may be required. (In reply to Steve Wills from comment #6) I was able to build BIND 9.18.1 with both of DOCS and MANPAGES active on a two week old CURRENT. I believe we can close this matter. (In reply to Trond.Endrestol from comment #7) I disagree. It fails to build for me on 12.3-RELEASE. I think it's because of this commit : https://cgit.freebsd.org/ports/commit/?id=279801056eb46b74ce3828a77a7b679225817a2d I should have been more clear: I had DOCS and MANPAGES unset, but because I happened to have Sphinx installed, the build failed. When I remove sphinx, the build succeeds with those two options unset. If I set DOCS and rebuild bind, sphinx installs, and both bind and bind-tools also build/install successfully. If I unset DOCS and rebuild bind, the build fails with Warning, treated as error: ../../bin/delv/delv.rst:105:Undefined substitution referenced: "bind_keys". *** Error code 2 This bug affects dns/bind-tools as well: ... Warning, treated as error: ../../bin/delv/delv.rst:105:Undefined substitution referenced: "bind_keys". *** Error code 2 Stop. make[5]: stopped in /usr/ports/dns/bind-tools/work/bind-9.18.2/doc/man *** Error code 1 Stop. make[4]: stopped in /usr/ports/dns/bind-tools/work/bind-9.18.2/doc *** Error code 1 Stop. make[3]: stopped in /usr/ports/dns/bind-tools/work/bind-9.18.2 *** Error code 1 Stop. make[2]: stopped in /usr/ports/dns/bind-tools/work/bind-9.18.2 *** Error code 1 Stop. make[1]: stopped in /usr/ports/dns/bind-tools *** Error code 1 Stop. make: stopped in /usr/ports/dns/bind-tools bind9.18.2 builds fine now. I don't think this bug report should have been closed. Bind 9.18.2 (with current port tree) still does not build properly for me on 12.3-RELEASE-p5: --- Warning, treated as error: ../../bin/delv/delv.rst:105:Undefined substitution referenced: "bind_keys". *** Error code 2 Stop. make[7]: stopped in /tmp/portbuild/usr/ports/dns/bind-tools/work/bind-9.18.2/doc/man *** Error code 1 *** Error code 1 *** Error code 1 *** Error code 1 Stop. make[3]: stopped in /usr/ports/dns/bind-tools *** Error code 1 Stop. make[2]: stopped in /usr/ports/dns/bind-tools *** Error code 1 Stop. make[1]: stopped in /usr/ports/dns/bind918 *** Error code 1 Stop. make: stopped in /usr/ports/dns/bind918 --- This happens when doing a clean build (no other packages are installed, just `make install` in /usr/ports/dns/bind918. If fails even when both DOCS and MAN pages are disabled. However, when I first install dns/bind-tools, than it builds fine and I can subsequently also build dns/bind918. So the workaround is to first build dns/bind-tools separately and than to build dns/bind918. I do not have dns/bind918 installed, but the build of dns/bind-tools was still failing for me (see the error messages in my previous comment). I've tried uninstalling the port completely and installing again, and it worked. In case I encounter errors again, I will open a new bug report for dns/bind-tools. Re-open as problem reproduces with 9.18.3 Opening this again because it still fails same way while building bind-tools-9.18.4 with MANPAGES option disabled and these ports installed: # pkg info -x sphinx py37-sphinx-4.3.1,1 py37-sphinx_rtd_theme-1.0.0 py37-sphinxcontrib-applehelp-1.0.2 py37-sphinxcontrib-devhelp-1.0.2 py37-sphinxcontrib-htmlhelp-2.0.0 py37-sphinxcontrib-jsmath-1.0.1 py37-sphinxcontrib-qthelp-1.0.3 py37-sphinxcontrib-serializinghtml-1.1.5 Dear maintainer, please do not close the Problem Report silently if you cannot reproduce it but ask for additional info you may need. If I deinstall all sphinx* packages cited above, the build succeeds. The removal cannot be accepted as solution, though. I hit this as well in a jail (12.3-RELEASE-p6) and the tentative fix seems easy for me: root@deblndw013x2j:/usr/ports/dns/bind-tools # vim ../bind918/Makefile ## line 44, append 'gmake' to USES root@deblndw013x2j:/usr/ports/dns/bind-tools # nsupdate -V nsupdate 9.18.5 root@deblndw013x2j:/usr/ports/dns/bind-tools # stat $(which nsupdate) 15065098060456364396 316766 -r-xr-xr-x 1 root wheel 18446744073709551615 66248 "Aug 22 10:52:37 2022" "Aug 22 10:52:37 2022" "Aug 22 10:56:44 2022" "Aug 22 10:52:37 2022" 66560 81 0x800 /usr/local/bin/nsupdate Can this Make be fixed until upstream has a better solution? Upstream issue: https://gitlab.isc.org/isc-projects/bind9/-/issues/3233 Next quarterly branch is approaching...unless someone can make it work with BSD make, please add 'gmake' to USES and let's move it for now. Just tried on branch 'head' from today. It work. I don't quite understand how the sphinx ports get installed, if the MANPAGES option is not enabled, they should not get pulled in. Also, the quarterly repository will contain packages, we ship MANPAGES by default. (In reply to Mathieu Arnold from comment #20) It exists from previous builds (options change) or another installed port has pulled it in. But, I don't understand, ports are built in clean jails by poudriere, how can there be stuff from other ports. Or is it a dependency of bind-tools that brings them in? (In reply to Mathieu Arnold from comment #23) In real life, you machine runs off ports, hundreds of ports are installed. The likelihood that another port requires it is still present. The problem is, if I am not wrong. (I compiled it by myself before it was supported by a port). ./configure checks for sphinx. In case sphinx is present (and it will be demanded if DOCS is enabled) the Makefile breaks. The current build process is a mess, getting more and more convoluted. And bind is a critical piece of software that should be possible to update in a second with no fancy stuff. Frankly, if I was one of the developers I would never add a dependency on a complex package just in order to substitute the correct PATH for the config files on the manpage. Well, in real life, machines runs of packages, not ports, I was not even aware people still used ports, like in the 90s. My company has not used ports for like almost a decade ever since poudriere got there. I'll check into the configure checks, there should be some ac_* macro that can say there is no sphinx. Actually I prefer ports for most stuff. There are always important compile time configuration options and I prefer to know what's going on. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=963e20c81248fad134a246950a470f2b41e6a74f commit 963e20c81248fad134a246950a470f2b41e6a74f Author: Mathieu Arnold <mat@FreeBSD.org> AuthorDate: 2022-09-28 14:05:04 +0000 Commit: Mathieu Arnold <mat@FreeBSD.org> CommitDate: 2022-09-28 14:09:43 +0000 dns/bind918: fix build in some obscure cases If sphinx is installed while not requested, it gets picked up, tell configure that it really is not here, and things blow up. PR: 262773 MFH: yes dns/bind918/Makefile | 4 ++++ 1 file changed, 4 insertions(+) A commit in branch 2022Q3 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e629fd76022cf72d6c2bb35816fa8c082143172d commit e629fd76022cf72d6c2bb35816fa8c082143172d Author: Mathieu Arnold <mat@FreeBSD.org> AuthorDate: 2022-09-28 14:05:04 +0000 Commit: Mathieu Arnold <mat@FreeBSD.org> CommitDate: 2022-09-28 14:10:54 +0000 dns/bind918: fix build in some obscure cases If sphinx is installed while not requested, it gets picked up, tell configure that it really is not here, and things blow up. PR: 262773 MFH: yes (cherry picked from commit 963e20c81248fad134a246950a470f2b41e6a74f) dns/bind918/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (In reply to Mathieu Arnold from comment #26) Why? Ports just perfectly work? I you can leave out what you don't need. Yet another problem I cannot solve with poudriere: https://github.com/freebsd/poudriere/issues/883 and https://github.com/freebsd/poudriere/issues/881. For now, it is too much effort to produce a superset of all ports on all hosts I use for now. (In reply to commit-hook from comment #28) This patch does not work: root@deblndw013x3j:/var/tmp/freebsd-ports-head/dns/bind-tools (main *%=) # cat /var/db/ports/dns_bind-tools/options # This file is auto-generated by 'make config'. # Options for bind-tools-9.16.27_1 _OPTIONS_READ=bind-tools-9.16.27_1 _FILE_COMPLETE_OPTIONS_LIST=FIXED_RRSET IDN JSON LARGE_FILE MANPAGES PYTHON GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT GSSAPI_NONE NATIVE_PKCS11 OPTIONS_FILE_UNSET+=FIXED_RRSET OPTIONS_FILE_UNSET+=IDN OPTIONS_FILE_UNSET+=JSON OPTIONS_FILE_UNSET+=LARGE_FILE OPTIONS_FILE_UNSET+=MANPAGES OPTIONS_FILE_UNSET+=PYTHON OPTIONS_FILE_UNSET+=GSSAPI_BASE OPTIONS_FILE_UNSET+=GSSAPI_HEIMDAL OPTIONS_FILE_SET+=GSSAPI_MIT OPTIONS_FILE_UNSET+=GSSAPI_NONE OPTIONS_FILE_UNSET+=NATIVE_PKCS11 ... ./cfg_test --zonegrammar in-view > in-view.zoneopt /usr/bin/make all-am Making all in man echo "" no -b man -d ./_build/.doctrees/man -W -c . -a -n -D version="@""PACKAGE_VERSION@" -D today="@""RELEASE_DATE@" -D release="@""PACKAGE_VERSION@" -D rst_epilog="$(printf "${man_RST_EPILOG}")" . ./_build/man /bin/sh: no: not found *** Error code 127 Stop. make[5]: stopped in /var/tmp/freebsd-ports-head/dns/bind-tools/work/bind-9.18.7/doc/man =============================== This works: root@deblndw013x3j:/var/tmp/freebsd-ports-head/dns/bind-tools (main *%=) # git diff ../bind918/ diff --git a/dns/bind918/Makefile b/dns/bind918/Makefile index 1e9a31a9ab57..bc2ec0d6c3ee 100644 --- a/dns/bind918/Makefile +++ b/dns/bind918/Makefile @@ -178,7 +178,7 @@ BUILD_DEPENDS+= cmocka>0:sysutils/cmocka .endif .if !${PORT_OPTIONS:MMANMAGES} && !${PORT_OPTIONS:MDOCS} -CONFIGURE_ENV+= ac_cv_path_SPHINX_BUILD=no +CONFIGURE_ENV+= ac_cv_path_SPHINX_BUILD=: .endif .include <bsd.port.pre.mk> Same behavior as with xelatex. (In reply to Michael Osipov from comment #31) Confirmed. It actually seems to be a combination of regressions. There is a syntax error caused by a typo.... it's instead of evaluating PORT_OPTIONS:MMANPAGES variable, the patch evaluates PORT_OPTIONS:MMANMAGE. The magical manual Mages variable is never set, causing the current patch to ignores the specified value for MANPAGES. This makes the patch only depends on the value of "DOCS", which is set in the master port, and invisible in the slave port. Your proposed patch works for me, as well. Additionally, and out of scope of this bug, there is also an upstream bug for its (mis)treatment of the SPHINX_BUILD environment value. I tried a patch based on the ./configure help, which indicates that it respects the SPHINX_BUILD environmental variable. I was pursuing this rather than directly manipulating autoconf variables that may change in the future. However, when I set the environmental variable SPHINX_BUILD=:, the resulting build config is inconsistent. The HAVE_SPHINX_BUILD_FALSE value is set to '#', and the _TRUE variable is empty. However, the latter parts of ./configure still look for and use the found sphinx. For now, the ac_cv_ method must be used. Now d62fd2d7200ae3bda310e9dd5d88cdbd71191518 has been committed, but the problem still persists. "no" is considered as the script name of sphinx. Please evaluate the colon value. I encountered this build problem earlier today. However, I just successfully built bind-tools-9.18.7 with poudriere on FreeBSD 12.3 and 13.1 Build logs: * https://services.unixathome.org/poudriere/build.html?mastername=131amd64-default-wikis&build=2022-09-30_16h33m10s * https://services.unixathome.org/poudriere/build.html?mastername=123amd64-default-webs02&build=2022-09-30_16h33m15s (In reply to Dan Langille from comment #34) I am able to build bind-tools 9.18.7. Are you able to build bind itself with poudriere? When I attempt to upgrade bind itself (with DOC and MANPAGE unset), it fails. The Makefile ac_cv_path_SPHINX_BUILD=no is a syntax error. It must be ac_cv_path_SPHINX_BUILD=:. /usr/bin/make all-am Making all in man echo "" no -b man -d ./_build/.doctrees/man -W -c . -a -n -D version="@""PACKAGE_VERSION@" -D today="@""RELEASE_DATE@" -D release="@""PACKAGE_VERSION@" -D rst_epilog="$(printf "${man_RST_EPILOG}")" . ./_build/man /bin/sh: no: not found *** Error code 127 Stop. make[5]: stopped in /usr/ports/dns/bind918/work/bind-9.18.7/doc/man *** Error code 1 *** Error code 1 *** Error code 1 *** Error code 1 Stop. make[1]: stopped in /usr/ports/dns/bind918 *** Error code 1 Stop. make: stopped in /usr/ports/dns/bind918 (In reply to fsbruva from comment #35) I just built it with both DOCS=on and MANPAGES=on: * https://services.unixathome.org/poudriere/build.html?mastername=131amd64-default-primary&build=2022-09-30_18h53m11s With both off, it fails: * https://services.unixathome.org/poudriere/build.html?mastername=131amd64-default-primary&build=2022-09-30_19h05m35s The committed patch is broken, the correct patch is in comment 31 (In reply to Michael Osipov from comment #31) Same error here with 9.18.7 and mentioned change solves the problem for me, too. Confirmed, this patch fix build: -CONFIGURE_ENV+= ac_cv_path_SPHINX_BUILD=no +CONFIGURE_ENV+= ac_cv_path_SPHINX_BUILD=: Can please any ports committer just commit this patch? A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d22c2932f114852aaaddd4f2f1492a8ba3e1218c commit d22c2932f114852aaaddd4f2f1492a8ba3e1218c Author: Eugene Grosbein <eugen@FreeBSD.org> AuthorDate: 2022-10-11 21:31:39 +0000 Commit: Eugene Grosbein <eugen@FreeBSD.org> CommitDate: 2022-10-11 21:31:39 +0000 dns/bind918: unbreak build with docs excluded This is correction after latest mat's change to make it really work. Default build unaffected, so PORTREVISON not bumped. PR: 262773 Approved by: mat (maintainer timeout, 2 weeks) Submitted by: Michael Osipov Requested by: many dns/bind918/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (In reply to commit-hook from comment #41) This bug is also present on 2022Q4. Please cherry-pick the commit to quarterly as well. (In reply to Michael Osipov from comment #42) The change does not affect package build. (In reply to Eugene Grosbein from comment #43) ??? I am running my servers off quarterly ports. It affects all ports users. (In reply to Michael Osipov from comment #44) I thought that quarterly branch has worth for package users only. What's the point in not using ports head if you build ports yourself? :-) (In reply to Eugene Grosbein from comment #45) I don't need constant changes from head. I am fine with quarterly for ports. End of months I do test everything then switch the servers to next quarterly. (In reply to Eugene Grosbein from comment #43) From this discussion it looks like using ports for other purposes than for building packages using poudriere starts to be frowned upon. I understand minority is using ports nowadays, however I think ports should still be supported. At least the Handbook as its own section about Using the Ports Collection. By having this attitude I understand you don't see a reason to merge the fix to the quarterly branch. Personally, I also think it's not that important to merge it to quarterly. The bug has been there for 7 months and it's just another 1.5 months for the next quarterly branch and there is a workaround. However it's hard for me to judge how many people would benefit from the merge. (In reply to Marián Černý from comment #47) No, I'm just short of time. I'm going to merge it soon. (In reply to Marián Černý from comment #47) I agree with you. Ports are an extremely useful mechanism and one of the key aspects that make FreeBSD much more useful than other systems. Many software packages have important compile time options. Which of them are used on built packages? Do they suit your configuration? Do you need those options with the added dependency complexity? Especially for critical software such as bind it should be possible to build a port without any hassles. I guess few of us are still building software for ports. Maybe people get too comfortable with packages even when it means losing functionality. I remember when everyone used the Apache prefork engine despite being much less effective just because packages were built for prefork. (In reply to Borja Marcos from comment #49) Exactly! Ports are crucial because here in many cases the default package options do not cover our needs at all. What then? E.g., I need everything with MIT Kerberos. Only ports make that happen. A commit in branch 2022Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=764dc7d876ba5e40892cf153d500da30d45579f0 commit 764dc7d876ba5e40892cf153d500da30d45579f0 Author: Eugene Grosbein <eugen@FreeBSD.org> AuthorDate: 2022-10-11 21:31:39 +0000 Commit: Eugene Grosbein <eugen@FreeBSD.org> CommitDate: 2022-10-13 08:34:10 +0000 dns/bind918: MFH: unbreak build with docs excluded This is correction after latest mat's change to make it really work. Default build unaffected, so PORTREVISON not bumped. PR: 262773 Approved by: mat (maintainer timeout, 2 weeks) Submitted by: Michael Osipov Requested by: many (cherry picked from commit d22c2932f114852aaaddd4f2f1492a8ba3e1218c) dns/bind918/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) |