@@ -16,24 +16,40 @@ RUN /usr/bin/crb enable
1616RUN curl -L https://copr.fedorainfracloud.org/coprs/kpvdr/opentelemetry-cpp/repo/epel-9/kpvdr-opentelemetry-cpp-epel-9.repo > /etc/yum.repos.d/kpvdr-opentelemetry-cpp-epel-9.repo
1717
1818RUN dnf -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install \
19- npm findutils \
19+ findutils git patchelf \
2020 \
21- cmake \
22- make \
23- gcc \
24- gcc-c++ \
21+ cmake ninja-build \
22+ gcc gcc-c++ \
2523 \
2624 opentelemetry-cpp-devel \
2725 cyrus-sasl-devel \
2826 openssl-devel \
2927 python-devel
3028
31- RUN npm install -g @bazel/bazelisk
32-
3329COPY . /src
3430WORKDIR /src
3531
36- RUN bazelisk build //:cli-cpp --enable_bzlmod --verbose_failures --sandbox_debug --experimental_ui_max_stdouterr_bytes=104857600 --//:deps=upstream
32+ RUN git clone --depth=1 https://github.com/apache/qpid-proton.git
33+ RUN cmake -S qpid-proton -B cmake-build-qpid-proton -GNinja \
34+ -DCMAKE_INSTALL_PREFIX=cmake-install \
35+ -DBUILD_BINDINGS=cpp \
36+ -DBUILD_EXAMPLES=OFF \
37+ -DBUILD_TESTING=OFF \
38+ -DSASL_IMPL=cyrus \
39+ -DSSL_IMPL=openssl \
40+ -DPROACTOR=epoll
41+ RUN cmake --build cmake-build-qpid-proton
42+ RUN cmake --install cmake-build-qpid-proton --config RelWithDebInfo
43+
44+ RUN cmake -S . -B cmake-build-cli-cpp -GNinja \
45+ -DCMAKE_INSTALL_PREFIX=cmake-install
46+ # -DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE \
47+ # -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE
48+ RUN cmake --build cmake-build-cli-cpp
49+ RUN cmake --install cmake-build-cli-cpp --config RelWithDebInfo
50+
51+ # fixup finding the proton library, this is something that our build should handle by itself, though
52+ RUN for i in cmake-install/bin/*; do patchelf --add-rpath /usr/local/lib64 $i; done
3753
3854FROM quay.io/centos/centos:stream9
3955
@@ -49,8 +65,7 @@ RUN dnf -y --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install \
4965 cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-lib cyrus-sasl-plain \
5066 openssl
5167
52- COPY --from=build /src/bazel-bin/copy_qpid-proton/qpid-proton/lib64/ /usr/local/lib64
53- COPY --from=build /src/bazel-bin/copy_cli-cpp/cli-cpp/bin/ /usr/local/bin
68+ COPY --from=build /src/cmake-install/ /usr/local
5469
5570RUN mkdir /var/lib/cli-cpp && \
5671 chown -R 1001:0 /var/lib/cli-cpp && \
0 commit comments