You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use Surelog as an external package when compiling a custom visitor outside of Surelog's directory or install path. But I see unrecognized UHDM functions. Could I be missing explicitly specifying any UHDM related info my CMakeLists?
PS: Surelog is not installed in the default path, I ran make install PREFIX=<custom path> which is the same as in the CMakeLists.txt file.
The CMakeLists.txt file is as below:
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
project(ExampleProject)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/../import/black-parrot-tools/surelog_install)
find_package(Surelog REQUIRED)
# these were added because my system was unable to find libsurelog.a
link_directories(${CMAKE_SOURCE_DIR}/../import/black-parrot-tools/surelog_install/lib/surelog)
find_library(SURELOG_LIBRARY NAMES surelog PATHS /home/mysanoop/zynq-farm/zynq-parrot/cosim/import/black-parrot-tools/surelog_install/lib/surelog)
if(NOT SURELOG_LIBRARY)
message(FATAL_ERROR "Surelog library not found")
endif()
# these were added because my system complained as shown in the error log
link_directories(${CMAKE_SOURCE_DIR}/../import/black-parrot-tools/surelog_install/lib/uhdm)
find_library(UHDM_LIBRARY NAMES uhdm PATHS /home/mysanoop/zynq-farm/zynq-parrot/cosim/import/black-parrot-tools/surelog_install/lib/uhdm)
if(NOT UHDM_LIBRARY)
message(FATAL_ERROR "UHDM library not found")
endif()
add_executable(example instrumentation/walker.cpp)
target_link_libraries(example surelog)
target_include_directories(example PRIVATE ${SURELOG_INCLUDE_DIRS})
When I run this with cmake -S . -B out && make -C out, here's the error log after the linking stage:
<path as above>/surelog_install/lib/surelog/libsurelog.a(Surelog.cpp.o): In function `SURELOG::shutdown_compiler(SURELOG::scompiler*)':
Surelog.cpp:(.text+0xba): undefined reference to `UHDM::Serializer::Purge()'
<path as above>/surelog_install/lib/surelog/libsurelog.a(CommandLineParser.cpp.o): In function `SURELOG::CommandLineParser::processOutputDirectory_(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)':
CommandLineParser.cpp:(.text+0x2f46): undefined reference to `UHDM::SymbolFactory::add(std::basic_string_view<char, std::char_traits<char> >)'
... (goes on)
The text was updated successfully, but these errors were encountered:
I'm trying to use Surelog as an external package when compiling a custom visitor outside of Surelog's directory or install path. But I see unrecognized UHDM functions. Could I be missing explicitly specifying any UHDM related info my CMakeLists?
PS: Surelog is not installed in the default path, I ran
make install PREFIX=<custom path>
which is the same as in the CMakeLists.txt file.The CMakeLists.txt file is as below:
When I run this with
cmake -S . -B out && make -C out
, here's the error log after the linking stage:The text was updated successfully, but these errors were encountered: