Project

General

Profile

Actions

Bug #63130

closed

cmake: __FORTIFY_SOURCE requires compiling with optimization (-O)

Added by Patrick Donnelly 7 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
Q/A
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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

Actions #1

Updated by Casey Bodley 7 months ago

  • 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

Actions #2

Updated by Patrick Donnelly 7 months ago

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?

Actions #3

Updated by Casey Bodley 7 months ago

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

Actions #4

Updated by Casey Bodley 7 months ago

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')

Actions #5

Updated by Patrick Donnelly 7 months ago

  • Assignee deleted (Patrick Donnelly)

I'm not planning to fix this.

Actions #6

Updated by Casey Bodley 7 months ago

  • 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

Actions #7

Updated by Casey Bodley 4 months ago

  • Status changed from Won't Fix to Fix Under Review
  • Assignee set to Casey Bodley
  • Pull request ID set to 55303
Actions #8

Updated by Casey Bodley 3 months ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF