小弟最近在用IXP425這塊板子
因為需要使用到chpasswd這個指令,所以去找了程式碼
打算把他cross compile放到板子上執行,但是一直出現下面的訊息:
[root@localhost chpasswd-1.4]# make
arm-linux-gcc chpasswd.o -lcrypt -o chpasswd.cgi
/IXP/toolchain/usr/local/bin/../lib/gcc-lib/arm-linux/3.2.1/../../../../arm-linux/lib/libcrypt.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [chpasswd.cgi] Error 1
我makefile的內容如下
#Generated automatically from Makefile.in by configure.
# Makefile.in for chpasswd.cgi
CC = arm-linux-gcc
LANGUAGE = English
CGIDIR = /usr/local/etc/httpd/cgi-bin
SRCDIR = .
INSTALL = cp
LIBCRYPT = -lcrypt
CFLAGS = -O2 -w $(DEFINES) -mbig-endian
PREFIX = /usr/local/etc/chpaansswd
DEFS = -I. -DHAVE_LIBCRYPT=1 -DHAVE_DIRENT_H=1 -DSTDC_HEADERS=1 -DHAVE_CRYPT_H=1 -DHAVE_PWD_H=1 -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_TIME_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRSTR=1 -DPREFIX=\"/usr/local/etc/chpasswd\"
INSTALL_PROGRAM = $(INSTALL)an
SRCS = chpasswd.c
OBJS = chpasswd.o
DISTFILES = $(SRCS)
all: chpasswd.cgi
.c.o:
$(CC) -c -mbig-endian $(CPPFLAGS) $(CFLAGS) $(DEFS) -D$(LANGUAGE) $<
chpasswd.cgi: $(OBJS)
$(CC) $(OBJS) $(LIBCRYPT) -o $@
install: all
$(INSTALL_PROGRAM) chpasswd.cgi $(CGIDIR)/chpasswd.cgi
chmod 755 $(CGIDIR)/chpasswd.cgi
-@if test ! -d $(PREFIX); then \
echo "mkdir $(PREFIX)"; \
mkdir $(PREFIX); \
fi
@if test ! -f $(PREFIX)/chpasswd.conf; then \
echo "cp $(PREFIX)/chpasswd.conf"; \
cp chpasswd.conf $(PREFIX)/chpasswd.conf; \
chmod 755 $(PREFIX)/chpasswd.conf; \
else \
cp chpasswd.conf $(PREFIX)/chpasswd.conf.orig; \
fi
@if test ! -f $(PREFIX)/chpasswd.log; then \
echo "touch $(PREFIX)/chpasswd.log"; \
touch $(PREFIX)/chpasswd.log; \
chmod 777 $(PREFIX)/chpasswd.log; \
fi
uninstall:
rm -f $(CGIDIR)/chpasswd.cgi
TAGS: $(SRCS)
etags $(SRCS)
clean:
rm -f chpasswd.cgi *.o core
mostlyclean: clean
distclean: clean
rm -f Makefile config.status config.cache config.log
realclean: distclean
rm -f TAGS
這樣是有哪邊要改卻沒改到的嗎,或是說我的chpasswd的版本有問
希望各位大大能夠幫忙解答一下