Bugzilla – Bug 1212767
libdlm: fails to build with linux-glibc-devel 6.4
Last modified: 2023-07-05 09:42:25 UTC
libdlm fails to build with linux-glibc-devel 6.4, I'm including the error log below. This is because a include of <linux/dlm_netlink.h> that's not longer included in linux-glibc-devel and should be fixed in libdlm. Upstream have accepted a patch to fix this: https://pagure.io/dlm/c/ddbba6608896f81bfce8f8edf3d0f507714cfc43?branch=main [ 22s] + cd dlm-4.1.0 [ 22s] + echo 'V_4.1.0 { global: *; };' [ 22s] + export 'CFLAGS=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' [ 22s] + CFLAGS='-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g' [ 22s] + export LDFLAGS=-Wl,--version-script=/home/abuild/rpmbuild/BUILD/dlm-4.1.0/dlm.ver [ 22s] + LDFLAGS=-Wl,--version-script=/home/abuild/rpmbuild/BUILD/dlm-4.1.0/dlm.ver [ 22s] + make all UDEVDIR=/usr/lib/udev/rules.d [ 23s] set -e; for d in libdlm dlm_controld dlm_tool fence; do make -C $d all; done [ 23s] make[1]: Entering directory '/home/abuild/rpmbuild/BUILD/dlm-4.1.0/libdlm' [ 23s] cc libdlm.c -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -D_GNU_SOURCE -O2 -ggdb -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option -fPIC -Wl,-z,now -D_REENTRANT -c -o libdlm.o [ 23s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 23s] <command-line>: note: this is the location of the previous definition [ 23s] cc libdlm.o -Wl,--version-script=/home/abuild/rpmbuild/BUILD/dlm-4.1.0/dlm.ver -lpthread -Wl,-z,defs -shared -o libdlm.so.3.0 -Wl,-soname=libdlm.so.3 [ 23s] ln -sf libdlm.so.3.0 libdlm.so [ 23s] ln -sf libdlm.so.3.0 libdlm.so.3 [ 23s] cc libdlm.c -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -D_GNU_SOURCE -O2 -ggdb -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option -fPIC -Wl,-z,now -c -o libdlm_lt.o [ 23s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 23s] <command-line>: note: this is the location of the previous definition [ 24s] cc libdlm_lt.o -Wl,--version-script=/home/abuild/rpmbuild/BUILD/dlm-4.1.0/dlm.ver -Wl,-z,defs -shared -o libdlm_lt.so.3.0 -Wl,-soname=libdlm_lt.so.3 [ 24s] ln -sf libdlm_lt.so.3.0 libdlm_lt.so [ 24s] ln -sf libdlm_lt.so.3.0 libdlm_lt.so.3 [ 24s] cat libdlm.pc.in | sed -e 's#@PREFIX@#/usr#g;s#@LIBDIR@#/usr//lib64#g' > libdlm.pc [ 24s] cat libdlm.pc.in | sed -e 's#@PREFIX@#/usr#g;s#@LIBDIR@#/usr//lib64#g' > libdlm_lt.pc [ 24s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/dlm-4.1.0/libdlm' [ 24s] make[1]: Entering directory '/home/abuild/rpmbuild/BUILD/dlm-4.1.0/dlm_controld' [ 24s] cc lib.c -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -D_GNU_SOURCE -O2 -ggdb -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -Wl,-z,now -fPIC -Wl,--version-script=/home/abuild/rpmbuild/BUILD/dlm-4.1.0/dlm.ver -Wl,-z,relro -Wl,-z,defs -pie -shared -o libdlmcontrol.so.3.2 -Wl,-soname=libdlmcontrol.so.3 [ 24s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 24s] <command-line>: note: this is the location of the previous definition [ 25s] ln -sf libdlmcontrol.so.3.2 libdlmcontrol.so [ 25s] ln -sf libdlmcontrol.so.3.2 libdlmcontrol.so.3 [ 25s] cc action.c cpg.c daemon_cpg.c helper.c crc.c fence_config.c fence.c main.c plock.c config.c member.c logging.c rbtree.c node_config.c -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -D_GNU_SOURCE -O2 -ggdb -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -fdiagnostics-show-option -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -Wl,-z,now -fPIE -DPIE -I../include -I../libdlm -Wl,--version-script=/home/abuild/rpmbuild/BUILD/dlm-4.1.0/dlm.ver -Wl,-z,relro -Wl,-z,defs -pie -lpthread -lrt -lcpg -lcmap -lcfg -lquorum -luuid -o dlm_controld -L. [ 25s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 25s] <command-line>: note: this is the location of the previous definition [ 25s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 25s] <command-line>: note: this is the location of the previous definition [ 26s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 26s] <command-line>: note: this is the location of the previous definition [ 26s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 26s] <command-line>: note: this is the location of the previous definition [ 26s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 26s] <command-line>: note: this is the location of the previous definition [ 26s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 26s] <command-line>: note: this is the location of the previous definition [ 27s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 27s] <command-line>: note: this is the location of the previous definition [ 27s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 27s] <command-line>: note: this is the location of the previous definition [ 27s] main.c:15:10: fatal error: linux/dlm_netlink.h: No such file or directory [ 27s] 15 | #include <linux/dlm_netlink.h> [ 27s] | ^~~~~~~~~~~~~~~~~~~~~ [ 27s] compilation terminated. [ 27s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 27s] <command-line>: note: this is the location of the previous definition [ 27s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 27s] <command-line>: note: this is the location of the previous definition [ 27s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 27s] <command-line>: note: this is the location of the previous definition [ 28s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 28s] <command-line>: note: this is the location of the previous definition [ 28s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 28s] <command-line>: note: this is the location of the previous definition [ 28s] <command-line>: warning: "_FORTIFY_SOURCE" redefined [ 28s] <command-line>: note: this is the location of the previous definition [ 28s] make[1]: *** [Makefile:71: dlm_controld] Error 1 [ 28s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/dlm-4.1.0/dlm_controld' [ 28s] make: *** [Makefile:2: all] Error 2 [ 28s] error: Bad exit status from /var/tmp/rpm-tmp.5sLaEl (%build) [ 28s] [ 28s] RPM build warnings: [ 28s] line 84: It's not recommended to have unversioned Obsoletes: Obsoletes: libdlm2
There is also a newer version of dlm 4.2.0, so please consider updating to this version and adding the patch.
https://build.opensuse.org/request/show/1095836
Fixed.