Bug #54473
closedcmake: pmdk fails to compile on Centos Stream 9
0%
Description
When attempting to build Ceph master on Centos Stream 9, pmdk throws this error:
/usr/bin/ld: pmemblk_priv_funcs.o (symbol from plugin): in function `_Malloc':
(.text+0x0): multiple definition of `_Malloc'; ../nondebug/libpmempool/alloc.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: pmemblk_priv_funcs.o (symbol from plugin): in function `_Malloc':
(.text+0x0): multiple definition of `fn_malloc'; ../nondebug/libpmempool/alloc.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: pmemblk_priv_funcs.o (symbol from plugin): in function `_Malloc':
(.text+0x0): multiple definition of `_Realloc'; ../nondebug/libpmempool/alloc.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: pmemblk_priv_funcs.o (symbol from plugin): in function `_Malloc':
(.text+0x0): multiple definition of `fn_realloc'; ../nondebug/libpmempool/alloc.o (symbol from plugin):(.text+0x0): first defined here
/usr/bin/ld: pmemblk_priv_funcs.o (symbol from plugin): in function `_Malloc':
(.text+0x0): multiple definition of `set_func_malloc'; ../nondebug/libpmempool/alloc.o (symbol from plugin):(.text+0x0): first defined here
partial traceback attached and the full Jenkins CI job log can be found here:
https://jenkins.ceph.com/job/ceph-dev-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=centos9,DIST=centos9,MACHINE_SIZE=gigantic/49035/consoleFull#-85362248744e9240e-b50a-4693-bac0-8a991bac86ac
Files
Updated by Ilya Dryomov about 2 years ago
/usr/bin/cc -MD -c -o ../debug/libpmemobj/obj.o -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=gnu99 -fno-common -pthread -DSRCVERSION=\"1.10\" -Wp,-U_FORTIFY_SOURCE -O0 -ggdb -DDEBUG -DUSE_LIBDL -D_PMEMOBJ_INTRNL -I../include -I../common/ -I../core/ -fPIC obj.c
Note -flto=auto -ffat-lto-objects. This looks like https://github.com/pmem/pmdk/issues/5197 and fix is probably to disable LTO for PMDK with -fno-lto (as suggested by Kefu earlier).
Updated by Ilya Dryomov about 2 years ago
Yup, LTO was disabled upstream in https://github.com/pmem/pmdk/commit/e2ddfe2278ee20821648b088689f1ed35f24db4d and even earlier in CentOS downstream. I think a better fix would be to use the PMDK package on CentOS 9, which means building with WITH_SYSTEM_PMDK=ON.
Updated by Ilya Dryomov about 2 years ago
- Status changed from New to In Progress
- Assignee set to Ilya Dryomov
Updated by Ilya Dryomov about 2 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 45341
Updated by Justin Caratzas about 2 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Ilya Dryomov about 2 years ago
Justin, you moved this ticket to "Pending Backport" without specifying which releases it should be backported to. Did you mean it to be just quincy?
Updated by Backport Bot about 2 years ago
- Copied to Backport #55560: pacific: cmake: pmdk fails to compile on Centos Stream 9 added
Updated by Backport Bot about 2 years ago
- Copied to Backport #55561: quincy: cmake: pmdk fails to compile on Centos Stream 9 added
Updated by Ilya Dryomov about 2 years ago
Thanks, Justin. I see that you also want this in pacific. Just for my understanding, are we intending to support pacific on CentOS 9 Stream as well? CentOS 8 Stream EOL date appears to be May 31st, 2024 -- a full year beyond pacific EOL.
Updated by Arthur Outhenin-Chalandre about 2 years ago
Hey just to say that I would really love to see pacific compiling on stream 9. We would be interested to have some servers on that in the future.
Updated by Justin Caratzas about 2 years ago
Ilya Dryomov wrote:
Thanks, Justin. I see that you also want this in pacific. Just for my understanding, are we intending to support pacific on CentOS 9 Stream as well? CentOS 8 Stream EOL date appears to be May 31st, 2024 -- a full year beyond pacific EOL.
Yes we are intending for pacific to be able to be built on both
Updated by Ilya Dryomov almost 2 years ago
- Status changed from Pending Backport to Resolved