Project

General

Profile

Actions

Bug #63130

closed

cmake: __FORTIFY_SOURCE requires compiling with optimization (-O)

Added by Patrick Donnelly over 2 years ago. Updated 9 months ago.

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

0%

Source:
Q/A
Backport:
reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v19.0.0-898-g1112689da4e
Released In:
v19.2.0~849
Upkeep Timestamp:
2025-07-11T21:37:57+00:00

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


Related issues 2 (0 open2 closed)

Has duplicate rgw - Bug #65866: reef: cannot build arrow with CMAKE_BUILD_TYPE=DebugDuplicate

Actions
Copied to rgw - Backport #65885: reef: cmake: __FORTIFY_SOURCE requires compiling with optimization (-O)ResolvedCasey BodleyActions
Actions #1

Updated by Casey Bodley over 2 years 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 over 2 years 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 over 2 years 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 over 2 years 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 over 2 years ago

  • Assignee deleted (Patrick Donnelly)

I'm not planning to fix this.

Actions #6

Updated by Casey Bodley over 2 years 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 about 2 years 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 about 2 years ago

  • Status changed from Fix Under Review to Resolved
Actions #9

Updated by Casey Bodley almost 2 years ago

  • Status changed from Resolved to Pending Backport
  • Target version deleted (v19.0.0)
  • Backport set to reef
Actions #10

Updated by Casey Bodley almost 2 years ago

  • Has duplicate Bug #65866: reef: cannot build arrow with CMAKE_BUILD_TYPE=Debug added
Actions #11

Updated by Casey Bodley almost 2 years ago

  • Copied to Backport #65885: reef: cmake: __FORTIFY_SOURCE requires compiling with optimization (-O) added
Actions #13

Updated by Patrick Donnelly almost 2 years ago

  • Target version set to v19.1.0
Actions #14

Updated by Patrick Donnelly almost 2 years ago

  • Status changed from Pending Backport to Resolved
Actions #15

Updated by Upkeep Bot 9 months ago

  • Merge Commit set to 1112689da4ec3a92e933aba6d84474847f8eba0c
  • Fixed In set to v19.0.0-898-g1112689da4e
  • Released In set to v19.2.0~849
  • Upkeep Timestamp set to 2025-07-11T21:37:57+00:00
Actions

Also available in: Atom PDF