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

Ensure that --with-spl-timeout waits for both SPL spl_config.h and symvers files #1431

Closed
wants to merge 1 commit into from

Conversation

clopez
Copy link
Contributor

@clopez clopez commented Apr 27, 2013

The previous code was only waiting for the symver file. But the postinst
target of the DKMS script for SPL will not only create the symvers file,
but also the header spl_config.h.

If we are waiting in the configure script of ZFS for the SPL symvers file,
then we also need to wait for spl_config.h. Otherwise the configure script
will abort because the spl_config.h is not yet available.

On top of that, the function ZFS_AC_SPL_MODULE_SYMVERS is moved
to the end of the function ZFS_AC_SPL to allow both checks share the
with-spl-timeout parameter.

…mvers files

The previous code was only waiting for the symver file. But the postinst
target of the DKMS script for SPL will not only create the symvers file,
but also the header spl_config.h.

If we are waiting in the configure script of ZFS for the SPL symvers file,
then we also need to wait for spl_config.h. Otherwise the configure script
will abort because the spl_config.h is not yet available.

On top of that, the function ZFS_AC_SPL_MODULE_SYMVERS is moved to the end
of the function ZFS_AC_SPL to allow both checks share the with-spl-timeout
parameter.
@behlendorf
Copy link
Contributor

@clopez Did this happen to cause a build failure or did you just notice the issue via code inspection?

@clopez
Copy link
Contributor Author

clopez commented Apr 29, 2013

it caused a build failure.

When upgrading the kernel, on a Debian system with the zfs-dkms package built to run the configure script with the parameter --with-spl-timeout=600 it causes the following error:

Setting up linux-image-3.8-trunk-amd64 (3.8.5-1~experimental.1) ...
Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/dkms 3.8-trunk-amd64 /boot/vmlinuz-3.8-trunk-amd64
configure: error: 
    *** Please make sure the kmod spl devel <kernel> package for your
    *** distribution is installed then try again.  If that fails you
    *** can specify the location of the spl objects with the
    *** '--with-spl-obj=PATH' option.
Error! Bad return status for module build on kernel: 3.8-trunk-amd64 (x86_64)
Consult /var/lib/dkms/zfs/0.6.1/build/make.log for more information.

And /var/lib/dkms/zfs/0.6.1/build/make.log contains:

DKMS make.log for zfs-0.6.1 for kernel 3.8-trunk-amd64 (x86_64)
Mon Apr 29 18:30:42 CEST 2013
make  all-recursive
make[1]: Entering directory `/var/lib/dkms/zfs/0.6.1/build'
Making all in module
make[2]: Entering directory `/var/lib/dkms/zfs/0.6.1/build/module'
-e 
 *** Missing spl symbols ensure you have built the spl:
 *** - /var/lib/dkms/spl/0.6.1/3.8-trunk-amd64/x86_64/Module.symvers, or
 *** - /var/lib/dkms/spl/0.6.1/3.8-trunk-amd64/x86_64/module/Module.symvers

make[2]: *** [modules] Error 1
make[2]: Leaving directory `/var/lib/dkms/zfs/0.6.1/build/module'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/lib/dkms/zfs/0.6.1/build'
make: *** [all] Error 2

With this patch the problem goes away and the user can upgrade the kernel and get the ZFS module built as expected.

@behlendorf behlendorf closed this in 5165473 May 3, 2013
@behlendorf
Copy link
Contributor

5165473 Ensure --with-spl-timeout waits for spl_config.h and symvers

unya pushed a commit to unya/zfs that referenced this pull request Dec 13, 2013
The previous code was only waiting for the symver file. But the
postinst target of the DKMS script for SPL will not only create
the symvers file, but also the header spl_config.h.

If we are waiting in the configure script of ZFS for the SPL
symvers file, then we also need to wait for spl_config.h.
Otherwise the configure script will abort because the spl_config.h
is not yet available.

On top of that, the function ZFS_AC_SPL_MODULE_SYMVERS is moved
to the end of the function ZFS_AC_SPL to allow both checks share
the with-spl-timeout parameter.

Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#1431
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.

2 participants