Bug 252757

Summary: WITHOUT_INSTALLLIB build option fails on usr.bin/fortune
Product: Base System Reporter: Michael Dexter <editor>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Some People    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Michael Dexter 2021-01-17 00:30:33 UTC
If WITHOUT_INSTALLLIB=YES is set in /etc/src.conf on 13.0-ALPHA1 amd64, the following error is generated:

--- _bootstrap-tools-usr.bin/fortune/strfile ---
cc: error: linker command failed with exit code 1 (use -v to see invocation)
--- _bootstrap-tools-usr.bin/mandoc ---
--- .depend ---
echo mandoc.full: /usr/lib/libc.a /usr/obj/usr/src/tools/tools/bos-ng/_.tst/usr/src/amd64.amd64/tmp/obj-tools/lib/libopenbsd/libopenbsd.a /usr/lib/libz.a /usr/obj/usr/src/tools/tools/bos-ng/_.tst/usr/src/amd64.amd64/tmp/legacy/usr/lib/libegacy.a >> .depend
--- _bootstrap-tools-usr.bin/fortune/strfile ---
*** [strfile.full] Error code 1

make[3]: stopped in /usr/src/usr.bin/fortune/strfile

This patch appears to address it but I cannot say if strfile should be excluded within fortune, or simply all of usr.bin/fortune when the build option is requested:

diff --git a/usr.bin/fortune/Makefile b/usr.bin/fortune/Makefile
index ed00d012cd37..4d9a36fbb693 100644
--- a/usr.bin/fortune/Makefile
+++ b/usr.bin/fortune/Makefile
@@ -2,9 +2,12 @@
 #
 # $FreeBSD$
 
-SUBDIR=        fortune strfile datfiles unstr
+SUBDIR=        fortune datfiles unstr
 
+.if ${WITHOUT_INSTALLLIB} == "no"
+SUBDIR+=        strfile
 SUBDIR_DEPEND_datfiles=        strfile
+.endif
 
 SUBDIR_PARALLEL=
Comment 1 Michael Dexter 2021-01-17 05:47:42 UTC
This was true as of the 2021-01-14 snapshot hash 7ae27c2d6c4
Comment 2 Michael Dexter 2021-01-23 23:09:37 UTC
Confirmed on FreeBSD 13.0-ALPHA2 built on 13.0-ALPHA2.

Full built output is linked from: https://callfortesting.org/results/bos-FreeBSD-13A1/
Comment 3 Michael Dexter 2021-01-30 03:04:36 UTC
Confirmed on FreeBSD 13.0-ALPHA3 built on 13.0-ALPHA3.
Comment 4 Michael Dexter 2021-01-30 03:12:43 UTC
Updated Importance
Comment 5 Michael Dexter 2022-02-12 23:32:37 UTC
Fixed