【发布时间】:2010-05-12 21:58:36
【问题描述】:
您好,我在从 openbsd 4.7 的端口编译 ghostscript 时遇到问题。
所以我安装了 jpeg-7,我有 obsd4.7 的最新端口树。
===> Building for ghostscript-8.63p11
mkdir -p /usr/ports/pobj/ghostscript-8.63p11/ghostscript-8.63/obj
gmake LDFLAGS='-L/usr/local/lib -shared' GS_XE=./obj/../obj/libgs.so.11.0 STDIO_IMPLEMENTATION=c DISPLAY_DEV=./obj/../obj/display.dev BINDIR=./obj/../obj GLGENDIR=./obj/../obj GLOBJDIR=./obj/../obj PSGENDIR=./obj/../obj PSOBJDIR=./obj/../obj CFLAGS='-O2 -fno-reorder-blocks -fno-reorder-functions -fomit-frame-pointer -march=i386 -fPIC -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-builtin -fno-common -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/local/lib/ghostscript/8.63\"' prefix=/usr/local ./obj/../obj/gsc
gmake[1]: Entering directory `/usr/ports/pobj/ghostscript-8.63p11/ghostscript-8.63'
cc -I./obj/../obj -I./src -DHAVE_MKSTEMP -O2 -fno-reorder-blocks -fno-reorder-functions -fomit-frame-pointer -march=i386 -fPIC -Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-builtin -fno-common -DGS_DEVS_SHARED -DGS_DEVS_SHARED_DIR=\"/usr/local/lib/ghostscript/8.63\" -DGX_COLOR_INDEX_TYPE='unsigned long long' -o ./obj/../obj/sdctc.o -c ./src/sdctc.c
In file included from src/sdctc.c:17:
obj/jpeglib_.h:1:21: jpeglib.h: No such file or directory
In file included from src/sdctc.c:19:
src/sdct.h:58: error: field `err' has incomplete type
src/sdct.h:70: error: field `err' has incomplete type
src/sdct.h:72: error: field `cinfo' has incomplete type
src/sdct.h:73: error: field `destination' has incomplete type
src/sdct.h:84: error: field `err' has incomplete type
src/sdct.h:87: error: field `dinfo' has incomplete type
src/sdct.h:88: error: field `source' has incomplete type
gmake[1]: *** [obj/../obj/sdctc.o] Error 1
gmake[1]: Leaving directory `/usr/ports/pobj/ghostscript-8.63p11/ghostscript-8.63'
gmake: *** [so] Error 2
*** Error code 2
Stop in /usr/ports/print/ghostscript/gnu (line 2225 of /usr/ports/infrastructure/mk/bsd.port.mk).
我试图在 Makefile 中的 CFLAGS 中再放置一个参数,其值为“-I/usr/local”,但没有运气 =( irc [freenode 服务器,#openbsd 频道] 中的人根本拒绝为端口提供任何帮助,甚至更多 - 因为这是 4.7 不稳定版本。
我有理由使用这个版本,端口相信我 =)
CFLAGS+= -DSYS_TYPES_HAS_STDINT_TYPES \
-I${LOCALBASE}/include \
-I${LOCALBASE}/include/ijs \
-I${LOCALBASE}/include/libpng \
【问题讨论】:
-
您是否考虑过询问 OpenBSD 邮件列表或加入 SILC 频道?
-
Earlz: 他们很固执.. =( 他们真的非常BAD WORD 关于编译问题.. 我试着写信给那个邮件列表,现在我有两个想法出了什么问题. 1) 用户空间和端口树版本混合,我的意思是端口是 -STABLE 而用户空间是 -RELEASE ,这可能是个问题。我需要从 -STABLE CVS 存储库重新编译整个用户空间。 2) CFLAGS 出了点问题,但现在是那个端口维护者的想法。他真的认为我是个白痴,并且我的 $CFLASG /etc/mk.conf 破坏了这个端口,尽管你键入 make,makefile 将当前 CFLAGS 附加到 Makefile 中的 cflags。
-
所以你要自定义 CFLAGS 吗?我不建议这样做。是的,它充其量是一个充满敌意的社区。不过,我会让用户空间达到 -STABLE 。完全不支持使用混合系统,这可能是您出现问题的原因。
-
是的,在将用户空间升级到 -STABLE 之后,现在可以了。是的,我有用于内存优化的 mk.conf 服装标志 =) 现在它可以工作了:P