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

OpenZFS 2.3.0-rc1 and uClibc. uClibc does not implement strerror_l. #16636

Closed
jlsalvador opened this issue Oct 11, 2024 · 0 comments
Closed

OpenZFS 2.3.0-rc1 and uClibc. uClibc does not implement strerror_l. #16636

jlsalvador opened this issue Oct 11, 2024 · 0 comments
Labels
Type: Building Indicates an issue related to building binaries Type: Defect Incorrect behavior (e.g. crash, hang)

Comments

@jlsalvador
Copy link
Contributor

System information

Type Version/Name
Distribution Name Buildroot
Distribution Version master
Kernel Version 5.15.35
Architecture x86_64/aarch64
OpenZFS Version 2.3.0-rc1

Describe the problem you're observing

strerror_l() is not implemented in some C libraries, such as uClibc.

Could you provide a fallback (strerror(errnum))?
401c356

Describe how to reproduce the problem

Try to compile openzfs-2.3.0-rc1 with uclibc.

Include any warning/errors/backtraces from the system logs

[...]
copying selected object files to avoid basename conflicts...
  CCLD     libzutil.la
  CCLD     libzfs_core.la
  CCLD     libuutil.la
  CCLD     tests/zfs-tests/cmd/edonr_test
  CCLD     tests/zfs-tests/cmd/skein_test
  CCLD     tests/zfs-tests/cmd/sha2_test
  CCLD     tests/zfs-tests/cmd/blake3_test
  CCLD     tests/zfs-tests/cmd/idmap_util
libtool: warning: '/tmp/tmp.9FNqAnU8oG/TestZfsUclibc/host/bin/../x86_64-buildroot-linux-uclibc/sysroot/usr/lib/libtirpc.la' seems to be moved
libtool: warning: '/tmp/tmp.9FNqAnU8oG/TestZfsUclibc/host/bin/../x86_64-buildroot-linux-uclibc/sysroot/usr/lib/libtirpc.la' seems to be moved
/tmp/tmp.9FNqAnU8oG/TestZfsUclibc/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/13.3.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: ./.libs/libspl.a(libspl_la-getmntany.o): in function `getextmntent':
getmntany.c:(.text+0x284): undefined reference to `strerror_l'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:6175: libzfs_core.la] Error 1
make[4]: *** Waiting for unfinished jobs....
/tmp/tmp.9FNqAnU8oG/TestZfsUclibc/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-uclibc/13.3.0/../../../../x86_64-buildroot-linux-uclibc/bin/ld: ./.libs/libspl.a(libspl_la-getmntany.o): in function `getextmntent':
getmntany.c:(.text+0x284): undefined reference to `strerror_l'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:6014: libuutil.la] Error 1
make[3]: *** [Makefile:12579: all-recursive] Error 1
make[2]: *** [Makefile:4752: all] Error 2
make[1]: *** [package/pkg-generic.mk:289: /tmp/tmp.9FNqAnU8oG/TestZfsUclibc/build/zfs-2.3.0-rc1/.stamp_built] Error 2
make: *** [Makefile:23: _all] Error 2
E14:00:25 TestZfsUclibc                            Building

======================================================================
ERROR: test_run (tests.package.test_zfs.TestZfsUclibc.test_run)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jlsalvador/src/simplek8s-buildroot/buildroot/support/testing/infra/basetest.py", line 74, in setUp
    self.b.build()
  File "/home/jlsalvador/src/simplek8s-buildroot/buildroot/support/testing/infra/builder.py", line 105, in build
    raise SystemError("Build failed")
SystemError: Build failed

----------------------------------------------------------------------
Ran 1 test in 339.195s

FAILED (errors=1)
@jlsalvador jlsalvador added the Type: Defect Incorrect behavior (e.g. crash, hang) label Oct 11, 2024
@behlendorf behlendorf added the Type: Building Indicates an issue related to building binaries label Oct 11, 2024
behlendorf added a commit to behlendorf/zfs that referenced this issue Oct 14, 2024
Some C libraries, such as uClibc, do not provide strerror_l() in
which case we fallback to strerror().

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#16636 
Closes openzfs#16640
ptr1337 pushed a commit to CachyOS/zfs that referenced this issue Nov 14, 2024
Some C libraries, such as uClibc, do not provide strerror_l() in
which case we fallback to strerror().

Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#16636 
Closes openzfs#16640
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries Type: Defect Incorrect behavior (e.g. crash, hang)
Projects
None yet
Development

No branches or pull requests

2 participants