这个问题困扰了几天,十分烦恼。
问题描述:
程序:
#include <stdio.h>
int
main(int argc, char** argv)
{
return 0;
}
makefile文件内容:
test:test.o
buildclient -o test -f " test.o"
现象:用make编绎报以下错误:
cc -O -c test.c
buildclient -o test -f " test.o"
Could not load program buildclient:
Dependent module libengine.so could not be loaded.
Could not load module libengine.so.
System error: No such file or directory
make: The error code from the last command is 255.
我用which libengine.so
/home/tuxedo/lib/libengine.so能找到,不用make,手工执行如下:
cc -O -c test.c
buildclient -o test -f " test.o"
编绎通过。
问题:工程比较大,不可能手工执行。
经过N次的尝试,发现还是不能解决,也想不到是什么问题,后与BEA公司联系(BEA技术支持确实不错,非常热心),BEA也提供了几种思路,刚开始怀疑是makefile的问题,后改成BEA提供的makefile,内容如下:
INCDIR=$(TUXDIR)/include
BINDIR=$(TUXDIR)/bin
CFLAGS= -I$(INCDIR) -g
CSRC = \
test.c
OBJS = $(CSRC:.c=.o)
EXES = \
test
FILES = \
stderr \
stdout \
tuxconfig
all: $(EXES) $(TUXCONFIG)
test:
buildclient -v -o test -f test.c
clean:
rm -f $(OBJS) $(EXES) $(FILES)
clobber: clean
rm -f *.o
lint:
lint -u -D NOWHAT -I. -I$(INCDIR) $(CSRC)
问题依旧,因为手工执行是可以编绎,makefile不应该存在问题,该makefile在aix5.1、tuxdeo8.0下是可以编绎过的。后来BEA建议用root用户去编绎,改用root编绎,程序通过。虽然问题已解决,但还有以下不解,因为buclient是调用aix上的cc编绎器,make是通过makefile来编绎,将makefile拆出来是可以编绎过,但make却不行(用ROOT可以),为什么了?BEA告诉我是AIX的安全问题,aix为了安全。个人不太赞同这种说法,由于涉及到AIX中的cc、tuxdeo中的buclient、informix中的esql,目前也不知道具体问题在哪,留给它们以后去处理吧。
posted on 2007-09-29 11:05 自由空间 阅读(1578)
评论(3) 编辑 收藏