Bug 255999

Summary: dns/libidn2 build failure
Product: Ports & Packages Reporter: oz42
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Only Me CC: cyberbotx, gessel, oz42
Priority: --- Flags: bugzilla: maintainer-feedback? (sunpoet)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Fix libidn2 doc geneartion
cyberbotx: maintainer-approval?
Patch dns/libidn2 Makefile to not build documentation
none
Patch dns/libidn2/pkg-plist patch to not try to install documentation none

Description oz42 2021-05-19 13:32:57 UTC
/usr/bin/make  all-am
Making all in fuzz
Making all in po
Making all in doc
/bin/sh /usr/ports/dns/libidn2/work/libidn2-2.3.1/build-aux/missing help2man --include=./idn2.h2m  --output=idn2.1 ../src/idn2
/usr/bin/make  all-recursive
Making all in reference
../src/idn2 --help | /usr/bin/grep '^ \+-' > tmp
*** [idn2--help.texi] Error code 1

make[5]: stopped in /usr/ports/dns/libidn2/work/libidn2-2.3.1/doc
1 error
Comment 1 oz42 2021-05-19 13:41:30 UTC
No idea what happens there:

root@betsy:/usr/ports/dns/libidn2/work/libidn2-2.3.1/doc # /usr/bin/make  all-recursive
Making all in reference
../src/idn2 --help | /usr/bin/grep '^ \+-' > tmp
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/dns/libidn2/work/libidn2-2.3.1/doc
*** Error code 1

root@betsy:/usr/ports/dns/libidn2/work/libidn2-2.3.1/doc # ../src/idn2 --help | /usr/bin/grep '^ \+-'
root@betsy:/usr/ports/dns/libidn2/work/libidn2-2.3.1/doc #
Comment 2 Naram Qashat 2021-05-26 16:37:57 UTC
Out of curiosity, why doesn't this port use the DOCS option? Sure it wouldn't fix this problem, but it would allow a way around it in the meantime until the problem can be resolved (at least for anyone who unsets the DOCS option, that is).
Comment 3 Naram Qashat 2021-05-27 17:31:30 UTC
Created attachment 225322 [details]
Fix libidn2 doc geneartion

Well, I did a bit of digging, the reason for the error code 1 is because we were using BSD Grep for our system grep but libidn2's doc generation expects GNU Grep. The attached patch forces the port to use GNU Grep from ports.
Comment 4 gessel 2021-06-04 22:25:52 UTC
Created attachment 225555 [details]
Patch dns/libidn2 Makefile to not build documentation
Comment 5 gessel 2021-06-04 22:26:46 UTC
Created attachment 225556 [details]
Patch dns/libidn2/pkg-plist patch to not try to install documentation
Comment 6 gessel 2021-06-04 22:33:38 UTC
I came up with a far less elegant solution: just don't build documentation.  I attached the patches, but Naram Qashat's should be the better solution to the problem, however when I tried that patch I got:

make: "/usr/ports/dns/libidn2/Makefile" line 15: Unassociated shell command "${LOCALBASE}/bin/grep:textproc/gnugrep"
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/ports/dns/libidn2
Comment 7 Po-Chuan Hsieh freebsd_committer 2021-07-24 10:49:04 UTC
This should be fixed in libidn2 2.3.2. Thanks!