Open danbone opened 4 months ago
I don't have that issue, but a different one. Specifically stf is built with LTO while the linking stage doesn't accept it. Got a flag mismatch.
Have you tried with clang
?
Same error as this?
/home/dan/anaconda3/envs/riscv_perf_model/bin/../lib/gcc/x86_64-conda-linux-gnu/10.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: stf_lib/lib/libstf.a: error adding symbols: file format not recognized
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [CMakeFiles/olympia.dir/build.make:131: olympia] Error 1
make[1]: *** [CMakeFiles/Makefile2:360: CMakeFiles/olympia.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Managed to fix it by moving the setup_stf_linker out of the Release build only
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bee99e2..4fc4298 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,9 +38,10 @@ set (DISABLE_STF_DOXYGEN ON)
if (CMAKE_BUILD_TYPE MATCHES "^[Rr]elease")
set (FULL_LTO true)
- include(${STF_LIB_BASE}/cmake/stf_linker_setup.cmake)
- setup_stf_linker(false)
endif()
+include(${STF_LIB_BASE}/cmake/stf_linker_setup.cmake)
+setup_stf_linker(false)
+
# Use ccache if installed
find_program (CCACHE_PROGRAM ccache)
Will create PR
Yep. That’s the one. Thanks for debugging On Mar 5, 2024, at 4:42 PM, danbone @.***> wrote: Managed to fix it by moving the setup_stf_linker out of the Release build only diff --git a/CMakeLists.txt b/CMakeLists.txt index bee99e2..4fc4298 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,9 +38,10 @@ set (DISABLE_STF_DOXYGEN ON)
if (CMAKE_BUILD_TYPE MATCHES "^[Rr]elease") set (FULL_LTO true)
find_program (CCACHE_PROGRAM ccache)
Will create PR
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
I'm trying to compile with CMAKE_BUILD_TYPE=Profile but I'm getting the following error:
Has anyone else encountered this?