Skip navigation.
 
mlRe: Compiling on Leopard, running on Tiger
FROM : Gerben Wierda
DATE : Fri Jul 25 22:40:32 2008

On Jul 25, 2008, at 6:00 PM, Christiaan Hofman wrote:

> One way you could go about is to separate the code using the X 
> libraries into a separate framework which you build with the 10.4u 
> SDK.
>
> Otherwise, I believe you can link against a different version from 
> the X libraries. Perhaps the one from the 10.4 SDK or a copy patched 
> using install_name_tool. But I've never done that myself.


What I am trying to do is compile Ghostscript under Leopard such that 
it can be used under Tiger.

Compiling object files goes like this:

> rm -f ./obj/gscdefs.c
> cp ./src/gscdef.c ./obj/gscdefs.c
> cc -mmacosx-version-min=10.4  -DHAVE_MKSTEMP -DHAVE_HYPOT  -
> DHAVE_FONTCONFIG -O2 -Wall -Wstrict-prototypes -Wundef -Wmissing-
> declarations -Wmissing-prototypes -Wwrite-strings -Wno-strict-
> aliasing -fno-builtin -fno-common -DHAVE_STDINT_H -
> DGX_COLOR_INDEX_TYPE="unsigned long long"  -I./obj -I./src  -o ./
> obj/gscdefs.o -c ./obj/gscdefs.c



This looks all fine. Then the gs makefile runs a large link command 
that looks like this:

> cc -mmacosx-version-min=10.4 -L/usr/X11/lib -o ./bin/gs ./obj/
> gsromfs1.o ./obj/gs.o ./obj/gp_getnv.o \
> ./obj/gp_unix.o \
> ./obj/gp_unifs.o \
> ./obj/gp_unifn.o \
> ./obj/gp_stdia.o \
> ./obj/gp_unix_cache.o \


[a lot of same stuff removed]

> ./obj/siinterp.o \
> ./obj/siscale.o \
> ./obj/sidscale.o \
> ./obj/gsnorop.o \
> ./obj/gp_strdl.o \
> -L/usr/X11/lib \
> -lXt \
> -lSM \
> -lICE \
> -lXext \
> -lX11 \
> -lcupsimage \
> -lcups \
> -lz \
> -lpthread \
>  -ldl -lm -liconv -lstdc++ -L/usr/local/lib -lfontconfig -lm


Now, this starts with -mmacosx-version-min=10.4 but still the result is:

> /usr/local/bin/gs --version
> dyld: Library not loaded: /usr/lib/libiconv.2.dylib
>  Referenced from: /usr/local/bin/gs
>  Reason: Incompatible library version: gs requires version 7.0.0 or 
> later, but libiconv.2.dylib provides version 5.0.0
> Trace/BPT trap


Obviously, the -mmacosx-version-min is not enough to let the linker 
use /Developer/SDKs/MacOSX10.4u.sdk/usr/lib/libiconv.2.dylib instead 
of /usr/lib/libiconv.2.dylib. Anything else I can try?

G

Related mailsAuthorDate
mlCompiling on Leopard, running on Tiger Gerben Wierda Jul 25, 16:26
mlRe: Compiling on Leopard, running on Tiger Christiaan Hofman Jul 25, 18:00
mlRe: Compiling on Leopard, running on Tiger Gerben Wierda Jul 25, 22:40
mlRe: Compiling on Leopard, running on Tiger Christiaan Hofman Jul 25, 23:46
mlRe: Compiling on Leopard, running on Tiger Gerben Wierda Jul 26, 00:10
mlRe: Compiling on Leopard, running on Tiger Christiaan Hofman Jul 26, 00:21