Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 596872 - sys-fs/zfs-kmod - src_configure() detects wrong source directory for spl
Summary: sys-fs/zfs-kmod - src_configure() detects wrong source directory for spl
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Richard Yao (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2016-10-11 15:27 UTC by Corin Lawson
Modified: 2020-06-10 21:59 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch file (01-spl-version.patch,914 bytes, patch)
2016-10-11 15:27 UTC, Corin Lawson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Corin Lawson 2016-10-11 15:27:39 UTC
Created attachment 449878 [details, diff]
Patch file

Attempting to install sys-fs/zfs-kmod I encounter the following 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.

I can see that configure is being run against an old version of spl that resides in /usr/src. With the attached patch file the correct version is selected.

I am not sure that this is the best way of patching the ebuild, perhaps $PV should be used to select the correct version of spl?
Comment 1 Yixun Lan archtester gentoo-dev 2016-10-11 15:42:13 UTC
why does the old spl version exist?

you defintely need to make sure sys-fs/zfs-kmod and sys-kernel/spl using the *same* version, and the sys-fs/zfs-kmod already put a hard requirement there.

== snip from sys-fs/zfs-kmod ebuild ==
DEPEND="
    =sys-kernel/spl-${PV}*
Comment 2 Thomas Capricelli 2016-11-26 20:55:28 UTC
I don't understand much of the discussion here, but my sys-fs/zfs-kmod-0.6.5.8 keeps on failing with this error although sys-kernel/spl-0.6.5.8 is installed (and not other versions).

'ls -d /usr/src/spl-*' only returns : /usr/src/spl-0.6.5.8
Comment 3 Thomas Capricelli 2016-11-29 21:53:09 UTC
Surely the ebuild does something wrong, my /usr/unsecure/tmp/portage/sys-fs/zfs-kmod-0.6.5.8/temp/build.log contains:

 *             environment, line  732:  Called econf '--docdir=/usr/share/doc/zfs-kmod-0.6.5.8' '--bindir=/bin' '--sbindir=/sbin' '--with-config=kernel' '--with-linux=/usr/src/linux' '--with-linux-obj=/lib/modules/4.1.25-vs2.3.8.4/build' '--with-spl=/usr/src/spl-*' '--with-spl-obj=/usr/src/spl-*/4.1.25-vs2.3.8.4' '--disable-debug'

I dont like the star there, it looks like it should have been expanded before being sent to ./configure.
Comment 4 Thomas Capricelli 2016-11-29 22:27:26 UTC
Follow-up and end for me:

The actual error is this:
ls: cannot access /usr/src/spl-*: No such file or directory

I have no clue why, as if i do it by myself it works:
   # ls -dr /usr/src/spl-*
   /usr/src/spl-0.6.5.8

It might be related to the fact that /usr/src is a symbolic link but i dont understand why.

Anyway i remember that in a previous bug report (can't find it right now) i already reported that it's better to let zfs find out by itself, so just remove the two following lines from ebuild and it works (for me at least):

        --with-spl="${EROOT}usr/src/${SPL_PATH}"
        --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
Comment 5 Thomas Capricelli 2017-02-07 21:24:43 UTC
(In reply to Thomas Capricelli from comment #4)
> 
> Anyway i remember that in a previous bug report (can't find it right now) i
> already reported that it's better to let zfs find out by itself, so just
> remove the two following lines from ebuild and it works (for me at least):
> 
>         --with-spl="${EROOT}usr/src/${SPL_PATH}"
>         --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"

Please, could someone commit this ! ??
Comment 6 Corin Lawson 2017-05-19 14:39:02 UTC
(In reply to Thomas Capricelli from comment #4)
> Follow-up and end for me:
> 
> The actual error is this:
> ls: cannot access /usr/src/spl-*: No such file or directory
> 
> I have no clue why, as if i do it by myself it works:
>    # ls -dr /usr/src/spl-*
>    /usr/src/spl-0.6.5.8
> 
> It might be related to the fact that /usr/src is a symbolic link but i dont
> understand why.
> 
> Anyway i remember that in a previous bug report (can't find it right now) i
> already reported that it's better to let zfs find out by itself, so just
> remove the two following lines from ebuild and it works (for me at least):
> 
>         --with-spl="${EROOT}usr/src/${SPL_PATH}"
>         --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"

I confirm that this also works for me, that is to say, removing any line in the ebuild that has SPL_PATH seems like the simplest solution.

@ryao?
Comment 7 Corin Lawson 2017-05-19 14:40:47 UTC
(In reply to Yixun Lan from comment #1)
> why does the old spl version exist?
> 
> you defintely need to make sure sys-fs/zfs-kmod and sys-kernel/spl using the
> *same* version, and the sys-fs/zfs-kmod already put a hard requirement there.
> 
> == snip from sys-fs/zfs-kmod ebuild ==
> DEPEND="
>     =sys-kernel/spl-${PV}*

Err, I don't think it's for me to say...

Are you suggesting that I remove the old spl source directory before emerging the update?
Comment 8 Thomas Capricelli 2018-03-22 01:08:45 UTC
(In reply to Thomas Capricelli from comment #5)
> (In reply to Thomas Capricelli from comment #4)
> > 
> > Anyway i remember that in a previous bug report (can't find it right now) i
> > already reported that it's better to let zfs find out by itself, so just
> > remove the two following lines from ebuild and it works (for me at least):
> > 
> >         --with-spl="${EROOT}usr/src/${SPL_PATH}"
> >         --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
> 
> Please, could someone commit this ! ??


Same problem, same solution, with kernel 4.15.11, spl-0.7.6 and zfs-kmod-0.7.6
Comment 9 Joost Ruis 2019-03-07 22:29:54 UTC
Any news on this? Happens here too.
Comment 10 Thomas Capricelli 2019-03-07 22:58:44 UTC
I keep on applying my 'turn around' on each emerge, ...
Comment 11 Georgy Yakovlev archtester gentoo-dev 2019-04-26 20:41:20 UTC
how you guys run into that?
unless you do something strange I see no way how can zfs-kmod find old spl, because new spl should be installed by that moment and should have deleted old one.

Please full fresh buildlog and describe how you run update process when you encounter this failure.

Thanks.
Comment 12 Thomas Capricelli 2019-04-28 09:29:04 UTC
I do nothing special, really. juste the usual 'emerge -u'

I dont think zfs finds the old spl, as you say. First the old spl is not longer installed (as reported). And (as reported), the error looks like:

> ls: cannot access /usr/src/spl-*: No such file or directory
Comment 13 Georgy Yakovlev archtester gentoo-dev 2020-06-10 21:59:50 UTC
spl is gone from the tree. closing.

please re-open if you still see it with 0.8.x