LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 525|回复: 3

cxacru编译出错,请进来看看

[复制链接]
发表于 2006-9-9 07:53:32 | 显示全部楼层 |阅读模式
这是make过程的错误

[root@liu cxacru]# make
cd init && make clean
make[1]: Entering directory `/usr/cxacru/init'
rm -f cxload cxioctl cxloaddbg cxloaddbgt
make[1]: Leaving directory `/usr/cxacru/init'
cd module2 && make clean
make[1]: Entering directory `/usr/cxacru/module2'
rm -f *.o .*.flags *.ko *.mod.* .*.o.cmd .*.ko.cmd
make[1]: Leaving directory `/usr/cxacru/module2'
cd sarlib && make clean
make[1]: Entering directory `/usr/cxacru/sarlib'
/bin/rm -f *.o
make[1]: Leaving directory `/usr/cxacru/sarlib'
cd panel && make clean
make[1]: Entering directory `/usr/cxacru/panel'
rm -f cxpanel *.bak
make[1]: Leaving directory `/usr/cxacru/panel'
cd bridged && make clean
make[1]: Entering directory `/usr/cxacru/bridged'
rm -f br2684ctl
make[1]: Leaving directory `/usr/cxacru/bridged'
cd init && make && make install
make[1]: Entering directory `/usr/cxacru/init'
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -pipe -march=x86_64 -Wall -DLINUX -I../include -lusb -lpthread cxload.c -o cxload
cxload.c:1: 错误:-march= 所带参数(x86_64)不正确
cxload.c:1: 错误:-mtune= 所带参数(x86_64)不正确
make[1]: *** [cxload] 错误 1
make[1]: Leaving directory `/usr/cxacru/init'
make: *** [CX_INIT] 错误 2
[root@liu cxacru]# make
cd init && make clean
make[1]: Entering directory `/usr/cxacru/init'
rm -f cxload cxioctl cxloaddbg cxloaddbgt
make[1]: Leaving directory `/usr/cxacru/init'
cd module2 && make clean
make[1]: Entering directory `/usr/cxacru/module2'
rm -f *.o .*.flags *.ko *.mod.* .*.o.cmd .*.ko.cmd
make[1]: Leaving directory `/usr/cxacru/module2'
cd sarlib && make clean
make[1]: Entering directory `/usr/cxacru/sarlib'
/bin/rm -f *.o
make[1]: Leaving directory `/usr/cxacru/sarlib'
cd panel && make clean
make[1]: Entering directory `/usr/cxacru/panel'
rm -f cxpanel *.bak
make[1]: Leaving directory `/usr/cxacru/panel'
cd bridged && make clean
make[1]: Entering directory `/usr/cxacru/bridged'
rm -f br2684ctl
make[1]: Leaving directory `/usr/cxacru/bridged'
cd init && make && make install
make[1]: Entering directory `/usr/cxacru/init'
gcc -O2 -Wstrict-prototypes -fomit-frame-pointer -pipe -march=x86_64 -Wall -DLINUX -I../include -lusb -lpthread cxload.c -o cxload
cxload.c:1: 错误:-march= 所带参数(x86_64)不正确
cxload.c:1: 错误:-mtune= 所带参数(x86_64)不正确
make[1]: *** [cxload] 错误 1
make[1]: Leaving directory `/usr/cxacru/init'
make: *** [CX_INIT] 错误 2

这是/usr/cxacru目录下的文件

[root@liu cxacru]# ls
bridged   cxacru.prj      cxacru.spec  firmware  leeme     panel   scripts
copiando  cxacru.prj.bak  debian       include   Makefile  readme  todo
copying   cxacru.pws      doc          init      module2   sarlib

这是运行Makefile是的信息
[root@liu cxacru]# ./Makefile
./Makefile: line 6: syntax error near unexpected token `$(shell [ -f /etc/debian _version ] && echo "yes"),'
./Makefile: line 6: `ifeq ($(shell [ -f /etc/debian_version ] && echo "yes"), ye s)'

这是makefile文件的内容
[root@liu cxacru]# cat Makefile
#
# Makefile to build and install all files for Conexant AccessRunner
#

RPMBIN="rpmbuild"
ifeq ($(shell [ -f /etc/debian_version ] && echo "yes"), yes)
        DISTRO = "deb"
else
ifeq ($(shell [ -f /etc/mandrake-release ] && echo "yes"), yes)
        DISTRO = ""
else
ifeq ($(shell [ -f /etc/redhat-release ] && echo "yes"), yes)
        DISTRO = "rh"
else
ifeq ($(shell [ -f /etc/SuSE-release ] && echo "yes"), yes)
        DISTRO = "suse"
        RPMBIN = "rpm"
else
        DISTRO = ""
endif
endif
endif
endif

