Docker Build Error: Cannot find -lnvbufsurface and -lnvbufsurftransform

I encountered an error when trying to build a Docker image using a docker buildx (BuildKit). The error appears to be related to missing libraries, specifically -lnvbufsurface and -lnvbufsurftransform.


WORKDIR /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-image-meta-test
RUN make && make install

Build command:

docker buildx build --platform linux/arm64 --file Dockerfile .

Error message:

 > [3/3] RUN make && make install:                                                                                                                                                                                                                                              
#0 1.026 cc -c -o deepstream_image_meta_test.o -DPLATFORM_TEGRA -I../../../includes -I /usr/local/cuda-11.4/include -pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include deepstream_image_meta_test.c                    
#0 2.947 cc -o deepstream-image-meta-test deepstream_image_meta_test.o -lgstreamer-1.0 -lgobject-2.0 -lglib-2.0 -L/opt/nvidia/deepstream/deepstream-6.2/lib/ -lnvdsgst_meta -lnvds_meta -lnvbufsurface -lnvbufsurftransform -lnvdsgst_helper -lnvds_batch_jpegenc -L/usr/local/cuda-11.4/lib64/ -lcudart -lm -lcuda -Wl,-rpath,/opt/nvidia/deepstream/deepstream-6.2/lib/                                                                                                                                                                                       
#0 3.165 /usr/bin/ld: cannot find -lnvbufsurface                                                                                                                                                                                                                                
#0 3.165 /usr/bin/ld: cannot find -lnvbufsurftransform
#0 3.171 collect2: error: ld returned 1 exit status
#0 3.180 make: *** [Makefile:68: deepstream-image-meta-test] Error 1

docker buildx version: buildx v0.10.4 c513d34
I am run it on linux/amd64 machine.

can you find and in the path /opt/nvidia/deepstream/deepstream-6.2/lib/ .

Yes. I can see it here.

could you share the output of ll /opt/nvidia/deepstream/deepstream-6.2/lib/

I have this output:
lrwxrwxrwx 1 root root 57 Jan 31 23:55 /opt/nvidia/deepstream/deepstream-6.2/lib/ -> /usr/lib/aarch64-linux-gnu/tegra/

But when I made ls -ll /usr/lib/aarch64-linux-gnu/tegra/ I had error ls: cannot access '/usr/lib/aarch64-linux-gnu/tegra/': No such file or directory. I guess it because buildx.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

please refer to building docker sample:Docker Containers — DeepStream 6.2 Release documentation

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.