Incorrect JPEG Version
Posted: 2014-02-06T16:07:14-07:00
Hey guys!
So I've been trying to get things working on my end for quite a bit now, but am starting to be at a loss as to what's happening. This is my current situation:
* I need to build a number of delegates for MagickWand to use (libjpeg, libpng, libtiff, etc.), but am focusing on libjpeg for now (just a first step).
* I need to build MagickWand static libraries (libMagickCore-6.Q16.a and libMagickWand-6.Q16.a) and link them against the libjpeg delegate.
* I need to copy over those archives (as well as their header files) to another folder and use them to be linked against other objects (to use MagickWand).
Note that I am able to do all of this with no warnings (that I can see from the output), but, when I run a binary in the other folder (the repo I copy the MagickWand static files over to), it gives me the following error:
This seems strange since I built libjpeg myself. These are the versions that I am using:
* ImageMagick-6.8.7-8
* jpeg-8c
I have tried the approach of building libjpeg separately and then copying over the necessary files (libjpeg.a, libjpeg.la as well as all headers in include) and linked against that. I have also tried the approach outlined here by user "magick": viewtopic.php?t=13145 (that is - I used the "--enable-delegate-build" flag and copied the libjpeg folder into the ImageMagick source folder before configuring and building).
I am using CMake to outline the rules of building and making, and I'm using clang for the "CC" environment variable and the "CFLAGS" environment variable is set to "-O3 -g -DNDEBUG". This is what my configure command looks like (after building libjpeg and moving into the ImageMagick source directory named as "jpeg"):
This is the useful output from "make":
and
I should also mention that I've also tried to do this with ljpeg version 9 (just to see what would happen), and then I was experiencing this error:
This seems to imply there's still some sort of linking error, but I can't be positive. Any help would be really appreciated.
So I've been trying to get things working on my end for quite a bit now, but am starting to be at a loss as to what's happening. This is my current situation:
* I need to build a number of delegates for MagickWand to use (libjpeg, libpng, libtiff, etc.), but am focusing on libjpeg for now (just a first step).
* I need to build MagickWand static libraries (libMagickCore-6.Q16.a and libMagickWand-6.Q16.a) and link them against the libjpeg delegate.
* I need to copy over those archives (as well as their header files) to another folder and use them to be linked against other objects (to use MagickWand).
Note that I am able to do all of this with no warnings (that I can see from the output), but, when I run a binary in the other folder (the repo I copy the MagickWand static files over to), it gives me the following error:
Code: Select all
Wrong JPEG library version: library is 90, caller expects 80
* ImageMagick-6.8.7-8
* jpeg-8c
I have tried the approach of building libjpeg separately and then copying over the necessary files (libjpeg.a, libjpeg.la as well as all headers in include) and linked against that. I have also tried the approach outlined here by user "magick": viewtopic.php?t=13145 (that is - I used the "--enable-delegate-build" flag and copied the libjpeg folder into the ImageMagick source folder before configuring and building).
I am using CMake to outline the rules of building and making, and I'm using clang for the "CC" environment variable and the "CFLAGS" environment variable is set to "-O3 -g -DNDEBUG". This is what my configure command looks like (after building libjpeg and moving into the ImageMagick source directory named as "jpeg"):
Code: Select all
CONFIGURE_COMMAND env CC=clang CXX=clang++ CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS} ./configure --enable-static --disable-shared --enable-delegate-build --disable-installed --prefix=${BUILD_DIR}/ImageMagick
--without-bzlib --without-djvu --without-dps --without-fftw
--without-fpx --without-fontconfig --without-freetype
--without-jbig --without-jp2 --without-lcms --without-lcms2
--without-lqr --without-lzma --without-magick-plus-plus
--without-openexr --without-pango --without-tiff --without-webp
--without-xml --without-zlib
Code: Select all
checking for JPEG...
checking jconfig.h usability... yes
checking jconfig.h presence... yes
checking for jconfig.h... yes
checking jerror.h usability... yes
checking jerror.h presence... yes
checking for jerror.h... yes
checking jmorecfg.h usability... yes
checking jmorecfg.h presence... yes
checking for jmorecfg.h... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... yes
checking for JPEG library is version 6b or later... yes
checking if JPEG package is complete... yes
Code: Select all
ImageMagick is configured as follows. Please verify that this configuration
matches your expectations.
Host system type: x86_64-apple-darwin13.0.0
Build system type: x86_64-apple-darwin13.0.0
Option Value
-------------------------------------------------------------------------------
Shared libraries --enable-shared=no no
Static libraries --enable-static=yes yes
Module support --with-modules=no no
GNU ld --with-gnu-ld=no no
Quantum depth --with-quantum-depth=16 16
High Dynamic Range Imagery
--enable-hdri=no no
Delegate Configuration:
BZLIB --with-bzlib=no no
Autotrace --with-autotrace=no no
Dejavu fonts --with-dejavu-font-dir=default none
DJVU --with-djvu=no no
DPS --with-dps=no no
FFTW --with-fftw=no no
FlashPIX --with-fpx=no no
FontConfig --with-fontconfig=no no
FreeType --with-freetype=no no
GhostPCL None pcl6 (unknown)
GhostXPS None gxps (unknown)
Ghostscript None gs (unknown)
Ghostscript fonts --with-gs-font-dir=default none
Ghostscript lib --with-gslib=no no
Graphviz --with-gvc=no
JBIG --with-jbig=no no
JPEG v1 --with-jpeg=yes yes
JPEG-2000 --with-jp2=no no
LCMS v1 --with-lcms=no no
LCMS v2 --with-lcms2=no no
LQR --with-lqr=no no
LTDL --with-ltdl=yes no
LZMA --with-lzma=no
Magick++ --with-magick-plus-plus=no no
MUPDF --with-mupdf=no no
OpenEXR --with-openexr=no no
PANGO --with-pango=no no
PERL --with-perl=no no
PNG --with-png=yes no
RSVG --with-rsvg=no no
TIFF --with-tiff=no no
WEBP --with-webp=no no
Windows fonts --with-windows-font-dir= none
WMF --with-wmf=no no
X11 --with-x= no
XML --with-xml=no no
ZLIB --with-zlib=no yes
X11 Configuration:
X_CFLAGS =
X_PRE_LIBS =
X_LIBS =
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/build/ImageMagick
EXEC-PREFIX = /Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/build/ImageMagick
VERSION = 6.8.7
CC = clang
CFLAGS = -Wall -fexceptions -D_FORTIFY_SOURCE=0 -D_THREAD_SAFE -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
CPPFLAGS = -I/Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/build/ImageMagick/include/ImageMagick-6
PCFLAGS = -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16
DEFS = -DHAVE_CONFIG_H
LDFLAGS = -L/Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/ImageMagick-6.8.7-8/jpeg/.libs -L/Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/ImageMagick-6.8.7-8/jpeg -L/Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/ImageMagick-6.8.7-8/magick -L/Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/ImageMagick-6.8.7-8/wand
MAGICK_LDFLAGS = -L/Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/build/ImageMagick/lib -L/Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/ImageMagick-6.8.7-8/jpeg/.libs -L/Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/ImageMagick-6.8.7-8/jpeg -L/Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/ImageMagick-6.8.7-8/magick -L/Users/vinay/Desktop/Code/upthere/3rdparty/ImageMagick/ImageMagick-6.8.7-8/wand
LIBS = -ljpeg -lz -lm
CXX = clang++
CXXFLAGS = -D_THREAD_SAFE -pthread
FEATURES = DPC
DELEGATES = mpeg jpeg zlib
Code: Select all
JPEG parameter struct mismatch: library thinks size is 632, caller expects 664