DEST_MACHINE = $(shell uname -m)
DEST_KERNEL = $(shell uname -r)
DEST_KERNEL_MAIN = $(shell uname -r | cut -d'.' -f1-2)
KERNEL_PATH = /lib/modules/$(DEST_KERNEL)/build
CONFIG_PATH = /usr/src/linux
CONFIG_NAME = .config
MODULE_PATH = /lib/modules/$(DEST_KERNEL)/kernel/drivers/usb
NAME = cxacru-$(shell date +%Y-%m-%d)
RPM_BIN_NAME = ${NAME}.k${DEST_KERNEL}${DISTRO}.${DEST_MACHINE}.rpm
TGZ_SRC_NAME = ${NAME}-src.tgz
ifeq ($(DEST_KERNEL_MAIN), 2.4)
MODULE_NORMAL = $(MODULE_PATH)/cxacru.o
MODULE_DEBUG = $(MODULE_PATH)/cxacrudbg.o
else
MODULE_NORMAL = $(MODULE_PATH)/cxacru.ko
MODULE_DEBUG = $(MODULE_PATH)/cxacrudbg.ko
endif
RPM_VERSION = $(shell date +%Y_%m_%d)_$(shell echo $(DEST_KERNEL) | tr "-" "_")
RPM_RELEASE = 1

all: clean compile_install2

# install: LIBUSB CX_INIT CX_FIRMWARE CX_MODULE CX_SCRIPTS BRIDGED
#compile_install: CX_INIT CX_FIRMWARE CX_MODULE CX_SCRIPTS  CX_PANEL

compile_install2: CX_INIT CX_FIRMWARE CX_MODULE2 CX_SCRIPTS

LIBUSB: libusb
        cd libusb && ./configure && make && cp .libs/libusb-0.1.so.4.1.1 /usr/lib/ && ln -sf /usr/lib/libusb-0.1.so.4.1.1 /usr/lib/libusb-0.1.so.4 && ldconfig

CX_INIT: init
        cd init && make && make install

CX_FIRMWARE:
        cd firmware && make

#CX_MODULE: module
#       cd module && make && make install

CX_MODULE2: module2
        cd module2 && make && make install

CX_SCRIPTS: scripts
        cd scripts && make

CX_PANEL: panel
        cd panel && make && make install

# CX_CONFIG: config
#       cd config && make && make install

BRIDGED: bridged
        cd bridged && make && make install

package: clean
        cd .. && tar -zcvf ${TGZ_SRC_NAME} cxacru

deb: clean compile_install2
        mv -f /etc/cxacru /etc/cxacru.config
        cp -pf scripts/config/cxacru /etc/cxacru
        cd debian && ./create-pkg.sh ${DEST_MACHINE}
        mv -f /etc/cxacru.config /etc/cxacru

rpm: clean compile_install2
        mv -f /etc/cxacru /etc/cxacru.config
        cp -pf scripts/config/cxacru /etc/cxacru
        ${RPMBIN} -bb \
                 --define "_rpmdir ${PWD}" \
                 --define "_builddir ${PWD}" \
                 --define "_arch ${DEST_MACHINE}" \
                 --define "__check_files ''" \
                 --define "_rpmfilename ${RPM_BIN_NAME}" \
                 --define "module_normal ${MODULE_NORMAL}" \
                 --define "module_debug ${MODULE_DEBUG}" \
                 --define "version ${RPM_VERSION}" \
                 --define "release ${RPM_RELEASE}" \
                 cxacru.spec
        mv ${RPM_BIN_NAME} ..
        mv -f /etc/cxacru.config /etc/cxacru
#                --buildroot "$${PWD}" \
#                --define "_rpmdir $${PWD}" \
#                --define "_builddir $${PWD}" \
#                --define "__check_files ''" \
#                --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
#                cxacru.spec

uninstall: firmware init module module2 scripts panel bridged
        cd firmware && make uninstall
        cd init && make uninstall
        cd module2 && make uninstall
        cd scripts && make uninstall
        cd panel && make uninstall
        cd bridged && make uninstall
#       cd config && make uninstall

clean: init module2 sarlib panel bridged
        cd init && make clean
        cd module2 && make clean
        cd sarlib && make clean
        cd panel && make clean
        cd bridged && make clean
#       cd config && make clean

add_service: scripts/Makefile
        cd scripts && make add_service

remove_service: scripts/Makefile
        cd scripts && make remove_service

help:
        echo "Type:"
        echo "  make -> To compile driver for your system"
        echo "  make -e DEST_MACHINE=i586 -> To compile driver for i586 machine"
        echo "  make rpm -> To build a rpm package for your system (it will be created in previous directory)"
        echo "  make -e DEST_MACHINE=i586 rpm -> To build a rpm package for i586 machine"
        echo "  make deb -> To build a deb package for your system (it will be created in previous directory)"
        echo "  make package -> To build a tgz package (it will be created in previous directory)"
        echo "  make uninstall -> To remove installed files"
        echo "  make add_service -> To install driver as a service (you don't need type cxstart.sh)"
        echo "  make remove_service -> To remove driver service"
[root@liu cxacru]#



我用的是FC5 64位 版本,应该怎样修改才能正确执行?
 楼主| 发表于 2006-9-10 22:30:06 | 显示全部楼层
这个问题谁来回答呀?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-12 09:21:43 | 显示全部楼层
有没有人碰到过这样的问题啊
回复 支持 反对

使用道具 举报

发表于 2006-9-12 11:22:12 | 显示全部楼层
装ubuntu吧,FC上好像没有真正成功的...

http://eciadsl.flashtux.org/modems.php?lang=en
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表