There is new version of leptonica of library that solved problem with old jpeg header file (but this is not most important part of changes in new version :-)). Library prefer to create static version and there is no spec file to for create rpm package for my linux system. Fortunately I found older rpm package in PLD Linux Distribution with patch to build shared and static library.
I prefer to use package management system to keep system clean and easy maintenaned. So I updated spec file (I removed string related to Polish, rpmlint did not like changelog entries…) and patch for creating shared library. I skipped patch for endiantest, I am not sure if it is need. Final leptonlib-1.66-0.src.rpm is in download section of tesseract-ocr-en.
If you have rpm base linux distribution you can use following command to create library:
$ rpmbuild --rebuild leptonlib-1.66-0.src.rpm
Than you can install it by (you can have other paths to files!) :
$ sudo rpm -Uvh ~/rpmbuild/RPMS/x86_64/leptonlib-*.rpm