我正在尝试在 Debian Wheezy 上为 ARM 交叉编译 OpenVPN 2.3.4 和 PolarSSL 1.3.7。 PolarSSL 已编译安装在我的主目录中,但 OpenVPN 找不到库和 header ,因此显示此错误消息:
checking polarssl version... configure: error: PolarSSL 1.2.x required and must be 1.2.10 or later
PolarSSL 配置如下:
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_SYSTEM_NAME=Linux -D CMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -D CMAKE_INSTALL_PREFIX=/home/smith9073/polarssl -D ENABLE_PROGRAMS=OFF ../polarssl-1.3.7/
这就是我试图告诉 OpenVPN 关于 PolarSSL 位置的方式:
CFLAGS="-I/home/smith9073/polarssl/include" LDFLAGS="-L/home/smith9073/polarssl/lib" ./configure --host=arm-linux-gnueabihf --with-crypto-library=polarssl
checking polarssl version... configure: error: PolarSSL 1.2.x required and must be 1.2.10 or later
LIBS="-lpolarssl" CFLAGS="-I/home/smith9073/polarssl/include" LDFLAGS="-L/home/smith9073/polarssl/lib" ./configure --host=arm-linux-gnueabihf --with-crypto-library=polarssl
checking polarssl version... configure: error: PolarSSL 1.2.x required and must be 1.2.10 or later
CFLAGS="-I/home/smith9073/polarssl/include" LIBS="-lpolarssl/home/smith9073/polarssl/lib" ./configure --host=arm-linux-gnueabihf --with-crypto-library=polarssl
configure: error: C compiler cannot create executables
CFLAGS="-I/home/smith9073/polarssl/include" LIBS="-l/home/smith9073/polarssl/lib" ./configure --host=arm-linux-gnueabihf --with-crypto-library=polarssl
configure: error: C compiler cannot create executables
POLARSSL_CFLAGS="-I/home/smith9073/polarssl/include" POLARSSL_LIBS="-l/home/smith9073/polarssl/lib" ./configure --host=arm-linux-gnueabihf --with-crypto-library=polarssl
checking polarssl version... configure: error: PolarSSL 1.2.x required and must be 1.2.10 or later
POLARSSL_CFLAGS="-I/home/smith9073/polarssl/include" POLARSSL_LIBS="-lpolarssl/home/smith9073/polarssl/lib" ./configure --host=arm-linux-gnueabihf --with-crypto-library=polarssl
checking polarssl version... configure: error: PolarSSL 1.2.x required and must be 1.2.10 or later
有谁知道为什么 OpenVPN 找不到 PolarSSL?
最佳答案
PolarSSL 1.3.x 版本破坏了 1.2.x 系列的 API,OpenVPN 尚未更新到新的 API,因此目前您必须使用 PolarSSL 1.2.x 或其他加密后端( OpenSSL)。
关于linux - 使用 PolarSSL 交叉编译 OpenVPN?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24037963/