Skip to content

rpm: fix build failure on aarch64 #545

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

Merged
merged 1 commit into from
Jul 26, 2023
Merged
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
60 changes: 60 additions & 0 deletions fluent-package/yum/centos-7-aarch64/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

ARG FROM=centos:7
FROM ${FROM}

COPY qemu-* /usr/bin/

ARG DEBUG

RUN \
quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \
yum update -y ${quiet} && \
yum install -y ${quiet} centos-release-scl && \
yum install -y ${quiet} epel-release && \
yum groupinstall -y ${quiet} "Development Tools" && \
# Use devtoolset-10 explicitly because devtoolset-11 lacks required gcc and so on
yum install -y ${quiet} \
devtoolset-10 \
rh-ruby26-ruby-devel \
rh-ruby26-rubygems \
rh-ruby26-rubygem-rake \
rh-ruby26-rubygem-bundler \
libedit-devel \
ncurses-devel \
libyaml-devel \
libffi-devel \
git \
cyrus-sasl-devel \
nss-softokn-freebl-devel \
pkg-config \
rpm-build \
rpmdevtools \
redhat-rpm-config \
openssl-devel \
tar \
zlib-devel \
rpmlint \
cmake3 && \
# raise IPv4 priority
echo "precedence ::ffff:0:0/96 100" > /etc/gai.conf && \
# enable multiplatform feature
source /opt/rh/rh-ruby26/enable && gem install --no-document --install-dir /opt/rh/rh-ruby26/root/usr/share/gems bundler builder && \
scl enable devtoolset-10 bash && \
yum clean ${quiet} all && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
10 changes: 10 additions & 0 deletions fluent-package/yum/fluent-package.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,23 @@ The stable distribution of Fluentd, formerly known as td-agent.

%build
%if %{use_scl_gcc}
%ifarch aarch64
# Because of missing complete devtoolset-11-*, enable older devtoolset-10 (only for CentOS 7 aarch64)
. /opt/rh/devtoolset-10/enable
%else
. /opt/rh/devtoolset-11/enable
%endif
%endif

%install
%if %{use_scl_gcc}
%ifarch aarch64
# Because of missing complete devtoolset-11-*, enable older devtoolset-10 (only for CentOS 7 aarch64)
. /opt/rh/devtoolset-10/enable
%else
. /opt/rh/devtoolset-11/enable
%endif
%endif
%if %{use_scl_ruby}
. /opt/rh/rh-ruby%{scl_ruby_ver}/enable
%endif
Expand Down