basler / gst-plugin-pylon

The official GStreamer plug-in for Basler cameras
BSD 3-Clause "New" or "Revised" License
42 stars 10 forks source link

Cannot build on ADLINK 2000-JNX (Jetpack 4.6) #60

Closed rvanderwerf closed 3 months ago

rvanderwerf commented 1 year ago

Describe the bug Cannot compile plugin, ninja -C builddir with below error. I installed pylon 6.2 as well because system comes with pylon5, changed all LD_LIBRARY_PATH and PYLON_ROOT

To Reproduce e.g. a gst-launch-1.0 pylonsrc | .... pipeline definition ninja -C builddir

Expected behavior A clear and concise description of what you expected to happen. should build

Environment

adlink@localhost:~/github/gst-plugin-pylon$ ninja -C builddir ninja: Entering directory `builddir' [19/34] Compiling C++ object ext/pylon/libgstpylon.so.p/gstpylon.cpp.o FAILED: ext/pylon/libgstpylon.so.p/gstpylon.cpp.o c++ -Iext/pylon/libgstpylon.so.p -Iext/pylon -I../ext/pylon -I. -I.. -Igst-libs -I../gst-libs -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/orc-0.4 -I/opt/pylon6/include -I/usr/local/cuda/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -O2 -g -fvisibility=hidden -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Winit-self -Wmissing-include-dirs -Wno-multichar -Wvla -Wpointer-arith -fPIC -pthread -DHAVE_CONFIG_H -DNVMM_ENABLED -MD -MQ ext/pylon/libgstpylon.so.p/gstpylon.cpp.o -MF ext/pylon/libgstpylon.so.p/gstpylon.cpp.o.d -o ext/pylon/libgstpylon.so.p/gstpylon.cpp.o -c ../ext/pylon/gstpylon.cpp In file included from ../ext/pylon/gstpylon.cpp:39:0: ../ext/pylon/gstpylondsnvmmbufferfactory.h:55:3: error: ‘NvBufSurfaceAllocateParams’ does not name a type; did you mean ‘NvBufSurfaceCreateParams’? NvBufSurfaceAllocateParams create_params; ^~~~~~ NvBufSurfaceCreateParams [23/34] Compiling C++ object ext/pylon...so.p/gstpylondsnvmmbufferfactory.cpp.o FAILED: ext/pylon/libgstpylon.so.p/gstpylondsnvmmbufferfactory.cpp.o c++ -Iext/pylon/libgstpylon.so.p -Iext/pylon -I../ext/pylon -I. -I.. -Igst-libs -I../gst-libs -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/orc-0.4 -I/opt/pylon6/include -I/usr/local/cuda/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -O2 -g -fvisibility=hidden -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Winit-self -Wmissing-include-dirs -Wno-multichar -Wvla -Wpointer-arith -fPIC -pthread -DHAVE_CONFIG_H -DNVMM_ENABLED -MD -MQ ext/pylon/libgstpylon.so.p/gstpylondsnvmmbufferfactory.cpp.o -MF ext/pylon/libgstpylon.so.p/gstpylondsnvmmbufferfactory.cpp.o.d -o ext/pylon/libgstpylon.so.p/gstpylondsnvmmbufferfactory.cpp.o -c ../ext/pylon/gstpylondsnvmmbufferfactory.cpp In file included from ../ext/pylon/gstpylondsnvmmbufferfactory.cpp:33:0: ../ext/pylon/gstpylondsnvmmbufferfactory.h:55:3: error: ‘NvBufSurfaceAllocateParams’ does not name a type; did you mean ‘NvBufSurfaceCreateParams’? NvBufSurfaceAllocateParams create_params; ^~~~~~ NvBufSurfaceCreateParams ../ext/pylon/gstpylondsnvmmbufferfactory.cpp: In member function ‘virtual void GstPylonDsNvmmBufferFactory::SetConfig(const GstCaps*)’: ../ext/pylon/gstpylondsnvmmbufferfactory.cpp:68:3: error: ‘create_params’ was not declared in this scope create_params.params.gpuId = this->gpu_id; ^~~~~ ../ext/pylon/gstpylondsnvmmbufferfactory.cpp:68:3: note: suggested alternative: ‘sched_param’ create_params.params.gpuId = this->gpu_id; ^~~~~ sched_param ../ext/pylon/gstpylondsnvmmbufferfactory.cpp:77:26: error: ‘NvBufSurfaceTag_CAMERA’ was not declared in this scope create_params.memtag = NvBufSurfaceTag_CAMERA; ^~~~~~ ../ext/pylon/gstpylondsnvmmbufferfactory.cpp:77:26: note: suggested alternative: ‘NvBufSurfaceCopy’ create_params.memtag = NvBufSurfaceTag_CAMERA; ^~~~~~ NvBufSurfaceCopy ../ext/pylon/gstpylondsnvmmbufferfactory.cpp: In member function ‘virtual void GstPylonDsNvmmBufferFactory::AllocateBuffer(size_t, void**, intptr_t&)’: ../ext/pylon/gstpylondsnvmmbufferfactory.cpp:87:3: error: ‘create_params’ was not declared in this scope create_params.params.size = buffer_size; ^~~~~ ../ext/pylon/gstpylondsnvmmbufferfactory.cpp:87:3: note: suggested alternative: ‘sched_param’ create_params.params.size = buffer_size; ^~~~~ sched_param ../ext/pylon/gstpylondsnvmmbufferfactory.cpp:100:3: error: ‘NvBufSurfaceAllocate’ was not declared in this scope NvBufSurfaceAllocate(&surf, batch_size, &create_params); ^~~~~~~~ ../ext/pylon/gstpylondsnvmmbufferfactory.cpp:100:3: note: suggested alternative: ‘NvBufSurfaceCreate’ NvBufSurfaceAllocate(&surf, batch_size, &create_params); ^~~~~~~~ NvBufSurfaceCreate [26/34] Compiling C++ object bindings/...gnu.so.p/src_bindaccessfunctions.cpp.o ninja: build stopped: subcommand failed.

thiesmoeller commented 1 year ago

As per https://github.com/basler/gst-plugin-pylon/blob/main/CHANGELOG.md ( it didn't make it into the Readme :-( ) we currently only support Jetpack 5.x.

please check the hotfix branch: https://github.com/basler/gst-plugin-pylon/tree/feature/hotfix_nvmm_jetson_nano

rvanderwerf commented 1 year ago

This branch seems to build now. Thank you!

thiesmoeller commented 3 months ago

Hi @rvanderwerf ,

we now have binary debian packages for multiple debian and ubuntu versions:

https://github.com/basler/gst-plugin-pylon/releases/tag/v0.7.3

and an explanation to build the plugin debian packages for NVIDIA deepstream including nvmm support:

https://github.com/basler/gst-plugin-pylon?tab=readme-ov-file#debian-nvidia-packaging