JPEG parameter struct mismatch in TK1 with caffe.

Dear developers.
I have a problem for jpeg library issue in TK1.

I am using QT-5.7.0 and TK1 with caffe for Deep learning algorithm.
So I cross-compile in my host PC(64bit-ubuntu).

And i can see the error message.

JPEG parameter struct mismatch: library thinks size is 432, caller expects 488.

I think that the problem is OPENCV libjpeg issue by caffe.

/////////////////////// host PC QT install
-opengl es2
-make libs
-make tools
-gstreamer 0.10
-qpa xcb
-sysroot ~/tk1/TK1/Linux_for_Tegra_tk1/rootfs
-device linux-jetson-tk1-g++
-device-option CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-
-prefix /usr/local/qt570-tk1
-hostprefix /usr/local/qt570-tk1
-opensource -nomake examples -nomake tests
-confirm-license -v

/////////// TK1 device
ldd binary. => /usr/lib/arm-linux-gnueabihf/ (0xb6f65000)
/home/superbin/Nephron/classifier/…/data/ (0xb6f4a000) => /usr/local/lib/ (0xb6f12000) => /usr/lib/ (0xb6c80000) => /usr/local/qt570-tk1/lib/ (0xb6bcc000) => /usr/local/qt570-tk1/lib/ (0xb6bb8000) => /usr/local/qt570-tk1/lib/ (0xb67f7000) => /usr/lib/arm-linux-gnueabihf/ (0xb674d000) => /lib/arm-linux-gnueabihf/ (0xb672c000) => /lib/arm-linux-gnueabihf/ (0xb664e000)
/lib/ (0xb6f92000) => /usr/lib/ (0xb6614000) => /usr/lib/ (0xb6393000) => /home/superbin/caffe/build/lib/ (0xb5d59000) => /usr/lib/arm-linux-gnueabihf/ (0xb5d23000) => /lib/arm-linux-gnueabihf/ (0xb5d15000) => /lib/arm-linux-gnueabihf/ (0xb5cf9000) => /usr/local/cuda-6.5/lib/ (0xb5cb0000) => /lib/arm-linux-gnueabihf/ (0xb5c95000) => /usr/lib/ (0xb5c70000) => /lib/arm-linux-gnueabihf/ (0xb5c04000) => /usr/local/qt570-tk1/lib/ (0xb5b10000) => /usr/local/qt570-tk1/lib/ (0xb5781000) => /usr/lib/arm-linux-gnueabihf/ (0xb562c000) => /usr/lib/arm-linux-gnueabihf/ (0xb552e000) => /lib/arm-linux-gnueabihf/ (0xb5523000) => /usr/lib/arm-linux-gnueabihf/ (0xb54e3000) => /lib/arm-linux-gnueabihf/ (0xb54c3000) => /usr/lib/arm-linux-gnueabihf/ (0xb5468000) => /usr/lib/arm-linux-gnueabihf/ (0xb5427000) => /usr/lib/arm-linux-gnueabihf/ (0xb5160000) => /usr/lib/arm-linux-gnueabihf/ (0xb50e5000) => /usr/lib/arm-linux-gnueabihf/ (0xb50a8000) => /lib/arm-linux-gnueabihf/ (0xb4fe0000) => /usr/lib/arm-linux-gnueabihf/neon/vfp/ (0xb4653000) => /usr/lib/arm-linux-gnueabihf/neon/vfp/ (0xb458c000) => /usr/lib/arm-linux-gnueabihf/neon/vfp/ (0xb4569000) => /usr/lib/arm-linux-gnueabihf/neon/vfp/ (0xb4541000) => /usr/local/cuda/lib/ (0xb2ccf000) => /usr/local/cuda/lib/ (0xafb2e000) => /usr/lib/arm-linux-gnueabihf/ (0xafb0e000) => /usr/lib/arm-linux-gnueabihf/ (0xafa5c000) => /usr/lib/arm-linux-gnueabihf/ (0xafa2f000) => /usr/lib/arm-linux-gnueabihf/ (0xaf813000) => /usr/lib/arm-linux-gnueabihf/ (0xaf7d9000) => /usr/lib/arm-linux-gnueabihf/ (0xaf7c5000) => /usr/lib/arm-linux-gnueabihf/ (0xaf7ac000) => /usr/lib/ (0xaf791000) => /usr/lib/arm-linux-gnueabihf/tegra-egl/ (0xaf77b000) => /usr/lib/arm-linux-gnueabihf/ (0xae107000) => /lib/arm-linux-gnueabihf/ (0xae0e6000) => /usr/lib/arm-linux-gnueabihf/ (0xae0d4000) => /usr/lib/arm-linux-gnueabihf/ (0xae0c9000) => /usr/lib/arm-linux-gnueabihf/ (0xae0b8000) => /usr/lib/arm-linux-gnueabihf/ (0xadfd2000) => /usr/lib/arm-linux-gnueabihf/ (0xadfc5000) => /usr/lib/arm-linux-gnueabihf/ (0xadfa7000) => /usr/lib/arm-linux-gnueabihf/ (0xadefd000) => /usr/lib/arm-linux-gnueabihf/ (0xadedd000) => /usr/lib/arm-linux-gnueabihf/ (0xaddf2000) => /usr/lib/arm-linux-gnueabihf/ (0xadddb000) => /usr/lib/arm-linux-gnueabihf/ (0xadd9d000) => /usr/lib/arm-linux-gnueabihf/ (0xadd6e000) => /usr/lib/arm-linux-gnueabihf/ (0xadd5f000) => /usr/lib/arm-linux-gnueabihf/ (0xadd55000) => /usr/lib/arm-linux-gnueabihf/ (0xadd42000) => /usr/lib/arm-linux-gnueabihf/ (0xadd34000) => /usr/lib/arm-linux-gnueabihf/ (0xadd25000) => /usr/lib/arm-linux-gnueabihf/ (0xadd1a000) => /usr/lib/arm-linux-gnueabihf/ (0xadd10000) => /usr/lib/arm-linux-gnueabihf/ (0xadcfd000) => /usr/lib/arm-linux-gnueabihf/ (0xadcef000) => /lib/arm-linux-gnueabihf/ (0xadcb7000) => /usr/lib/arm-linux-gnueabihf/ (0xadbda000) => /usr/lib/arm-linux-gnueabihf/ (0xadaa8000) => /usr/lib/arm-linux-gnueabihf/vfp/neon/ (0xad922000) => /usr/lib/arm-linux-gnueabihf/ (0xad7b5000) => /usr/lib/arm-linux-gnueabihf/ (0xad78b000) => /usr/lib/arm-linux-gnueabihf/ (0xad755000) => /usr/lib/arm-linux-gnueabihf/ (0xad73e000) => /usr/lib/arm-linux-gnueabihf/ (0xad724000) => /usr/lib/arm-linux-gnueabihf/ (0xad693000) => /usr/lib/arm-linux-gnueabihf/ (0xad661000) => /usr/lib/arm-linux-gnueabihf/ (0xad644000) => /usr/lib/arm-linux-gnueabihf/ (0xad5d7000) => /usr/lib/arm-linux-gnueabihf/ (0xad5c5000) => /usr/lib/arm-linux-gnueabihf/ (0xad5ad000) => /usr/lib/arm-linux-gnueabihf/ (0xad593000) => /usr/lib/arm-linux-gnueabihf/ (0xad50d000) => /lib/arm-linux-gnueabihf/ (0xad4f9000) => /usr/lib/ (0xad4ec000) => /usr/lib/ (0xad328000) => /usr/lib/arm-linux-gnueabihf/ (0xad2ae000) => /usr/lib/arm-linux-gnueabihf/ (0xad247000) => /usr/lib/arm-linux-gnueabihf/ (0xad22c000) => /usr/lib/arm-linux-gnueabihf/ (0xad1ae000) => /usr/lib/arm-linux-gnueabihf/ (0xad1a3000) => /usr/lib/arm-linux-gnueabihf/ (0xad195000) => /lib/arm-linux-gnueabihf/ (0xad177000) => /lib/arm-linux-gnueabihf/ (0xad15e000) => /usr/lib/arm-linux-gnueabihf/ (0xad11d000) => /usr/lib/arm-linux-gnueabihf/ (0xad10f000) => /lib/arm-linux-gnueabihf/ (0xad0ef000) => /usr/lib/arm-linux-gnueabihf/ (0xad0e1000) => /usr/lib/arm-linux-gnueabihf/ (0xad089000) => /lib/arm-linux-gnueabihf/ (0xad025000) => /usr/lib/arm-linux-gnueabihf/ (0xad011000) => /usr/lib/arm-linux-gnueabihf/ (0xacfe3000) => /usr/lib/arm-linux-gnueabihf/ (0xacfd7000) => /usr/lib/arm-linux-gnueabihf/ (0xacfcb000) => /usr/lib/arm-linux-gnueabihf/ (0xacfad000) => /usr/lib/arm-linux-gnueabihf/ (0xacfa1000) => /lib/arm-linux-gnueabihf/ (0xacf94000)

If you have opinions or solutions, let me know it.
Thanks for your kind help.

I don’t know about this specific error, but if you cross compile a user space application which links to other libraries, then not only do you need the cross compiler, you also need the “sysroot” files. What you are seeing might be the result of a library within your sysroot not matching that from the Jetson. What do you use for sysroot?

Note that one option for sysroot would be to clone the Jetson, loopback mount the clone, and then set up your sysroot to use the clone. Then you’d know your libraries match. Even so, there may be other causes, but that’d be where I’d start to look if cross compiling. More notes on your cross compile setup, L4T version, so on, might help.

You do have several packages involved though, so it could be one of those package versions wants something different than the other package…in which case a clone wouldn’t change anything.


I solved my problem.


How did you solve the issue? I am facing a similar problem