CPPCMS build error with libraries - c++

Despite I have open ssl installed, it can't find where the library is. The openssl exists in my Ubuntu as default, it still can't find, so I download a new distribution and reinstall it to /usr/local/ssl . I install by the default cmake command:
cmake ..
As well as explicitly specify the path:
cmake -DCMAKE_INCLUDE_PATH=/usr/local/ssl/include -DCMAKE_LIBRARY_PATH=/usr/local/ssl/lib ..
It keeps generating this error:
-- Looking for ICU libraries
-- ICU not found, disabling ICU localization backend
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PCRE_LIB
linked by target "booster" in directory /home/hoangtu/Programs/cppcms-0.99.7/booster
linked by target "booster-static" in directory /home/hoangtu/Programs/cppcms-0.99.7/booster
What does it mean? It should find the open ssl. ICU is installed as default in Ubuntu as well. Also, what's the last two lines about?
EDIT: Ok, I downloaded and installed ICU to my usr directory. ICU found now. Now the only error remains:
-- Looking for ICU libraries
-- ICU Found, building booster locale
GNU-TLS Gcrypt or OpenSSL librarys are not found, disabling AES encryption support
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PCRE_LIB
linked by target "booster" in directory /home/hoangtu/Programs/cppcms-0.99.7/booster
linked by target "booster-static" in directory /home/hoangtu/Programs/cppcms-0.99.7/booster
is the booster thingy. Openssl stills not found.

Great,
I found the answer here: http://cppcms.sourceforge.net/wikipp/en/page/cppcms_1x_build_troubleshooting
sudo apt-get install build-essential libpcre3-dev libicu-dev libgcrypt11-dev zlib1g-dev cmake

Related

Cmake's FindOpenSSL's behavior changed between 3.12 and 3.19 -- and I can't seem to tell Cmake where I want it to find OpenSSL [Windows]

In CMake 3.12, FindOpenSSL() located my locally built version of openSSL for the project in question. In CMake 3.19, FindOpenSSL() generates a search list that finds my locally build version of openSSL AND a version installed on my system that I don't want it to use.
The CMake docs, in their "hint" section, says to set "Set OPENSSL_ROOT_DIR to the root directory of an OpenSSL installation."
I've tried two different mechanisms:
-DOPENSSL_ROOT_DIR=$ENV{MY_OPEN_SSL_BUILD}
and in my CmakeLists.txt
IF (WIN32)
set(OPENSSL_ROOT_DIR $ENV{MY_OPEN_SSL_BUILD})
ENDIF (WIN32)
Both of which still has FindOpenSSL() creating a search path that includes an openSSL installed on my system, but not the one I built. Although the one I built IS in the search path.
Is there a construct that forces FindOpenSSL() to choose the specific one I want?
#Tsyvarev I made some edits (I should have said this originally, mea culpa).
-DOPENSSL_ROOT_DIR=c:/wrk/builds/release/lib
But either -D option or the explicit setting in my CMakeLists.txt still gets me the following:
In 3.12 -- I get back the following cmake output:
-- Found OpenSSL: C:/wrk/builds/release/lib/libeay32.lib (found version "1.0.2x")
In 3.19 -- I get back the following cmake output:
-- Found OpenSSL: optimized;C:/wrk/builds/release/lib/libeay32.lib;debug;C:/Program Files/OpenSSL-Win64/lib/VC/libcrypto64MDd.lib (found version "1.0.2y")
The problem comes into play when linking. The error comes into play because ASN1_STRING_get0_data is found in libcrypto64MDd.lib which is installed on my system:
-- Looking for ASN1_STRING_get0_data in optimized;C:/wrk/builds/develop-VS2019/lib/libeay32.lib;debug;C:/Program Files/OpenSSL-Win64/lib/VC/libcrypto64MDd.lib - found
While in my OpenSSL build, which I ultimately link against does not have it.
I hope this clarifies.

Problem compiling libpqxx 7.0.5, can't find postgreSQL libraries

