Dear NVIDIA, after my jetson agx xavier was upgraded to jetpack 5.1.2, my previous project referenced to the jetson-utils library, mainly
#include "jetson-utils/gstUtility.h"
#include "jetson-utils/imageFormat.h"
#include "jetson-utils/Event.h"
#include "jetson-utils/Mutex.h"
#include "jetson-utils/RingBuffer.h",
in the latest system compilation error /usr/bin/ld: cannot find -lnvbuf_utils, I found that the original nvbuf_utils was deprecated and used NvUtils instead, nvbuf_utils migration to NvUtils, I want to know that jetson-utils will be updated and adapted in the future? Thank you.
@DreamLan jetson-utils had already been updated to automatically detect the presence of nvbuf_utils, and disable it’s use if necessary:
Can you try pulling the latest code? Or if that doesn’t work, please provide the build errors you are getting.
1 Like
@dusty_nv ,Hello,I pulled the latest jetson-utils from scratch, then compiled and installed, and then compiled my project and I still get the following error
My system version is jetpack 5.1.2, my cpp project CMakeLists.txt file content is as follows:
cmake_minimum_required(VERSION 2.8.3)
project(gst_cam)
set(CMAKE_CXX_FLAGS "-std=c++14 -Wno-return-type -Wno-deprecated-declarations -Wno-write-strings ${CMAKE_CXX_FLAGS}")
find_package(catkin REQUIRED COMPONENTS
# cmake_modules
roslaunch
roslint
roscpp
std_msgs
nodelet
dynamic_reconfigure
cv_bridge
image_transport
sensor_msgs
camera_info_manager
nav_msgs
flw_msgs
)
find_package(PkgConfig REQUIRED)
find_package(jetson-utils REQUIRED)
# message("jetson-utils_INCLUDE_DIRS: ${jetson-utils_INCLUDE_DIRS}")
# message("jetson-utils_LIBRARIES: ${jetson-utils_LIBRARIES}")
find_package(CUDA REQUIRED)
message("-- CUDA version: ${CUDA_VERSION}")
set(CUDA_NVCC_FLAGS
${CUDA_NVCC_FLAGS};
-O3
-gencode arch=compute_53,code=sm_53
-gencode arch=compute_62,code=sm_62
)
set(jetson_mm_deps_LIBRARIES
nvjpeg
# pthread v4l2 EGL GLESv2 X11
nvbuf_utils
# nvosd drm
# cuda cudart
# nvinfer nvparsers
)
# option for enabling/disabling NVMM memory in multimedia stack
option(ENABLE_NVMM "Enable use of NVMM zero-copy memory in video and camera streaming" OFF)
message("-- NVMM zero-copy memory: ENABLE_NVMM=${ENABLE_NVMM}")
if(ENABLE_NVMM)
add_definitions(-DENABLE_NVMM)
endif()
# add_message_files(FILES GstCamMsg.msg)
# add_service_files(FILES GstCamSrv.srv)
# add_action_files(FILES GstCam.action)
# generate_messages(DEPENDENCIES actionlib_msgs std_msgs)
generate_dynamic_reconfigure_options(
cfg/GstCam.cfg
# cfg/StreamPublisher.cfg
)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES ${PROJECT_NAME}
# CATKIN_DEPENDS dynamic_reconfigure message_runtime actionlib actionlib_msgs roscpp std_msgs
# DEPENDS system_lib
)
include_directories(
# /usr/src/jetson_multimedia_api/include/libjpeg-8b
/usr/src/jetson_multimedia_api/include
/usr/include/gstreamer-1.0
/usr/include/glib-2.0
# /usr/include/libxml2
/usr/lib/aarch64-linux-gnu/gstreamer-1.0/include
/usr/lib/aarch64-linux-gnu/glib-2.0/include/
)
include_directories(
include
${CUDA_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)
link_directories(
/usr/lib/aarch64-linux-gnu/tegra
# /usr/local/cuda/lib64
)
# gst_cam_node
add_executable(gst_cam_node
src/gst_cam.cpp
src/gst_app.cpp
src/gst_cam_node.cpp
)
add_dependencies(gst_cam_node
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(gst_cam_node
${jetson_mm_deps_LIBRARIES}
${CUDA_LIBRARIES}
jetson-utils
gstreamer-1.0 gstapp-1.0 gstpbutils-1.0 glib-2.0 gobject-2.0
gstrtspserver-1.0 gstrtsp-1.0
${catkin_LIBRARIES}
)
# gst_cam_nodelet
add_library(gst_cam_nodelet
src/gst_cam.cpp
src/gst_app.cpp
src/gst_cam_nodelet.cpp
)
add_dependencies(gst_cam_nodelet
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(gst_cam_nodelet
${jetson_mm_deps_LIBRARIES}
${CUDA_LIBRARIES}
jetson-utils
gstreamer-1.0 gstapp-1.0 gstpbutils-1.0 glib-2.0 gobject-2.0
gstrtspserver-1.0 gstrtsp-1.0
${catkin_LIBRARIES}
)
# stream_nodelet
add_library(stream_nodelet
src/gst_app.cpp
src/streamer.cpp
src/stream_nodelet.cpp
)
add_dependencies(stream_nodelet
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(stream_nodelet
${jetson_mm_deps_LIBRARIES}
${CUDA_LIBRARIES}
jetson-utils
gstreamer-1.0 gstapp-1.0 gstpbutils-1.0 glib-2.0 gobject-2.0
gstrtspserver-1.0 gstrtsp-1.0
${catkin_LIBRARIES}
)
# stream_transport
add_library(stream_transport
src/stream_publisher.cpp
# src/stream_subscriber.cpp
src/manifest.cpp
src/gst_app.cpp
src/streamer.cpp
)
add_dependencies(stream_transport
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(stream_transport
${jetson_mm_deps_LIBRARIES}
${CUDA_LIBRARIES}
jetson-utils
gstreamer-1.0 gstapp-1.0 gstpbutils-1.0 glib-2.0 gobject-2.0
gstrtspserver-1.0 gstrtsp-1.0
${catkin_LIBRARIES}
)
install(TARGETS
gst_cam_node
gst_cam_nodelet
stream_nodelet
stream_transport
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
# install(PROGRAMS
# scripts/
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
install(FILES
${PROJECT_NAME}_nodelet.xml
stream_nodelet.xml
stream_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
install(DIRECTORY launch config
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# )
install(DIRECTORY include/
DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)
roslaunch_add_file_check(
launch/
)
set(ROSLINT_CPP_OPTS
"--filter=-whitespace,-build/header_guard,-build/namespaces,
-build/include_order,-readability/streams,-runtime/references")
roslint_cpp()
# roslint_add_test()
Is there an error in my CMakeLists .txt file? The header file I reference jetson-utils in my project is as follows
#include "jetson-utils/gstUtility.h"
#include "jetson-utils/imageFormat.h"
// #include "jetson-utils/Event.h"
// #include "jetson-utils/Mutex.h"
#include "jetson-utils/RingBuffer.h"
#include "jetson-utils/cudaColorspace.h"
#include <jetson-utils/logging.h>
thank you.
@DreamLan you have nvbuf_utils
in your own CMakeLists?
system
Closed
September 11, 2023, 8:08am
8
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.