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

Run-time dependency libcap is not found #349

Closed
yblin00 opened this issue Dec 12, 2023 · 2 comments
Closed

Run-time dependency libcap is not found #349

yblin00 opened this issue Dec 12, 2023 · 2 comments
Labels

Comments

@yblin00
Copy link

yblin00 commented Dec 12, 2023

systemd version the issue has been seen with

255

Used distribution

Ubuntu 18.04

Linux kernel version used

5.10.16.3-microsoft-standard-WSL2

CPU architectures issue was seen on

aarch64

Component

systemd

Expected behaviour you didn't see

No errors.

Unexpected behaviour you saw

yblin@RD-SW12-NB:/opensrc_lib/systemd-stable-255$ meson setup --cross-file aarch64-linux-musl.txt build
WARNING: Unknown CPU family cortex-a53, please report this at https://github.com/mesonbuild/meson/issues/new
The Meson build system
Version: 0.61.5
Source dir: /home/yblin/opensrc_lib/systemd-stable-255
Build dir: /home/yblin/opensrc_lib/systemd-stable-255/build
Build type: cross build
Project name: systemd
Project version: 255
C compiler for the host machine: /home/yblin/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc (gcc 10.2.1 "aarch64-linux-musl-gcc (GCC) 10.2.1 20210227")C linker for the host machine: /home/yblin/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc ld.bfd 2.36.1
C compiler for the build machine: cc (gcc 7.5.0 "cc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
C linker for the build machine: cc ld.bfd 2.30
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: cortex-a53
Host machine cpu: aarch64
Target machine cpu family: cortex-a53
Target machine cpu: aarch64
Program tools/add-git-hook.sh found: YES (/home/yblin/opensrc_lib/systemd-stable-255/tools/add-git-hook.sh)
Program tools/meson-build.sh found: YES (/home/yblin/opensrc_lib/systemd-stable-255/tools/meson-build.sh)
C++ compiler for the host machine: /home/yblin/aarch64-linux-musl-cross/bin/aarch64-linux-musl-g++ (gcc 10.2.1 "aarch64-linux-musl-g++ (GCC) 10.2.1 20210227")
C++ linker for the host machine: /home/yblin/aarch64-linux-musl-cross/bin/aarch64-linux-musl-g++ ld.bfd 2.36.1
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -Warray-bounds: YES
Compiler for C supports arguments -Warray-bounds=2: YES
Compiler for C supports arguments -Wdate-time: YES
Compiler for C supports arguments -Wendif-labels: YES
Compiler for C supports arguments -Werror=format=2: YES
Compiler for C supports arguments -Werror=format-signedness: YES
...

Library dl found: YES
Pkg-config binary for 1 is not cached.
Pkg-config binary missing from cross or native file, or env var undefined.
Default target is not allowed for cross use
Found Pkg-config: NO
Pkg-config binary for machine 1 not found. Giving up.
CMake binary for 1 is not cached
CMake binary missing from cross or native file, or env var undefined.
Default target is not allowed for cross use
Found CMake: NO
CMake binary for machine 1 not found. Giving up.
Run-time dependency libcrypt found: NO (tried pkgconfig and cmake)
Pkg-config binary for 1 is cached as not found.
Pkg-config binary for machine 1 not found. Giving up.
CMake binary for 1 is cached as not found
CMake binary for machine 1 not found. Giving up.
Run-time dependency libxcrypt found: NO (tried pkgconfig and cmake)
Running compile:
Working directory: /home/yblin/opensrc_lib/systemd-stable-255/build/meson-private/tmpkobgxqwl
Command line: /home/yblin/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc /home/yblin/opensrc_lib/systemd-stable-255/build/meson-private/tmpkobgxqwl/testfile.c -o /home/yblin/opensrc_lib/systemd-stable-255/build/meson-private/tmpkobgxqwl/output.exe -D_FILE_OFFSET_BITS=64 -O0 -Wl,--start-group -lcrypt -Wl,--end-group -Wl,--allow-shlib-undefined

Code:
int main(void) { return 0; }

Compiler stdout:

Compiler stderr:

Library crypt found: YES
Pkg-config binary for 1 is cached as not found.
Pkg-config binary for machine 1 not found. Giving up.
CMake binary for 1 is cached as not found
CMake binary for machine 1 not found. Giving up.
Run-time dependency libcap found: NO

meson.build:1019:0: ERROR: Pkg-config binary for machine 1 not found. Giving up.

yblin@RD-SW12-NB:~/opensrc_lib/systemd-stable-255$ ### pkg-config --list-all
systemd systemd - systemd System and Service Manager
mount mount - mount library
python2 Python - Python library
python3 Python - Python library
usbutils usbutils - USB device database
python-3.6m Python - Python library
xkeyboard-config XKeyboardConfig - X Keyboard configuration data
python Python - Python library
uuid uuid - Universally unique id library
blkid blkid - Block device id library
udev udev - udev
python-2.7 Python - Python library
bash-completion bash-completion - programmable completion for the bash shell
python-3.6 Python - Python library
yaml-cpp Yaml-cpp - A YAML parser and emitter for C++
expat expat - expat XML parser
libcap libcap - libcap - linux capabilities library
iso-codes iso-codes - ISO country, language, script and currency codes and translations
libpsx libpsx - libpsx - linux posix syscall API for pthreads
shared-mime-info shared-mime-info - Freedesktop common MIME database

Steps to reproduce the problem

  1. Download systemd-stable-255.tar.gz from the website https://github.com/systemd/systemd-stable/releases

  2. tar zxvf systemd-stable-255.tar.gz

  3. Use the command to download cross compiler
    git clone https://github.com/lovell/aarch64-linux-musl-crosstools.git

  4. Create a file "aarch64-linux-musl.txt" in folder systemd-stable-255.
    The content of aarch64-linux-musl.txt is

[binaries]
c = '/home/yblin/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc'
cpp = '/home/yblin/aarch64-linux-musl-cross/bin/aarch64-linux-musl-g++'
ar = '/home/yblin/aarch64-linux-musl-cross/bin/aarch64-linux-musl-ar'
strip = '/home/yblin/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc-strip'

[host_machine]
system = 'windows'
cpu_family = 'cortex-a53'
cpu = 'aarch64'
endian = 'little'

  1. Build the library libcap-2.63 with the tool-chain aarch64-linux-musl, and then install the library in path /usr/local/lib

  2. At path "systemd-stable-255", type the following command
    meson setup --cross-file aarch64-linux-musl.txt build

Additional program output to the terminal or log subsystem illustrating the issue

No response

@github-actions github-actions bot added the pid1 label Dec 12, 2023
@bluca
Copy link
Member

bluca commented Dec 12, 2023

The required dependencies are listed in the README. This is bug tracker, not a user support forum.

@bluca bluca closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2023
@yuwata
Copy link
Member

yuwata commented Dec 12, 2023

Also, musl is not officially supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants