1

I built VIPS 8.1.1 with

libjpeg-turbo-official           1.4.2-2050921

I downloaded the package from the sourceforge project website. After installing the package, I configure Vips with

./configure --with-jpeg-includes=/opt/libjpeg-turbo/include --with-jpeg-libraries=/opt/libjpeg-turbo/lib64/libjpeg.a

When I tried either loading jpeg file or saving jpeg file, I had this error message:

VipsJpeg: Wrong JPEG library version: library is 80, caller expects 62

Did I build the VIPS the wrong way? Should I build with other version of libjpeg-turbo ? Or is it other problem?

I found another library file named libjpeg.so.62, I tried uninstalling Vips and rebuild again with this file, but the problem persists.

user3667217
  • 2,172
  • 2
  • 17
  • 29

1 Answers1

0

That message is produced by libjpeg if the headers don't match the library. It sounds like you've built against .62 headers but tried to run with the .80 library binary.

Check your system for old header files and remove them. Maybe apt-get remove libjpeg-dev?

jcupitt
  • 10,213
  • 2
  • 23
  • 39
  • The folder I specified for jpeg-libcludes has only jpgelib.h for the libjpge-turbo-official I installed. Its location is different from any other jpge library existing on the computer. I can't remove those anyways, because there are needed by some other program. Does Vips look for jpeglib.h in addition to the place I specified ? – user3667217 Nov 09 '15 at 16:30
  • 1
    gcc will always search every directory on -I for `jpeglib.h`. Check the exact flags that are reaching the compiler to see which one it's picking up. You should be able to remove the `-dev` version of the package, it's only got the headers in, no program needs it at runtime. – jcupitt Nov 09 '15 at 20:36
  • You don't say what platform you are using, but you probably have a platform libjpeg-turbo. I would use that rather than building your own. It has the same ABI, so it's simple drop-in replacement. – jcupitt Nov 09 '15 at 20:40
  • I'm using ubuntu 14.04 LTS. Indeed there is already a libjpeg-turbo on it. Where can I see the which jpeglib.h the compiler picked up? – user3667217 Nov 10 '15 at 02:07
  • Oh perfect. It's the same headers, just remove the libjpeg-turbo you built, don't give vips any flags, and it'll pick up the turbo version automatically. Use `ldd` to verify which library it's linking to at runtime. – jcupitt Nov 10 '15 at 11:12
  • So indeed Vips can't be built with libjpeg-tubro-official, the version I downloaded from the project website. By directing Vips to use the libjpeg-turbo8-dev that's already in the Ubuntu, I can successfully build Vips and use the jpeg library. It's funny, because OpenCV can be built with the libjpeg-turbo-official but not libjpeg-turbo8-dev that came with Ubuntu. – user3667217 Nov 11 '15 at 08:25