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

systemd build broken #1191

Closed
inferno-chromium opened this issue Feb 25, 2018 · 5 comments · Fixed by #1224
Closed

systemd build broken #1191

inferno-chromium opened this issue Feb 25, 2018 · 5 comments · Fixed by #1224

Comments

@inferno-chromium
Copy link
Collaborator

https://oss-fuzz-build-logs.storage.googleapis.com/index.html

Step #4: [185/277] Compiling C object 'src/basic/basic@sta/mount-util.c.o'.
Step #4: FAILED: src/basic/basic@sta/mount-util.c.o 
Step #4: clang  -Isrc/basic/basic@sta -Isrc/basic -I../../src/systemd/src/basic -I. -I../../src/systemd/ -Isrc/libsystemd-network -I../../src/systemd/src/libsystemd-network -I../../src/systemd/src/libsystemd/sd-network -I../../src/systemd/src/libsystemd/sd-netlink -I../../src/systemd/src/libsystemd/sd-id128 -I../../src/systemd/src/libsystemd/sd-hwdb -I../../src/systemd/src/libsystemd/sd-device -I../../src/systemd/src/libsystemd/sd-bus -Isrc/core -I../../src/systemd/src/core -Isrc/libudev -I../../src/systemd/src/libudev -Isrc/udev -I../../src/systemd/src/udev -Isrc/login -I../../src/systemd/src/login -Isrc/timesync -I../../src/systemd/src/timesync -Isrc/resolve -I../../src/systemd/src/resolve -Isrc/journal -I../../src/systemd/src/journal -Isrc/systemd -I../../src/systemd/src/systemd -Isrc/shared -I../../src/systemd/src/shared -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -g -Wextra -Werror=undef -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Wdate-time -Wnested-externs -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-error=nonnull -Werror=shadow -Wno-typedef-redefinition -Wno-gnu-variable-sized-type-not-at-end -include config.h -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -fPIC -pthread -fvisibility=default -MMD -MQ 'src/basic/basic@sta/mount-util.c.o' -MF 'src/basic/basic@sta/mount-util.c.o.d' -o 'src/basic/basic@sta/mount-util.c.o' -c ../../src/systemd/src/basic/mount-util.c
Step #4: ../../src/systemd/src/basic/mount-util.c:31:10: fatal error: 'libmount.h' file not found
Step #4: #include <libmount.h>
Step #4:          ^~~~~~~~~~~~
Step #4: 1 error generated.
Step #4: [186/277] Compiling C object 'src/basic/basic@sta/parse-util.c.o'.

@titanous @keszybz - can you please take a look

@titanous
Copy link
Contributor

titanous commented Feb 25, 2018

The culprit is systemd/systemd@9e7f941, which depends on libmount v2.30 (unavailable in the xenial apt repos). I think we can tweak the build to avoid the version requirement for the fuzzers.

@keszybz
Copy link
Contributor

keszybz commented Feb 25, 2018

I think we can tweak the build to avoid the version requirement for the fuzzers.

What do you mean? A patch on the oss-fuzz side or something in systemd upstream?

@titanous
Copy link
Contributor

Both, upstream to relax the version requirements, and in oss-fuzz to install libmount. Alternatively, we could find a way to not require libmount for the libbasic build.

@keszybz
Copy link
Contributor

keszybz commented Feb 25, 2018

We increased the requirement from libmount 2.27.1 to 2.30 because of functional changes in libmount (see systemd/systemd@d6e8096). But everything should build fine if older libmount is installed.

@inferno-chromium
Copy link
Collaborator Author

@titanous @keszybz - i still see error locally when i install libmount-dev through DockerFile, please submit a pull request with fix and verify using
python infra/helper.py build_fuzzers systemd

../../src/systemd/src/basic/mount-util.c:31:10: fatal error: 'libmount.h' file not found
#include <libmount.h>

keszybz added a commit to keszybz/systemd that referenced this issue Mar 9, 2018
keszybz added a commit to keszybz/oss-fuzz that referenced this issue Mar 9, 2018
Right now systemd declares a requirement on libmount-devel >= 2.30.
But this is only because of fixes in libmount 2.30 that matter at
runtime. For fuzzing (and to build) any libmount version is enough.
systemd/systemd@c0b4b0f8f548c755dee81b
relaxed the version check in systemd. To fix the build we need to
install libmount-dev (and pkg-config, because meson requires that
for pkg-config deps to actually work).

Fixes google#1191.
inferno-chromium pushed a commit that referenced this issue Mar 9, 2018
Right now systemd declares a requirement on libmount-devel >= 2.30.
But this is only because of fixes in libmount 2.30 that matter at
runtime. For fuzzing (and to build) any libmount version is enough.
systemd/systemd@c0b4b0f8f548c755dee81b
relaxed the version check in systemd. To fix the build we need to
install libmount-dev (and pkg-config, because meson requires that
for pkg-config deps to actually work).

Fixes #1191.
eworm-de pushed a commit to eworm-de/systemd that referenced this issue Mar 22, 2018
tmatth pushed a commit to tmatth/oss-fuzz that referenced this issue Oct 22, 2018
Right now systemd declares a requirement on libmount-devel >= 2.30.
But this is only because of fixes in libmount 2.30 that matter at
runtime. For fuzzing (and to build) any libmount version is enough.
systemd/systemd@c0b4b0f8f548c755dee81b
relaxed the version check in systemd. To fix the build we need to
install libmount-dev (and pkg-config, because meson requires that
for pkg-config deps to actually work).

Fixes google#1191.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants