I suspect that the README.txt is outdated and incomplete.
First of all, I don’t know why the README.txt says NVIDIA has used deb packages from Ubuntu Precise (12.04), as L4T 21.5 is based on Ubuntu Trusty (14.04).
Secondly, the paths mentioned in the README.txt are obviously wrong. For instance, /usr/lib/libglib-2.0.so should really be /usr/lib/arm-linux-gnueabihf/libglib-2.0.so.
Thirdly, and most importantly, the autogen.sh script and the resulting configure script are also wrong. configure won’t properly test for libnvjpeg; instead, it tests for libjpeg and libjpeg-mmx, and fails (because the compiler can’t even find the libjpeg.so file, with the given flags and environment variables), so configure thinks it can’t build the jpeg plugin and writes a Makefile that doesn’t do anything. At this point, I don’t even know how NVIDIA ever got it to cross-compile. configure tries to link with -ljpeg instead of -lnvjpeg, and there’s no mention of downloading libnvjpeg.so anywhere in the README.txt.
I don’t have the knowledge and time to fix this mess. Could somebody (preferably from NVIDIA) step forward and fix these issues?
Just me or it looks like you are compiling and linking against the regular libjpeg.so, and then replacing the libjpeg.so symlink with libnvjpeg.so so that the gstreamer plugin will call into libnvjpeg.so instead? That looks super hacky. XD
According to your instructions, you are replacing the symlinks only after running make, so the resulting libgstjpeg.so is still linked to the regular libjpeg.so, no?
And then, because configure will generate a bunch of files, I just have to replace all occurrences of -ljpeg with -lnvjpeg in the generated files, before running make.
At least I got it to compile and link. ldd shows that libgstjpeg.so is linked to libnvjpeg.so.
Now I’ll check if the resulting plugin actually works.