-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Cannot "make install" with DESTDIR set #16994
Labels
Type: Defect
Incorrect behavior (e.g. crash, hang)
Comments
kohlschuetter
added a commit
to kohlschuetter/zfs
that referenced
this issue
Jan 27, 2025
"DESTDIR=/path/to/target/root/ make install" may fail when installing to a root that contains an existing lib/modules structure. When run as root we may even affect the wrong kernel (the build system's one, or, if running a different version, some other directory in /lib/modules, but not the desired one installed in DESTDIR). Add a missing reference to the INSTALL_MOD_PATH root when calling "depmod" during "make install" Also add a switch "DONT_DELETE_MODULES_FILES=1" that skips the removal of files named "modules.*" prior to running depmod. Signed-off-by: Christian Kohlschütter <[email protected]> Closes openzfs#16994
13 tasks
kohlschuetter
added a commit
to kohlschuetter/zfs
that referenced
this issue
Jan 27, 2025
"DESTDIR=/path/to/target/root/ make install" may fail when installing to a root that contains an existing lib/modules structure. When run as root we may even affect the wrong kernel (the build system's one, or, if running a different version, some other directory in /lib/modules, but not the desired one installed in DESTDIR). Add a missing reference to the INSTALL_MOD_PATH root when calling "depmod" during "make install" Also add a switch "DONT_DELETE_MODULES_FILES=1" that skips the removal of files named "modules.*" prior to running depmod. Signed-off-by: Christian Kohlschütter <[email protected]> Closes openzfs#16994
kohlschuetter
added a commit
to kohlschuetter/zfs
that referenced
this issue
Jan 27, 2025
"DESTDIR=/path/to/target/root/ make install" may fail when installing to a root that contains an existing lib/modules structure. When run as root we may even affect the wrong kernel (the build system's one, or, if running a different version, some other directory in /lib/modules, but not the desired one installed in DESTDIR). Add a missing reference to the INSTALL_MOD_PATH root when calling "depmod" during "make install" Also add a switch "DONT_DELETE_MODULES_FILES=1" that skips the removal of files named "modules.*" prior to running depmod. Signed-off-by: Christian Kohlschütter <[email protected]> Closes openzfs#16994
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System information
Distribution Name | Alpine Linux
Distribution Version | 3.21.2
Kernel Version | 6.12.9 (host) 6.12.11 (target)
Architecture | x86_64
OpenZFS Version | 2.3.0 / master
Describe the problem you're observing
"make install" with a specified "DESTDIR=" may fail when installing to a root that contains an existing lib/modules structure, or may do the wrong thing when run as root (because we may affect the running kernel, not the target kernel)
Describe how to reproduce the problem
Include any warning/errors/backtraces from the system logs
This is due to the makefile (
module/Makefile
) explicitly deleting all files starting withmodules.*
(see "Remove extraneous build products when packaging")Even after disabling these lines, the installation does not succeed:
Here, we try to run depmod on the wrong kernel (the host system's kernel, not the one under DESTDIR / not using the modules in INSTALL_MOD_PATH)
Adding
-b $(INSTALL_MOD_PATH)
to depmod (INSTALL_MOD_PATH defaults to DESTDIR) does the trick.The text was updated successfully, but these errors were encountered: