Bug #63130
closed
cmake: __FORTIFY_SOURCE requires compiling with optimization (-O)
Added by Patrick Donnelly 8 months ago.
Updated 2 days ago.
Description
When building Ceph with CMAKE_BUILD_TYPE=Debug, we get this error:
[ 4%] Building CXX object src/arrow/CMakeFiles/arrow_objlib.dir/array/array_binary.cc.o
In file included from �[01m�[K/opt/rh/gcc-toolset-11/root/usr/include/c++/11/x86_64-redhat-linux/bits/os_defines.h:39�[m�[K,
from �[01m�[K/opt/rh/gcc-toolset-11/root/usr/include/c++/11/x86_64-redhat-linux/bits/c++config.h:2732�[m�[K,
from �[01m�[K/opt/rh/gcc-toolset-11/root/usr/include/c++/11/cstdint:38�[m�[K,
from �[01m�[K/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/18.0.0-6631-gcfbdc475/rpm/el8/BUILD/ceph-18.0.0-6631-gcfbdc475/src/arrow/cpp/src/arrow/array/array_binary.h:23�[m�[K,
from �[01m�[K/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/18.0.0-6631-gcfbdc475/rpm/el8/BUILD/ceph-18.0.0-6631-gcfbdc475/src/arrow/cpp/src/arrow/array/array_binary.cc:18�[m�[K:
�[01m�[K/usr/include/features.h:381:4:�[m�[K �[01;31m�[Kerror: �[m�[K#warning _FORTIFY_SOURCE requires compiling with optimization (-O) [�[01;31m�[K-Werror=cpp�[m�[K]
381 | # �[01;31m�[Kwarning�[m�[K _FORTIFY_SOURCE requires compiling with optimization (-O)
| �[01;31m�[K^~~~~~~�[m�[K
cc1plus: all warnings being treated as errors
make[5]: *** [src/arrow/CMakeFiles/arrow_objlib.dir/build.make:90: src/arrow/CMakeFiles/arrow_objlib.dir/array/array_binary.cc.o] Error 1
make[5]: *** Waiting for unfinished jobs....
From: https://shaman.ceph.com/builds/ceph/wip-batrick-testing-20231006.014828-debug/cfbdc475a5ca4098c0330e42cd978c9fd647e012/default/360990/
Suggested solutions: https://github.com/ceph/ceph/pull/53855#issuecomment-1751243429
- Assignee set to Patrick Donnelly
@Patrick i really don't see this as being urgent for rgw. if it's something you need prioritized, please find someone to assign
Casey Bodley wrote:
@Patrick i really don't see this as being urgent for rgw. if it's something you need prioritized, please find someone to assign
Well... it's breaking Debug builds in main. Shouldn't that be urgent?
Patrick Donnelly wrote:
Casey Bodley wrote:
@Patrick i really don't see this as being urgent for rgw. if it's something you need prioritized, please find someone to assign
Well... it's breaking Debug builds in main. Shouldn't that be urgent?
this isn't a regression. debug builds were just enabled and aren't part of our qa validation
note that seastar builds remove the __FORTIFY_SOURCE
cflag in https://github.com/ceph/ceph/blob/e90f0e9/ceph.spec.in#L1322-L1328. a comment there mentions this same arrow issue:
# remove from CFLAGS too because it causes the arrow submodule to fail with:
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
export CFLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g')
- Assignee deleted (
Patrick Donnelly)
I'm not planning to fix this.
- Status changed from New to Won't Fix
- Priority changed from Urgent to Normal
- Backport deleted (
reef,quincy)
thanks Patrick. it sounds like this only effects centos 8 builds which will hopefully be retired soonish, so closing as "won't fix". if someone does need this fixed, feel free to reopen it - ceph.spec.in
has an existing workaround for seastar that just needs to updated to detect these debug rpms
- Status changed from Won't Fix to Fix Under Review
- Assignee set to Casey Bodley
- Pull request ID set to 55303
- Status changed from Fix Under Review to Resolved
- Status changed from Resolved to Pending Backport
- Target version deleted (
v19.0.0)
- Backport set to reef
- Has duplicate Bug #65866: reef: cannot build arrow with CMAKE_BUILD_TYPE=Debug added
- Copied to Backport #65885: reef: cmake: __FORTIFY_SOURCE requires compiling with optimization (-O) added
- Tags set to backport_processed
- Target version set to v19.1.0
- Status changed from Pending Backport to Resolved
Also available in: Atom
PDF