I'm trying to compile libpqxx 7.0.5 and It's having problems finding the postgresql libraries, which I have installed.
I have installed both postgresql and postgresql-libs. Why is giving me this error?.
The configure script stops at this:
configure: using PostgreSQL headers at
configure: using PostgreSQL libraries at
checking /libpq-fe.h usability... no
checking /libpq-fe.h presence... no
checking for /libpq-fe.h... no
configure: error:
Can't find libpq-fe.h in . Are you sure the libpq
headers are installed correctly? They should be in the directory returned by
"pg_config --includedir" or "pkg-config libpq --cflags".
If you do have libpq (the C-language client library for PostgreSQL) installed,
make sure you have the related development materials--mainly its header files--
as well as the library binary. Some system distributions keep the two in
seperate packages with names like "alibrary" and "alibrary-dev", respectively.
In that case, make sure you have the latter installed as well.
The file is indeed inside my /usr/include directory.
I figured out how to get this working. I needed to add the directory to where the libraries are.
./configure --with-postgres-include='/usr/include'
Doing this everything works!.
Also I downgrade libpqxx to version 7.0.3.

How to get the path to a module in Centos 6.7 (or upgrade the gcc)?

I am trying to build from source and into a local library the package MIRA in Centos 6.7 using the ./configure make make install method. Given that the package requires gcc>=4.6 and my systems default is 4.4.7, I had to load a module using:
module load gcccuda/2.7.11
Which includes GCC/4.8.4 :
module list
Currently Loaded Modules:
1) GCC/4.8.4 2) CUDA/6.5.14-GCC-4.8.4 3) gcccuda/2.7.11
However, when I run the ./configure, the following error appears.
checking whether the Boost::Thread library is available... yes
configure: error: Could not find a version of the library!
Another user solved the same problem by telling the program where to look for the library with the flag:
sudo ./configure --with-boost-libdir=/usr/lib
You can find his solution here: https://www.biostars.org/p/59182/ . Nevertheless, this solution is not exactly useful for me. I can't access the /usr/lib library in Centos (system in which I am relatively new) or find the path to the library GCC/4.8.4. I have also tried the generic --with-bost=yes to no avail.
Is there a way to inform the flag where the module is loaded so ./configure can proceed?
Some more information about MIRA installation: http://mira-assembler.sourceforge.net/docs/DefinitiveGuideToMIRA.html#chap_installation

Installation of ndnSIM 2.0 (Name Data Networking)

I am trying to install ndnSIM 2.0 Link on Ubuntu 12.04. I have followed all the instructions mentioned Link 2.
When I run ./waf configure while in ndn-cxx folder I get the following error
Checking if CryptoPP library works: yes
Checking boost includes: 1.57.0
Checking boost libs: lib system not found in /usr/lib
The configuration failed
(complete log in /home/rani/Desktop/ndnSIM/ndn-cxx/build/config.log)
Do I need to install some more libraries or there is some link problem as
Boost Library(1.57) is installed in /usr/local/lib? I have even followed the FAQ!
So ./waf cannot find the boost libs. Please check where the boost libs have been installed, most probably they are in /usr/local/lib in which case simply issue:
./waf configure --boost-libs=/usr/local/lib (instead of just ./waf configure).
You can ask any questions at their mailing list.
first of all, the error you got refers to ndn-cxx, which is our library, not ndnSIM itself.
This error indicates that your installed boost libraries could not be found by ndn-cxx.
Please make sure that you installed the boost libraries correctly and then search for the directory, where they were installed.
Typically, the boost libraries are installed under the /usr/lib directory. If your boost libraries have been installed somewhere else, you may use the following option to indicate the specific directory and configure ndn-cxx:
./waf configure --boost-libs=

how to get libtorrent to see boost?

I am compiling libtorrent-rasterbar-0.16.16 with msys and mingw.
./configure runs fine, until it gets to the boost library check.
I have boost 1.51, and I set $BOOST_ROOT, but that did not work.
Checking for boost libraries:
checking for boostlib >= 1.36... expr: syntax error
configure: We could not detect the boost libraries (version 1.36 or higher). If
you have a staged boost library (still not installed) please specify $BOOST_ROOT
in your environment and do not give a PATH to --with-boost option. If you are
sure you have boost installed, then check your version number looking in <boost/
version.hpp>. See http://randspringer.de/boost for more documentation.
checking whether the Boost::System library is available... no
configure: error: Boost.System library not found. Try using --with-boost-system=
lib
I tried the --with-boost-system= option, and that did not work either. I also copied libboost_system-mgw47-mt-1_51.a to the same directory as libtorrent... but it did not work.
What am I missing?
I have boost 1.51, and I set $BOOST_ROOT, but that did not work
It is very likely that configure can’t find boost header files. What you need is both the library and the sources, and your best avenue is still setting BOOST_ROOT.
On a linux box you would be installing the boost-devel package, but for mingw you should download the boost sources directly and unpack them. Then please make sure you are running,
BOOST_ROOT=/path/to/boost_1_51 ./configure