Skip to content

Commit 6b935c0

Browse files
jbachorikclaude
andcommitted
Fix locateLibrary() returning null due to broken endsWith check
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 80a4aec commit 6b935c0

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

.github/workflows/test_workflow.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ jobs:
6666
sudo apt-get install -y curl zip unzip libgtest-dev libgmock-dev binutils
6767
# Install debug symbols for system libraries
6868
sudo apt-get install -y libc6-dbg
69-
# Install GCC with sanitizer support (provides libasan, libtsan for asan/tsan builds)
70-
# Even though clang is the primary compiler, the build falls back to gcc's sanitizer libs
71-
# Install both gcc and the sanitizer runtime libraries explicitly
72-
sudo apt-get install -y gcc g++ libasan6 libtsan2 || sudo apt-get install -y gcc g++ libasan5 libtsan0
7369
if [[ ${{ matrix.java_version }} =~ "-zing" ]]; then
7470
sudo apt-get install -y g++-9 gcc-9
7571
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9
@@ -301,13 +297,11 @@ jobs:
301297
if: steps.set_enabled.outputs.enabled == 'true'
302298
run: |
303299
sudo apt update -y
304-
# Don't remove g++ - keep gcc for sanitizer libraries (libasan, libtsan)
300+
sudo apt remove -y g++
301+
sudo apt autoremove -y
305302
sudo apt install -y curl zip unzip clang make build-essential binutils
306303
# Install debug symbols for system libraries
307304
sudo apt install -y libc6-dbg
308-
# Ensure gcc/g++ are installed for sanitizer support
309-
# Install both gcc and the sanitizer runtime libraries explicitly
310-
sudo apt install -y gcc g++ libasan6 libtsan2 || sudo apt install -y gcc g++ libasan5 libtsan0
311305
if [[ ${{ matrix.java_version }} =~ "-zing" ]]; then
312306
sudo apt -y install g++-9 gcc-9
313307
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9

build-logic/conventions/src/main/kotlin/com/datadoghq/native/util/PlatformUtils.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ object PlatformUtils {
9696
val output = process.inputStream.bufferedReader().readText().trim()
9797
process.waitFor()
9898

99-
if (process.exitValue() == 0 && !output.endsWith("$libName.so")) {
99+
if (process.exitValue() == 0 && output != "$libName.so") {
100100
return output
101101
}
102102
} catch (e: Exception) {
@@ -114,7 +114,7 @@ object PlatformUtils {
114114
val output = process.inputStream.bufferedReader().readText().trim()
115115
process.waitFor()
116116

117-
if (process.exitValue() == 0 && !output.endsWith("$libName.so")) {
117+
if (process.exitValue() == 0 && output != "$libName.so") {
118118
return output
119119
}
120120
} catch (e: Exception) {

0 commit comments

Comments
 (0)