尝试从openwrt上的源代码构建poco-1.8.1


root@OpenWrt:~/poco-1.8.1-all# ./configure --no-tests --no-samples --omit=CppUnit,Data,MongoDB,PageCompiler,Redis,Zip
root@OpenWrt:~/poco-1.8.1-all# make
In file included from include/Poco/Crypto/CipherKeyImpl.h:22:0,
from include/Poco/Crypto/CipherKey.h:22,
from src/CipherFactory.cpp:17:
include/Poco/Crypto/OpenSSLInitializer.h:24:10:fatal error: openssl/crypto.h: No such file or directory
#include <openssl/crypto.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [/root/poco-1.8.1-all/build/rules/compile:52: /root/poco-1.8.1-all/Crypto/obj/Linux/armv6l/debug_shared/CipherFactory.o] Error 1
make[1]: Leaving directory '/root/poco-1.8.1-all/Crypto'
make: *** [Makefile:201: Crypto-libexec] Error 2

注。Openssl已安装

注。我试了所有我在google上找到的

如果您正在为Openwrt编译,那么大多数时候,您都在进行交叉编译,除非您在Openwrt中编译。但是你没有配置交叉编译。

供参考的交叉编译https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html

我签出版本为1.8.1的poco项目,并运行./configure。我看到有几个选择目标的选项。这取决于您希望二进制poco运行的目标机器。您应该这样做:./configure --config="ARM-LINUX" --library-path="your-toolchain-directory" # with cflags or something else

其次,缺少SSL库可能您在openwrt的菜单配置中缺少启用openssl。确保你的工具链openssl/crypto.h中有这个文件。然后,重新配置并重试

最新更新