Bug 87125

Summary: 217: error: undefined reference to 'config_parse_warn_compat'
Product: systemd Reporter: Arkadiusz Miskiewicz <arekm>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Arkadiusz Miskiewicz 2014-12-08 22:20:52 UTC
Linking systemd-analyze fails with:
error: undefined reference to 'config_parse_warn_compat'

That's because config_parse_warn_compat() is compiled in only if one of these defines is not defined:

#if !defined(HAVE_SYSV_COMPAT) || !defined(HAVE_SECCOMP) || !defined(HAVE_PAM) || !defined(HAVE_SELINUX) || !defined(HAVE_SMACK) || !defined(HAVE_APPARMOR)
int config_parse_warn_compat(

Unfortunately in my case I have all these defined.

Yet src/core/load-fragment-gperf.c wants config_parse_warn_compat unconditionally.

Solution - dropping these guard defines and always compiling config_parse_warn_compat in.


libtool: link: x86_64-pld-linux-gcc -std=gnu99 -pipe -Wall -Wextra -Wno-inline -Wundef -Wformat=2 -Wformat-security -Wformat-nonliteral -Wlogical-op -Wsign-compare -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wsuggest-attribute=noreturn -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-long-long -Wno-overlength-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Werror=overflow -Wdate-time -Wnested-externs -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -ffunction-sections -fdata-sections -fstack-protector -fstack-protector-strong -fPIE --param=ssp-buffer-size=4 -O2 -fwrapv -pipe -Wformat -Werror=format-security -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -march=x86-64 -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wl,--as-needed -Wl,--no-undefined -Wl,--gc-sections -Wl,-z -Wl,relro -Wl,-z -Wl,now -pie -Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z -Wl,relro -Wl,-z -Wl,combreloc -o systemd-analyze src/analyze/analyze.o src/analyze/analyze-verify.o  ./.libs/libsystemd-core.a -lselinux /usr/lib64/libpam_misc.so /usr/lib64/libpam.so /usr/lib64/libaudit.so -lcap -lkmod /usr/lib64/libapparmor.so -lseccomp ./.libs/libsystemd-internal.a ./.libs/libsystemd-shared.a -lrt -ldw -ldl -pthread
./.libs/libsystemd-core.a(libsystemd_core_la-load-fragment-gperf.o):load-fragment-gperf.c:wordlist.15022: error: undefined reference to 'config_parse_warn_compat'
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-12-08 22:29:00 UTC
Fixed in http://cgit.freedesktop.org/systemd/systemd/commit/?id=4e7dff9b09.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.