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

configure fails with busybox mktemp #11274

Closed
ncopa opened this issue Dec 3, 2020 · 2 comments
Closed

configure fails with busybox mktemp #11274

ncopa opened this issue Dec 3, 2020 · 2 comments
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@ncopa
Copy link

ncopa commented Dec 3, 2020

System information

Type Version/Name
Distribution Name Alpine Linux
Distribution Version 3.13.0_alpha20200917 (aka 'edge')
Linux Kernel 5.4.27-0-lts
Architecture aarch64 and x86_64 (at least)
ZFS Version 2.0.0
SPL Version n/a

Describe the problem you're observing

configure fails in the sed test with the following error:

checking for sed --in-place... mktemp: (null): Invalid argument     
../configure: line 16614: can't create : nonexistent directory
configure: error: /bin/sed does not support in-place

Describe how to reproduce the problem

backup mktemp binary and create a mktemp symlink pointing to busybox.
run configure.

Include any warning/errors/backtraces from the system logs

The problem appears to be that busybox configure requires 6 trainling X'es while GNU coreutils only requires 3.

tmpfile=$(mktemp conftest.XXX)

@ncopa ncopa added Status: Triage Needed New issue which needs to be triaged Type: Defect Incorrect behavior (e.g. crash, hang) labels Dec 3, 2020
@ncopa
Copy link
Author

ncopa commented Dec 3, 2020

This fixes it:

diff --git a/config/always-sed.m4 b/config/always-sed.m4
index 19633e1..3d7ae28 100644
--- a/config/always-sed.m4
+++ b/config/always-sed.m4
@@ -4,7 +4,7 @@ dnl #
 AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_SED], [
        AC_REQUIRE([AC_PROG_SED])dnl
        AC_CACHE_CHECK([for sed --in-place], [ac_cv_inplace], [
-               tmpfile=$(mktemp conftest.XXX)
+               tmpfile=$(mktemp conftest.XXXXXX)
                echo foo >$tmpfile
                AS_IF([$SED --in-place 's#foo#bar#' $tmpfile 2>/dev/null],
                      [ac_cv_inplace="--in-place"],

ncopa added a commit to ncopa/zfs that referenced this issue Dec 3, 2020
Fix build on Alpine Linux which uses busybox, and busybox mktemp
requires 6 trailing Xes.

Fixes commit 4313a5b (Detect if sed supports --in-place)

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Closes openzfs#11274
algitbot pushed a commit to alpinelinux/aports that referenced this issue Dec 3, 2020
algitbot pushed a commit to alpinelinux/aports that referenced this issue Dec 3, 2020
algitbot pushed a commit to alpinelinux/aports that referenced this issue Dec 3, 2020
@behlendorf
Copy link
Contributor

Resolved by #11269.

@behlendorf behlendorf removed the Status: Triage Needed New issue which needs to be triaged label Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants