韦东山第三期视频监控wpa_supplicant编译出错问题
时间:10-02
整理:3721RD
点击:
本文摘录于本人博客:http://blog.csdn.net/chengdong1314/article/details/50353423
我在安装wpa_supplicant-2.0.tar的依赖库openssl-1.0.1d.tar的时候出现了不可思议的问题,问题如下:
我用的步骤如下:
一、tar xzf openssl-1.0.1d.tar.gz
二、cd openssl-1.0.1d/
三、./config shared no-asm --prefix=$PWD/tmp
四、修改Makefile:
CC= arm-linux-gcc
AR= arm-linux-ar $(ARFLAGS) r
RANLIB= arm-linux-ranlib
NM= arm-linux-nm
MAKEDEPPROG= arm-linux-gcc
五、make
六、make install
前面五步都没有问题。偏偏在第六步出现了不可思议的问题,错误如下:
making install in engines...
make[1]: Entering directory `/work/openssl-1.0.1d/engines'
installing 4758cca
cp: cannot stat `lib4758cca.bad': No such file or directory
installing aep
cp: cannot stat `libaep.bad': No such file or directory
installing atalla
cp: cannot stat `libatalla.bad': No such file or directory
installing cswift
cp: cannot stat `libcswift.bad': No such file or directory
installing gmp
cp: cannot stat `libgmp.bad': No such file or directory
installing chil
cp: cannot stat `libchil.bad': No such file or directory
installing nuron
cp: cannot stat `libnuron.bad': No such file or directory
installing sureware
cp: cannot stat `libsureware.bad': No such file or directory
installing ubsec
cp: cannot stat `libubsec.bad': No such file or directory
installing padlock
cp: cannot stat `libpadlock.bad': No such file or directory
installing capi
cp: cannot stat `libcapi.bad': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/work/openssl-1.0.1d/engines'
make: *** [install_sw] Error 1
问题的关键还是Makefile文件的修改:
之所以会出现上面的问题是因为我并不是直接改Makefile的,而是拷贝上次的Makefile或者替换下面这段造成的:
CC= arm-linux-gcc
CFLAG= -O
DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE
PEX_LIBS=
EX_LIBS=
EXE_EXT=
ARFLAGS=
AR= arm-linux-ar $(ARFLAGS) r
RANLIB= arm-linux-ranlib
NM= arm-linux-nm
PERL= /usr/bin/perl
TAR= tar
TARFLAGS= --no-recursion
MAKEDEPPROG=arm-linux-gcc
LIBDIR=lib
这主要是为了图省事造成的悲剧,如果真的是一个个条目的改Makefile那么错误应该是这样的:
"Makefile" 685L, 25481C written
book@book-desktop:/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/绗璇剧1.1_15鑺傛枃妗e拰鍥剧墖鍜屾簮鐮source/02.wpa_supplicant/openssl-1.0.1d$ make
making all in crypto...
make[1]: Entering directory `/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/绗璇剧1.1_15鑺傛枃妗e拰鍥剧墖鍜屾簮鐮source/02.wpa_supplicant/openssl-1.0.1d/crypto'
( echo "#ifndef MK1MF_BUILD"; \
echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
echo ' #define CFLAGS "arm-linux-gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -march=pentium -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall"'; \
echo ' #define PLATFORM "linux-elf"'; \
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
echo '#endif' ) >buildinf.h
arm-linux-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -march=pentium -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -c -o cryptlib.o cryptlib.c
cryptlib.c:1: error: bad value (pentium) for -march= switch
make[1]: *** [cryptlib.o] Error 1
make[1]: Leaving directory `/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/绗璇剧1.1_15鑺傛枃妗e拰鍥剧墖鍜屾簮鐮source/02.wpa_supplicant/openssl-1.0.1d/crypto'
make: *** [build_crypto] Error 1
OPTIONS=enable-shared --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/绗璇剧1.1_15鑺傛枃妗e拰鍥剧墖鍜屾簮鐮source/02.wpa_supplicant/openssl-1.0.1d/tmp -march=pentium no-asm no-ec_nistp_128 no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-sctp no-store no-zlib no-zlib-dynamic no-static-engine
CONFIGURE_ARGS=linux-elf shared no-asm --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/绗璇剧1.1_15鑺傛枃妗e拰鍥剧墖鍜屾簮鐮source/02.wpa_supplicant/openssl-1.0.1d/tmp -march=pentium
SHLIB_TARGET=linux-shared
经过韦东山老师的远程帮助之后最后的解决办法是这样的:
注意到上面错误的关键一句话:cryptlib.c:1: error: bad value (pentium) for -march= switch 这就是错误的所在,解决办法是这样的:在Makefile文件里把所有关于-march的选项删除掉,这样就可以编译通过,而且make install 成功,所有的解决办法来自韦东山老师,这里只是本人的总结。
这里附上所要修改的Makefile文件中的相关语句(注意不是所有):
修改前(16行):
OPTIONS=enable-shared --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/第2课第1.1_15节文档和图片和源码/source/02.wpa_supplicant/openssl-1.0.1d/tmp -march=pentium no-asm no-ec_nistp_64_gcc_128 no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-sctp no-store no-zlib no-zlib-dynamic no-static-engine
CONFIGURE_ARGS=linux-elf shared no-asm --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/第2课第1.1_15节文档和图片和源码/source/02.wpa_supplicant/openssl-1.0.1d/tmp -march=pentium
修改后:
OPTIONS=enable-shared --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/第2课第1.1_15节文档和图片和源码/source/02.wpa_supplicant/openssl-1.0.1d/tmp no-asm no-ec_nistp_64_gcc_128 no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-sctp no-store no-zlib no-zlib-dynamic no-static-engine
CONFIGURE_ARGS=linux-elf shared no-asm --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/第2课第1.1_15节文档和图片和源码/source/02.wpa_supplicant/openssl-1.0.1d/tmp
注意看看少了什么
再看看另外一个要修改的地方:
修改前(63行):
CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -march=pentium -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
修改后:
CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
好了,这就是所有要修改的地方了,
最后让我们来看看另外的要修改的关于编译器的地方(62行):
修改前:
CC= arm-linux-gcc
CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -march=pentium -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE
PEX_LIBS=
EX_LIBS= -ldl
EXE_EXT=
ARFLAGS=
AR= arm-linux-ar $(ARFLAGS) r
RANLIB= arm-linux-ranlib
NM= arm-linux-nm
PERL= /usr/bin/perl
TAR= tar
TARFLAGS= --no-recursion
MAKEDEPPROG= arm-linux-gcc
LIBDIR=lib
修改后:
CC= arm-linux-gcc
CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE
PEX_LIBS=
EX_LIBS= -ldl
EXE_EXT=
ARFLAGS=
AR= arm-linux-ar $(ARFLAGS) r
RANLIB= arm-linux-ranlib
NM= arm-linux-nm
PERL= /usr/bin/perl
TAR= tar
TARFLAGS= --no-recursion
MAKEDEPPROG= arm-linux-gcc
LIBDIR=lib
好了,所有要说的都说了,最后把最后编译成功的文件打包上传上来,这里包括wpa_supplicant和其依赖库openssl-1.0.1d
openssl-1.0.1d:
http://download.csdn.net/detail/chengdong1314/9367127
wpa_supplicant:
http://download.csdn.net/detail/chengdong1314/9367129
我在安装wpa_supplicant-2.0.tar的依赖库openssl-1.0.1d.tar的时候出现了不可思议的问题,问题如下:
我用的步骤如下:
一、tar xzf openssl-1.0.1d.tar.gz
二、cd openssl-1.0.1d/
三、./config shared no-asm --prefix=$PWD/tmp
四、修改Makefile:
CC= arm-linux-gcc
AR= arm-linux-ar $(ARFLAGS) r
RANLIB= arm-linux-ranlib
NM= arm-linux-nm
MAKEDEPPROG= arm-linux-gcc
五、make
六、make install
前面五步都没有问题。偏偏在第六步出现了不可思议的问题,错误如下:
making install in engines...
make[1]: Entering directory `/work/openssl-1.0.1d/engines'
installing 4758cca
cp: cannot stat `lib4758cca.bad': No such file or directory
installing aep
cp: cannot stat `libaep.bad': No such file or directory
installing atalla
cp: cannot stat `libatalla.bad': No such file or directory
installing cswift
cp: cannot stat `libcswift.bad': No such file or directory
installing gmp
cp: cannot stat `libgmp.bad': No such file or directory
installing chil
cp: cannot stat `libchil.bad': No such file or directory
installing nuron
cp: cannot stat `libnuron.bad': No such file or directory
installing sureware
cp: cannot stat `libsureware.bad': No such file or directory
installing ubsec
cp: cannot stat `libubsec.bad': No such file or directory
installing padlock
cp: cannot stat `libpadlock.bad': No such file or directory
installing capi
cp: cannot stat `libcapi.bad': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/work/openssl-1.0.1d/engines'
make: *** [install_sw] Error 1
问题的关键还是Makefile文件的修改:
之所以会出现上面的问题是因为我并不是直接改Makefile的,而是拷贝上次的Makefile或者替换下面这段造成的:
CC= arm-linux-gcc
CFLAG= -O
DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE
PEX_LIBS=
EX_LIBS=
EXE_EXT=
ARFLAGS=
AR= arm-linux-ar $(ARFLAGS) r
RANLIB= arm-linux-ranlib
NM= arm-linux-nm
PERL= /usr/bin/perl
TAR= tar
TARFLAGS= --no-recursion
MAKEDEPPROG=arm-linux-gcc
LIBDIR=lib
这主要是为了图省事造成的悲剧,如果真的是一个个条目的改Makefile那么错误应该是这样的:
"Makefile" 685L, 25481C written
book@book-desktop:/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/绗璇剧1.1_15鑺傛枃妗e拰鍥剧墖鍜屾簮鐮source/02.wpa_supplicant/openssl-1.0.1d$ make
making all in crypto...
make[1]: Entering directory `/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/绗璇剧1.1_15鑺傛枃妗e拰鍥剧墖鍜屾簮鐮source/02.wpa_supplicant/openssl-1.0.1d/crypto'
( echo "#ifndef MK1MF_BUILD"; \
echo ' /* auto-generated by crypto/Makefile for crypto/cversion.c */'; \
echo ' #define CFLAGS "arm-linux-gcc -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -march=pentium -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall"'; \
echo ' #define PLATFORM "linux-elf"'; \
echo " #define DATE \"`LC_ALL=C LC_TIME=C date`\""; \
echo '#endif' ) >buildinf.h
arm-linux-gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -march=pentium -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall -c -o cryptlib.o cryptlib.c
cryptlib.c:1: error: bad value (pentium) for -march= switch
make[1]: *** [cryptlib.o] Error 1
make[1]: Leaving directory `/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/绗璇剧1.1_15鑺傛枃妗e拰鍥剧墖鍜屾簮鐮source/02.wpa_supplicant/openssl-1.0.1d/crypto'
make: *** [build_crypto] Error 1
OPTIONS=enable-shared --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/绗璇剧1.1_15鑺傛枃妗e拰鍥剧墖鍜屾簮鐮source/02.wpa_supplicant/openssl-1.0.1d/tmp -march=pentium no-asm no-ec_nistp_128 no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-sctp no-store no-zlib no-zlib-dynamic no-static-engine
CONFIGURE_ARGS=linux-elf shared no-asm --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/绗璇剧1.1_15鑺傛枃妗e拰鍥剧墖鍜屾簮鐮source/02.wpa_supplicant/openssl-1.0.1d/tmp -march=pentium
SHLIB_TARGET=linux-shared
经过韦东山老师的远程帮助之后最后的解决办法是这样的:
注意到上面错误的关键一句话:cryptlib.c:1: error: bad value (pentium) for -march= switch 这就是错误的所在,解决办法是这样的:在Makefile文件里把所有关于-march的选项删除掉,这样就可以编译通过,而且make install 成功,所有的解决办法来自韦东山老师,这里只是本人的总结。
这里附上所要修改的Makefile文件中的相关语句(注意不是所有):
修改前(16行):
OPTIONS=enable-shared --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/第2课第1.1_15节文档和图片和源码/source/02.wpa_supplicant/openssl-1.0.1d/tmp -march=pentium no-asm no-ec_nistp_64_gcc_128 no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-sctp no-store no-zlib no-zlib-dynamic no-static-engine
CONFIGURE_ARGS=linux-elf shared no-asm --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/第2课第1.1_15节文档和图片和源码/source/02.wpa_supplicant/openssl-1.0.1d/tmp -march=pentium
修改后:
OPTIONS=enable-shared --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/第2课第1.1_15节文档和图片和源码/source/02.wpa_supplicant/openssl-1.0.1d/tmp no-asm no-ec_nistp_64_gcc_128 no-gmp no-jpake no-krb5 no-md2 no-rc5 no-rfc3779 no-sctp no-store no-zlib no-zlib-dynamic no-static-engine
CONFIGURE_ARGS=linux-elf shared no-asm --prefix=/work/nfs_root/fs_mini_mdev_new/video_surveillance_source/第2课第1.1_15节文档和图片和源码/source/02.wpa_supplicant/openssl-1.0.1d/tmp
注意看看少了什么
再看看另外一个要修改的地方:
修改前(63行):
CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -march=pentium -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
修改后:
CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
好了,这就是所有要修改的地方了,
最后让我们来看看另外的要修改的关于编译器的地方(62行):
修改前:
CC= arm-linux-gcc
CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -march=pentium -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE
PEX_LIBS=
EX_LIBS= -ldl
EXE_EXT=
ARFLAGS=
AR= arm-linux-ar $(ARFLAGS) r
RANLIB= arm-linux-ranlib
NM= arm-linux-nm
PERL= /usr/bin/perl
TAR= tar
TARFLAGS= --no-recursion
MAKEDEPPROG= arm-linux-gcc
LIBDIR=lib
修改后:
CC= arm-linux-gcc
CFLAG= -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -Wall
DEPFLAG= -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_GMP -DOPENSSL_NO_JPAKE -DOPENSSL_NO_MD2 -DOPENSSL_NO_RC5 -DOPENSSL_NO_RFC3779 -DOPENSSL_NO_SCTP -DOPENSSL_NO_STORE
PEX_LIBS=
EX_LIBS= -ldl
EXE_EXT=
ARFLAGS=
AR= arm-linux-ar $(ARFLAGS) r
RANLIB= arm-linux-ranlib
NM= arm-linux-nm
PERL= /usr/bin/perl
TAR= tar
TARFLAGS= --no-recursion
MAKEDEPPROG= arm-linux-gcc
LIBDIR=lib
好了,所有要说的都说了,最后把最后编译成功的文件打包上传上来,这里包括wpa_supplicant和其依赖库openssl-1.0.1d
openssl-1.0.1d:
http://download.csdn.net/detail/chengdong1314/9367127
wpa_supplicant:
http://download.csdn.net/detail/chengdong1314/9367129
视频监控 相关文章: