diff --git a/.builders/images/linux-aarch64/Dockerfile b/.builders/images/linux-aarch64/Dockerfile index eca90a702cc87..443bf06c88768 100644 --- a/.builders/images/linux-aarch64/Dockerfile +++ b/.builders/images/linux-aarch64/Dockerfile @@ -129,32 +129,6 @@ RUN \ # This is the folder where unixODBC searches for driver config and where we ask customers to copy their config to --sysconfdir=/opt/datadog-agent/embedded/etc -# Dependencies needed to build librdkafka (and thus, confluent-kafka) with kerberos support -RUN \ - DOWNLOAD_URL="https://github.com/LMDB/lmdb/archive/LMDB_{{version}}.tar.gz" \ - VERSION="0.9.29" \ - SHA256="22054926b426c66d8f2bc22071365df6e35f3aacf19ad943bc6167d4cae3bebb" \ - RELATIVE_PATH="lmdb-LMDB_{{version}}/libraries/liblmdb" \ - # No ./configure, use a NOOP - CONFIGURE_SCRIPT="true" \ - bash install-from-source.sh -RUN \ - DOWNLOAD_URL="https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v{{version}}/e2fsprogs-{{version}}.tar.gz" \ - VERSION="1.47.0" \ - SHA256="0b4fe723d779b0927fb83c9ae709bc7b40f66d7df36433bef143e41c54257084" \ - RELATIVE_PATH="e2fsprogs-{{version}}" \ - bash install-from-source.sh --enable-elf-shlibs -RUN \ - # Add -fPIC to let librdkafka link against it statically - CFLAGS="${CFLAGS} -fPIC" \ - # Explicitly ask the linker to use gssapi_krb5, otherwise static compilation fails - LDFLAGS="${LDFLAGS} -L/usr/local/lib -lgssapi_krb5" \ - DOWNLOAD_URL="https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-{{version}}/cyrus-sasl-{{version}}.tar.gz" \ - VERSION="2.1.28" \ - SHA256="7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c" \ - RELATIVE_PATH="cyrus-sasl-{{version}}" \ - bash install-from-source.sh --with-dblib=lmdb --enable-gssapi=/usr/local \ - --enable-static --disable-shared # curl RUN \ DOWNLOAD_URL="https://curl.haxx.se/download/curl-{{version}}.tar.gz" \ diff --git a/.builders/images/linux-aarch64/build_script.sh b/.builders/images/linux-aarch64/build_script.sh index cb58dceeaa005..156fd1d898af7 100644 --- a/.builders/images/linux-aarch64/build_script.sh +++ b/.builders/images/linux-aarch64/build_script.sh @@ -13,19 +13,6 @@ sed -i '/pymqi==/d' /home/requirements.in always_build=() if [[ "${DD_BUILD_PYTHON_VERSION}" == "3" ]]; then - # confluent-kafka and librdkafka need to be compiled from source to get kerberos support - # The librdkafka version needs to stay in sync with the confluent-kafka version, - # thus we extract the version from the requirements file. - kafka_version=$(grep 'confluent-kafka==' /home/requirements.in | sed -E 's/^.*([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+).*$/\1/') - # Libraries need to be explicitly specified for static linking to work properly - LDFLAGS="${LDFLAGS} -L/usr/local/lib -lkrb5 -lgssapi_krb5 -llmdb" \ - DOWNLOAD_URL="https://github.com/confluentinc/librdkafka/archive/refs/tags/v{{version}}.tar.gz" \ - VERSION="${kafka_version}" \ - SHA256="3dc62de731fd516dfb1032861d9a580d4d0b5b0856beb0f185d06df8e6c26259" \ - RELATIVE_PATH="librdkafka-{{version}}" \ - bash install-from-source.sh --enable-sasl --enable-curl - always_build+=("confluent-kafka") - # The version of pyodbc is dynamically linked against a version of the odbc which doesn't come included in the wheel # That causes the omnibus' health check to flag it. Forcing the build so that we do include it in the wheel. always_build+=("pyodbc") diff --git a/.builders/images/linux-x86_64/Dockerfile b/.builders/images/linux-x86_64/Dockerfile index 0ea7bf99315d6..7df6742d43854 100644 --- a/.builders/images/linux-x86_64/Dockerfile +++ b/.builders/images/linux-x86_64/Dockerfile @@ -102,32 +102,6 @@ RUN \ # This is the folder where unixODBC searches for driver config and where we ask customers to copy their config to --sysconfdir=/opt/datadog-agent/embedded/etc -# Dependencies needed to build librdkafka (and thus, confluent-kafka) with kerberos support -RUN \ - DOWNLOAD_URL="https://github.com/LMDB/lmdb/archive/LMDB_{{version}}.tar.gz" \ - VERSION="0.9.29" \ - SHA256="22054926b426c66d8f2bc22071365df6e35f3aacf19ad943bc6167d4cae3bebb" \ - RELATIVE_PATH="lmdb-LMDB_{{version}}/libraries/liblmdb" \ - # No ./configure, use a NOOP - CONFIGURE_SCRIPT="true" \ - bash install-from-source.sh -RUN \ - DOWNLOAD_URL="https://mirrors.edge.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v{{version}}/e2fsprogs-{{version}}.tar.gz" \ - VERSION="1.47.0" \ - SHA256="0b4fe723d779b0927fb83c9ae709bc7b40f66d7df36433bef143e41c54257084" \ - RELATIVE_PATH="e2fsprogs-{{version}}" \ - bash install-from-source.sh --enable-elf-shlibs -RUN \ - # Add -fPIC to let librdkafka link against it statically - CFLAGS="${CFLAGS} -fPIC" \ - # Explicitly ask the linker to use gssapi_krb5, otherwise static compilation fails - LDFLAGS="${LDFLAGS} -L/usr/local/lib -lgssapi_krb5" \ - DOWNLOAD_URL="https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-{{version}}/cyrus-sasl-{{version}}.tar.gz" \ - VERSION="2.1.28" \ - SHA256="7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c" \ - RELATIVE_PATH="cyrus-sasl-{{version}}" \ - bash install-from-source.sh --with-dblib=lmdb --enable-gssapi=/usr/local \ - --enable-static --disable-shared # curl RUN \ DOWNLOAD_URL="https://curl.haxx.se/download/curl-{{version}}.tar.gz" \ diff --git a/.builders/images/linux-x86_64/build_script.sh b/.builders/images/linux-x86_64/build_script.sh index c78bae6127d1f..92cb7977df8b2 100644 --- a/.builders/images/linux-x86_64/build_script.sh +++ b/.builders/images/linux-x86_64/build_script.sh @@ -10,19 +10,6 @@ build_wheels() { always_build=() if [[ "${DD_BUILD_PYTHON_VERSION}" == "3" ]]; then - # confluent-kafka and librdkafka need to be compiled from source to get kerberos support - # The librdkafka version needs to stay in sync with the confluent-kafka version, - # thus we extract the version from the requirements file. - kafka_version=$(grep 'confluent-kafka==' /home/requirements.in | sed -E 's/^.*([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+).*$/\1/') - # Libraries need to be explicitly specified for static linking to work properly - LDFLAGS="${LDFLAGS} -L/usr/local/lib -lkrb5 -lgssapi_krb5 -llmdb" \ - DOWNLOAD_URL="https://github.com/confluentinc/librdkafka/archive/refs/tags/v{{version}}.tar.gz" \ - VERSION="${kafka_version}" \ - SHA256="3dc62de731fd516dfb1032861d9a580d4d0b5b0856beb0f185d06df8e6c26259" \ - RELATIVE_PATH="librdkafka-{{version}}" \ - bash install-from-source.sh --enable-sasl --enable-curl - always_build+=("confluent-kafka") - # The version of pyodbc is dynamically linked against a version of the odbc which doesn't come included in the wheel # That causes the omnibus' health check to flag it. Forcing the build so that we do include it in the wheel. always_build+=("pyodbc") diff --git a/.builders/images/macos-x86_64/builder_setup.sh b/.builders/images/macos-x86_64/builder_setup.sh index 098e555edc560..9f22e3222556e 100644 --- a/.builders/images/macos-x86_64/builder_setup.sh +++ b/.builders/images/macos-x86_64/builder_setup.sh @@ -93,21 +93,3 @@ RELATIVE_PATH="curl-{{version}}" \ # Remove the binary installed so that we consistenly use the same original `curl` binary rm "${DD_PREFIX_PATH}/bin/curl" -# Dependencies needed to build librdkafka (and thus, confluent-kafka) with kerberos support -DOWNLOAD_URL="https://github.com/LMDB/lmdb/archive/LMDB_{{version}}.tar.gz" \ -VERSION="0.9.29" \ -SHA256="22054926b426c66d8f2bc22071365df6e35f3aacf19ad943bc6167d4cae3bebb" \ -RELATIVE_PATH="lmdb-LMDB_{{version}}/libraries/liblmdb" \ -CONFIGURE_SCRIPT="true" \ -INSTALL_COMMAND="make prefix=${DD_PREFIX_PATH} install" \ -XCFLAGS=${CFLAGS} \ - install-from-source -# CFLAGS and LDFLAGS add compiler and linker flags to make static compilation work -CFLAGS="${CFLAGS} -fPIC" \ -LDFLAGS="${LDFLAGS} -L${DD_PREFIX_PATH}/lib -lgssapi_krb5" \ -DOWNLOAD_URL="https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-{{version}}/cyrus-sasl-{{version}}.tar.gz" \ -VERSION="2.1.28" \ -SHA256="7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c" \ -RELATIVE_PATH="cyrus-sasl-{{version}}" \ - install-from-source --with-dblib=lmdb --enable-gssapi="${DD_PREFIX_PATH}" --disable-macos-framework \ - --enable-static --disable-shared diff --git a/.builders/images/macos-x86_64/extra_build.sh b/.builders/images/macos-x86_64/extra_build.sh index f5e49d609e6fb..c74fde227f523 100644 --- a/.builders/images/macos-x86_64/extra_build.sh +++ b/.builders/images/macos-x86_64/extra_build.sh @@ -5,24 +5,6 @@ set -exu # Packages which must be built from source always_build=() -if [[ "${DD_BUILD_PYTHON_VERSION}" == "3" ]]; then - # confluent-kafka and librdkafka need to be compiled from source to get kerberos support - # The librdkafka version needs to stay in sync with the confluent-kafka version, - # thus we extract the version from the requirements file. - kafka_version=$(grep 'confluent-kafka==' "${DD_MOUNT_DIR}/requirements.in" | sed -E 's/^.*([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+).*$/\1/') - LDFLAGS="${LDFLAGS} -L${DD_PREFIX_PATH}/lib -lgssapi_krb5 -llmdb" \ - DOWNLOAD_URL="https://github.com/confluentinc/librdkafka/archive/refs/tags/v{{version}}.tar.gz" \ - VERSION="${kafka_version}" \ - SHA256="3dc62de731fd516dfb1032861d9a580d4d0b5b0856beb0f185d06df8e6c26259" \ - RELATIVE_PATH="librdkafka-{{version}}" \ - bash install-from-source.sh --prefix="${DD_PREFIX_PATH}" --enable-sasl --enable-curl - - # lmdb doesnt't get the actual full path in its install name which means delocate won't find it - # Luckily we can patch it here so that it does. - install_name_tool -change liblmdb.so "${DD_PREFIX_PATH}/lib/liblmdb.so" "${DD_PREFIX_PATH}/lib//librdkafka.1.dylib" - always_build+=("confluent-kafka") -fi - # Make sure IBM MQ libraries are found under /opt/mqm even when we're using the builder cache sudo cp -Rf "${DD_PREFIX_PATH}/mqm" /opt