Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing dependencies to ./copy-builtin #854

Closed
wants to merge 1 commit into from

Conversation

ryao
Copy link
Contributor

@ryao ryao commented Jul 29, 2012

ZFS depends on EFI_PARTITION, ZLIB_DEFLATE and ZLIB_INFLATE, but when
ZFS is integrated with the kernel source tree, menuconfig does not
enforce these dependencies. This can cause build failures in the case of
ZLIB_DEFLATE and ZLIB_INFLATE where symbols are not found. This can also
cause runtime failures in the case of EFI_PARTITION, where the kernel
will not understand GPT partitions when creating pools from raw disks.
We solve this by making menuconfig aware of these dependencies.

Signed-off-by: Richard Yao ryao@cs.stonybrook.edu

ZFS depends on EFI_PARTITION, ZLIB_DEFLATE and ZLIB_INFLATE, but when
ZFS is integrated with the kernel source tree, menuconfig does not
enforce these dependencies. This can cause build failures in the case of
ZLIB_DEFLATE and ZLIB_INFLATE where symbols are not found. This can also
cause runtime failures in the case of EFI_PARTITION, where the kernel
will not understand GPT partitions when creating pools from raw disks.
We solve this by making menuconfig aware of these dependencies.

Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
@dechamps
Copy link
Contributor

If I understand this correctly, if the kernel doesn't have the necessary features, in-tree compilation will fail. Does out-of-tree compilation fail too, and if not, why?

@behlendorf
Copy link
Contributor

Many distributions build with ZLIB_DEFLATE and ZLIB_INFLATE as modules which would be OK for an out of tree compilation. However, I image this would be fatal for an in-tree compilation unless CONFIG_ZFS was also being built as a module.

@behlendorf
Copy link
Contributor

Although... the ZLIB_* dependencies perhaps more correctly belong with the spl module. And it wouldn't be a bad idea to add a configure check to ensure your kernel was built with EFI_PARTITION since we rely on it,

@ryao
Copy link
Contributor Author

ryao commented Jul 31, 2012

@behlendorf An EFI_PARTITION check would close issue #489. The ZLIB_DEFLATE and ZLIB_INFLATE checks are issue #582.

Gentoo's package manager can be configured to do these checks before the ./configure script is run by defining a single variable in the ebuild. As a result, I have had zero motivation to implement them in autotools.

@behlendorf
Copy link
Contributor

Yeah, I don't blame you. There are only so many hours in the day. Anyway, thanks for the patch as is. I can pull the ZLIB bits in to the spl and leave the EFI_PARTITION in the zfs code after a little testing.

@behlendorf behlendorf closed this in 9a512dc Aug 6, 2012
@behlendorf
Copy link
Contributor

Merged as commit 9a512dc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants