← All tasks
cppJonathanSalwan/Triton #1089Not a task: not reproduced

[build] Build failure on OSX

envgap__JonathanSalwan__Triton-1089

01 / FAILURE SIGNATURE

As reported upstream

No identifying execution failure has been captured.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
e44484702157246621bf6e5ab6fd12dc884c0282
Manifest
src/examples/cpp/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

JonathanSalwan/Triton #1089 · read the original issue
Hi guys,

I met a build issue on our OSX pipeline test:

```

[51/59] : && /Library/Developer/CommandLineTools/usr/bin/c++ -pthread -g -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -static src/examples/cpp/CMakeFiles/ir.dir/ir.cpp.o -o src/examples/cpp/ir  src/libtriton/libtriton.a  /Users/vagrant/Data/installed/x64-osx/debug/lib/libz3.a  /Users/vagrant/Data/installed/x64-osx/debug/lib/libcapstone.a && :

FAILED: src/examples/cpp/ir 

: && /Library/Developer/CommandLineTools/usr/bin/c++ -pthread -g -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -static src/examples/cpp/CMakeFiles/ir.dir/ir.cpp.o -o src/examples/cpp/ir  src/libtriton/libtriton.a  /Users/vagrant/Data/installed/x64-osx/debug/lib/libz3.a  /Users/vagrant/Data/installed/x64-osx/debug/lib/libcapstone.a && :

ld: library not found for -lcrt0.o

```



After some invesgations, I found a same isue in stackoverflow:

https://stackoverflow.com/questions/3801011/ld-library-not-found-for-lcrt0-o-on-osx-10-6-with-gcc-clang-static-flag



The related code is:

https://github.com/JonathanSalwan/Triton/blob/ebd74c52eb01ff9b51e478fe40c010edd4dfe731/src/examples/cpp/CMakeLists.txt#L6



Should it be:

```cmake

    if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

        set(CMAKE_EXE_LINKER_FLAGS "-static")

    endif()

```

?

I don't know whether gnu need this.



Related: https://github.com/microsoft/vcpkg/pull/23111



Thanks,

Jack
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]