libelektra: 0.9.2 fails to build on non-glibc systems

Steps to Reproduce the Problem

I’m cross compiling elektra for OpenWRT. (See https://github.com/openwrt/packages/issues/12307) I have added the following CMAKE_OPTIONS among others:

-DBUILD_TESTING=OFF
-DPLUGINS="ALL;-multifile;-python2;-simpleini"
-DBINDINGS="MAINTAINED;-intercept_env;-intercept_fs"

which I believe should disable everything, that depends on glibc.

Expected Result

cmake completes successfully.

Actual Result

cmake says:

[...]
-- Looking for __GNU_LIBRARY__
-- Looking for __GNU_LIBRARY__ - not found
-- Exclude Plugin simpleini because simpleini needs glibc to work, use the mini plugin instead
[...]
-- Exclude Binding intercept_fs because explicitly excluded
-- Exclude Binding intercept_env because explicitly excluded
[...]
-- Configuring incomplete, errors occurred!
See also "/home/harald/openwrt-sdk-mxs_gcc-8.4.0_musl_eabi.Linux-x86_64/build_dir/target-arm_arm926ej-s_musl_eabi/elektra-0.9.2/CMakeFiles/CMakeOutput.log".
See also "/home/harald/openwrt-sdk-mxs_gcc-8.4.0_musl_eabi.Linux-x86_64/build_dir/target-arm_arm926ej-s_musl_eabi/elektra-0.9.2/CMakeFiles/CMakeError.log".

Which suggests, that a) disabling simpleini was not honored b) despite simpleini was excluded anyway, cmake still failed.

System Information

  • Elektra Version: 0.9.2
  • OpenWRT SDK

Further Log Files and Output

CMakeError.log stdout of the build job

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Thanks, for the pointer! Looks like CMAKE_BINARY_SUBDIR has been introduced shortly after the initial packaging and I never notriced. There is no equivalent for host builds yet, but I guess I’d rather add a patch to openwrt for it than force in source builds on elektra.

Your suggestion did the trick. I’m running into new errors, but I’ll open new issues for them, if I believe they are elektra’s fault or I can’t figure them out.

A small note:

OpenWrt has CMAKE_BINARY_SUBDIR to avoid that issue.