Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RPM build on RHEL8 & friends #8843

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/deploy/NVA_build/Base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ RUN ./src/deploy/NVA_build/clone_s3select_submodules.sh
RUN ln -s /lib64/libboost_thread.so.1.66.0 /lib64/libboost_thread.so.1.75.0 || true
#Pass BUILD_S3SELECT down to GYP native build.
#S3Select will be built only if this parameter is equal to "1".
#Next step would fail for RHEL8 and derivates
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment correct?
I thought the point is to fix RHEL8?

RUN GYP_DEFINES="BUILD_S3SELECT=$BUILD_S3SELECT BUILD_S3SELECT_PARQUET=$BUILD_S3SELECT_PARQUET" npm run build

##############################################################
Expand Down
6 changes: 5 additions & 1 deletion src/deploy/RPM_build/RPM.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ COPY ./src/deploy/standalone/noobaa-logrotate ./src/deploy/standalone/noobaa-log
COPY ./src/manage_nsfs ./src/manage_nsfs
COPY ./src/nc ./src/nc

# Install GCC11 toolchain on Centos8 to match the default toolchain of Centos9
RUN if [ "$CENTOS_VER" == "8" ];then dnf install -y -q gcc-toolset-11; fi

WORKDIR /build

COPY ./src/deploy/RPM_build/* ./
Expand All @@ -54,4 +57,5 @@ ENV BUILD_S3SELECT_PARQUET=${BUILD_S3SELECT_PARQUET}
ENV CENTOS_VER=${CENTOS_VER}
ENV SRPM_ONLY=${SRPM_ONLY}
RUN mkdir -p /export
CMD ./packagerpm.sh /export /build
# Set GCC Toolset in path - won't exist in RHEL9 but that's OK
CMD PATH=/opt/rh/gcc-toolset-11/root/bin:$PATH ./packagerpm.sh /export /build
4 changes: 4 additions & 0 deletions src/deploy/RPM_build/noobaa.spec
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ BuildRequires: make
BuildRequires: gcc-c++
BuildRequires: boost-devel
BuildRequires: libcap-devel
%if "%{CENTOS_VER}" == "8"
BuildRequires: gcc-toolset-11
%endif

Recommends: jemalloc

Expand All @@ -43,6 +46,7 @@ NooBaa is a data service for cloud environments, providing S3 object-store inter
%setup -n noobaa -q

%build
PATH=/opt/rh/gcc-toolset-11/root/bin:$PATH
NODEJS_VERSION="%{nodever}"
SKIP_NODE_INSTALL=1 source src/deploy/NVA_build/install_nodejs.sh $NODEJS_VERSION

Expand Down
1 change: 1 addition & 0 deletions src/native/s3select/s3select.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
'target_name': 's3select',
'type': 'static_library',
'cflags_cc!': ['-fno-rtti'],
'cflags_cc': ['-std=c++17'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the implications of this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it will change anything. The reason I added it here was because I noticed that ceph/s3select use this version to build s3select - https://github.com/ceph/s3select/blob/5e7484b6b73216396f6bd6b1c8d6abca639be3e4/CMakeLists.txt#L13

'include_dirs': [
'<@(napi_include_dirs)',
'../../../submodules/s3select/include',
Expand Down