'Trying to build poco-1.8.1-all from source code on openwrt
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
p.s. Openssl is installed
p.s.s I tried everything I found in the google
Solution 1:[1]
If you are compiling for Openwrt, most of the time, you are doing cross-compiling unless your compile within Openwrt. But you are not configure to cross-compile.
FYI of cross compiling https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html
I checkout that poco project with version 1.8.1 and run the ./configure. I see there are a couple of options about choosing the target.
Depending on the target machine that you want your binary poco to run. You should do something like: ./configure --config="ARM-LINUX" --library-path="your-toolchain-directory" # with cflags or something else
Secondly, missing SSL library maybe you are missing to enable openssl in the menuconfig of openwrt. Make sure you have this file in your toolchain openssl/crypto.h. And then, reconfigure and try again
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Justin Yu |
