Bug 200976 - usr.sbin/fstype broken with WITHOUT_ZFS after r284589
Summary: usr.sbin/fstype broken with WITHOUT_ZFS after r284589
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Allan Jude
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-19 17:40 UTC by Dan McGregor
Modified: 2015-06-24 00:21 UTC (History)
2 users (show)

See Also:


Attachments
Patch to check against MK_ZFS instead of MK_CDDL (691 bytes, patch)
2015-06-19 17:40 UTC, Dan McGregor
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan McGregor 2015-06-19 17:40:09 UTC
Created attachment 157888 [details]
Patch to check against MK_ZFS instead of MK_CDDL

The Makefile checks WITHOUT_CDDL instead of WITHOUT_ZFS. If WITHOUT_ZFS is set independently the build fails with no libzfs can be found.
Comment 1 Oliver Pinter freebsd_committer 2015-06-21 14:07:55 UTC
Confirmed:

--- usr.sbin.all__D ---
cc  -O2 -pipe   -DNEED_SOLARIS_BOOLEAN -DHAVE_CDDL -I/usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp/../../sys/cddl/compat/opensolaris -I/usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp/../../cddl/compat/opensolaris/include -I/usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp/../../cddl/compat/opensolaris/lib/libumem -I/usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp/../../cddl/contrib/opensolaris/lib/libnvpair -I/usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp/../../cddl/contrib/opensolaris/lib/libzpool/common -I/usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp/../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs -I/usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp/../../sys/cddl/contrib/opensolaris/uts/common -I/usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp/../../sys/cddl/contrib/opensolaris/uts/common/sys -I/usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp/../../cddl/contrib/opensolaris/head -I/usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp/../../sys -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wno-unknown-pragmas -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments  -o fstyp cd9660.o ext2fs.o fstyp.o geli.o msdosfs.o ntfs.o ufs.o zfs.o -lgeom -lmd -lnvpair -lzfs
--- lib.all__D ---
mv cancel_test.tmp cancel_test
--- exit_test ---
--- usr.sbin.all__D ---
/var/tmp/amd64-objdir/usr/data/source/git/opBSD/opBSD.git/tmp/usr/bin/ld: cannot find -lzfs
--- lib.all__D ---
echo '#! /usr/libexec/atf-sh' > exit_test.tmp
cat /usr/data/source/git/opBSD/opBSD.git/contrib/netbsd-tests/lib/libpthread/t_exit.sh >>exit_test.tmp
--- usr.sbin.all__D ---
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [fstyp] Error code 1

make[4]: stopped in /usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp
1 error

make[4]: stopped in /usr/data/source/git/opBSD/opBSD.git/usr.sbin/fstyp
*** [all_subdir_fstyp] Error code 2

make[3]: stopped in /usr/data/source/git/opBSD/opBSD.git/usr.sbin
1 error

make[3]: stopped in /usr/data/source/git/opBSD/opBSD.git/usr.sbin
*** [usr.sbin.all__D] Error code 2
Comment 2 Allan Jude freebsd_committer 2015-06-21 15:53:33 UTC
Can you try the patch here:

https://reviews.freebsd.org/D2045

(Note: you might have problems with the WARNS= part of the patch)
Comment 3 commit-hook freebsd_committer 2015-06-23 16:35:44 UTC
A commit references this bug:

Author: allanjude
Date: Tue Jun 23 16:34:45 UTC 2015
New revision: 284728
URL: https://svnweb.freebsd.org/changeset/base/284728

Log:
  Switch fstyp build to toggle ZFS support on WITHOUT_ZFS rather than WITHOUT_CDDL

  PR:		200976
  Approved by:	imp
  MFC after:	1 week
  Sponsored by:	ScaleEngine Inc.
  Differential Revision:	https://reviews.freebsd.org/D2045

Changes:
  head/usr.sbin/fstyp/Makefile
  head/usr.sbin/fstyp/fstyp.c
  head/usr.sbin/fstyp/fstyp.h