Page 1 of 1

Help on OSX cross-compiling on 10.6 for 10.5 or before

Posted: 2011-12-08T00:53:02-07:00
by mixersoft
I'm getting this error on some macs, which suggests that my build is not compatible with OSX 10.5:

Code: Select all

Dyld Error Message:
  unknown required load command 0x80000022
So I googled on the web and found this page: http://grauonline.de/wordpress/?p=71

I am using the following commands to build the jpeg delegate libs and also imagemagick

Code: Select all


export MACOSX_DEPLOYMENT_TARGET=10.5

# compile jpeg delegate lib
cd ~/sysconfig/jpeg-8b
./configure   --disable-shared    CC="gcc-4.2" CFLAGS="-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64" CXXFLAGS="-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64" CXX="g++-4.2"
make clean
make
sudo make install

# compile imagemagick
cd ~/sysconfig/ImageMagick-6.7.3-10/
export TARGET_DIR=/Users/xxx/sysconfig/imagemagick_build
export IM_CONFIGURE="--with-quantum-depth=8 --with-jpeg --with-jp2 --with-lcms --enable-delegate-build"
./configure  $IM_CONFIGURE --prefix=$TARGETDIR/x86_64 CC="gcc-4.2" CFLAGS="-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64" CXXFLAGS="-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -arch x86_64" CXX="g++-4.2"
make clean
make
sudo make install

But I cannot successfully configure/build with jpeg. The following errors appears in my config.log:

Code: Select all

| #include <jconfig.h>
configure:29401: result: no
configure:29401: checking jconfig.h presence
configure:29401: gcc-4.2 -E  -I/Users/xxx/sysconfig/ImageMagick-6.7.3-10/magick -I/Users/xxx/sysconfig/ImageMagick-6.7.3-10/wand  conftest.c
configure:29401: $? = 0
configure:29401: result: yes
configure:29401: WARNING: jconfig.h: present but cannot be compiled
configure:29401: WARNING: jconfig.h:     check for missing prerequisite headers?
configure:29401: WARNING: jconfig.h: see the Autoconf documentation
configure:29401: WARNING: jconfig.h:     section "Present But Cannot Be Compiled"
configure:29401: WARNING: jconfig.h: proceeding with the compiler's result
configure:29401: checking for jconfig.h
configure:29401: result: no
configure:29409: checking jerror.h usability
configure:29409: gcc-4.2 -std=gnu99 -std=gnu99 -c  -fopenmp -mmaco

What am I doing wrong? BTW. if I just build for 10.6, everything works out just fine. i.e.

Code: Select all

./configure  $IM_CONFIGURE --prefix=$TARGETDIR/x86_64