@@ -44,7 +44,7 @@ repository_version="${distribution_version}"
4444
4545cmake_package=cmake
4646cmake_command=cmake
47- devtoolset =
47+ gcc_toolset =
4848scl_package=
4949have_arrow_libs=no
5050have_flight=yes
@@ -65,11 +65,17 @@ echo "::group::Prepare repository"
6565case " ${distribution} -${distribution_version} " in
6666 almalinux-8)
6767 distribution_prefix=" almalinux"
68+ gcc_toolset=14
6869 have_arrow_libs=yes
6970 ruby_devel_packages+=(redhat-rpm-config)
7071 install_command=" dnf install -y --enablerepo=powertools"
7172 info_command=" dnf info --enablerepo=powertools"
7273 ;;
74+ almalinux-9)
75+ distribution_prefix=" almalinux"
76+ gcc_toolset=12
77+ ruby_devel_packages+=(redhat-rpm-config)
78+ ;;
7379 almalinux-* )
7480 distribution_prefix=" almalinux"
7581 ruby_devel_packages+=(redhat-rpm-config)
@@ -169,11 +175,11 @@ ${install_command} \
169175 git \
170176 libarchive \
171177 pkg-config
172- if [ -n " ${devtoolset } " ]; then
178+ if [ -n " ${gcc_toolset } " ]; then
173179 ${install_command} \
174- devtoolset- ${devtoolset} -gcc-c++ \
175- devtoolset- ${devtoolset} - make
176- . /opt/rh/devtoolset- ${devtoolset } /enable
180+ gcc-toolset- ${gcc_toolset} \
181+ make
182+ . /opt/rh/gcc-toolset- ${gcc_toolset } /enable
177183else
178184 ${install_command} \
179185 gcc-c++ \
@@ -191,13 +197,25 @@ if [ "${cmake_version_major}" -gt "3" ] || \
191197 [ " ${cmake_version_major} " -eq " 3" -a " ${cmake_version_minor} " -ge " 25" ]; then
192198 cp -a " ${TOP_SOURCE_DIR} /cpp/examples/minimal_build" build/
193199 pushd build/minimal_build
194- ${cmake_command} .
195- make -j$( nproc)
196- ./arrow-example
197- c++ -o arrow-example example.cc $( pkg-config --cflags --libs arrow) -std=c++2a
198- ./arrow-example
200+ cmake -S . -B build_shared
201+ make -C build_shared -j$( nproc)
202+ build_shared/arrow-example
203+ cmake -S . -B build_static -DARROW_LINK_SHARED=OFF
204+ make -C build_static -j$( nproc)
205+ build_static/arrow-example
206+ mkdir -p build_pkg_config
207+ c++ \
208+ example.cc \
209+ -o build_pkg_config/arrow-example \
210+ $( pkg-config --cflags --libs arrow) \
211+ -std=c++2a
212+ build_pkg_config/arrow-example
199213 popd
200214fi
215+ if [ -n " ${gcc_toolset} " ]; then
216+ dnf remove -y gcc-toolset-${gcc_toolset}
217+ ${install_command} gcc-c++
218+ fi
201219echo " ::endgroup::"
202220
203221if [ " ${have_glib} " = " yes" ]; then
0 commit comments