lemon install SOPLEX, COIN and ILOG libraries - c++

I was trying to install Lemon on Ubuntu 14.04. I was going as per the instructions in their documentation. On the "cmake .." command, I got an error as the following
aniket#aniket-Lenovo-G50-45:~/lemon-1.3.1/build$ cmake ..
CMake Error at CMakeLists.txt:3 (CMAKE_POLICY):
Policy "CMP0048" is not known to this version of CMake.
-- Could NOT find ILOG (missing: ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR)
-- Could NOT find COIN (missing: COIN_INCLUDE_DIR COIN_CBC_LIBRARY COIN_CBC_SOLVER_LIBRARY COIN_CGL_LIBRARY COIN_CLP_LIBRARY COIN_COIN_UTILS_LIBRARY COIN_OSI_LIBRARY COIN_OSI_CBC_LIBRARY COIN_OSI_CLP_LIBRARY)
-- Could NOT find SOPLEX (missing: SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR)
-- Configuring incomplete, errors occurred!
See also "/home/aniket/lemon-1.3.1/build/CMakeFiles/CMakeOutput.log".
See also "/home/aniket/lemon-1.3.1/build/CMakeFiles/CMakeError.log".
I tried to update and upgrade Cmake just in case. But, it didn't help. So, is this about the libraries not being installed (COIN, ILOG, etc)? How do I install them?

No, I've just succeeded in installation by commenting third line in CMakeLists.txt:
#CMAKE_POLICY(SET CMP0048 OLD)
So, the problem is not in COIN, ILOG, etc.

It's not a library problem, rather than a CMAKE_POLICY problem. I was having the same issue, as my cmake was not recognizing the following policy:
CMAKE_POLICY(SET CMP0048 OLD)
Turned out that my cmake version (2.8.xx) was too old. After upgrading to cmake 3.0.2, this issue was fixed.

Related

"TBB library cannot be found" CMake on MacOS

I'm trying to build PrusaSlicer from source on Mac. I don't have any experience with CMake. I'm following the instructions given here.
Every time I try to build dependencies. This command cmake ..gives me errors. Earlier it was saying "Boost cannot be found." I fixed that by installing boost with brew. Now it's stuck on TBB.
OS X SDK Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk
OS X Deployment Target: (default)
-- Boost::boost exists
CMake Error at /opt/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
TBB library cannot be found. Consider set TBBROOT environment variable.
(missing: TBB_LIBRARIES) (found version "2020.3")
Call Stack (most recent call first):
/opt/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
cmake/modules/FindTBB.cmake.in:286 (find_package_handle_standard_args)
cmake/modules/FindTBB.cmake:29 (include)
CMakeLists.txt:384 (find_package)
-- Configuring incomplete, errors occurred!
I have installed TBB. If you would notice even this error has the version listed.
Things I have tried:
Installing boost, cmake and tbb via brew.
Installing boost, cmake and tbb via macports.
Try the following
cmake .. -DTBB_LIBRARYDIR=/opt/intel/tbb/lib/intel64/gcc4.8 -DTBB_INCLUDEDIR=/opt/intel/tbb/include
Note the subtle differences in the CMake var names and the path to include, not include/tbb.Let me know how that goes

Fail endianess test when building project with CMAKE (macOS Catalina)

I am working on a project that is written in C++ so we build it with CMAKE. I was working on it on a CentOS machine and everything was fine. However, now I've switched to macOS (I have the latest Catalina update) and first I cloned the repo from github, installed cmake and I tried to build it, but it fails due to the ENDIANESS TEST so the project doesn't finish building.Here is the repo that I'm trying to work on btw. I also use some additional flags, but that shouldn't be the issue. Any ideas how to fix this?
Here is the command that I use for trying to build:
/usr/local/bin/cmake -D ZLIB_INCLUDE_DIR=/Users/basavyr/Downloads/zlib-1.2.11/ -D OPENSSL_INCLUDE_DIR=/usr/local/Cellar/openssl#1.1/1.1.1d/include/ -D OPENSSL_SSL_LIBRARY=/usr/local/Cellar/openssl#1.1/1.1.1d/lib/libssl.dylib -D OPENSSL/CRYPTO_LIBRARY=/usr/local/Cellar/openssl#1.1/1.1.1d/lib/libcrypto.1.1.dylib -D CMAKE_INSTALL_PREFIX=../tarball/xrootd ../
And here is the error I'm getting (ignore the other ones, those apparently do not affect the failing):
CMake Deprecation Warning at CMakeLists.txt:13 (cmake_policy):
The OLD behavior for policy CMP0054 will be removed from a future version
of CMake.
The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
-- Could NOT find systemd (missing: SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES)
-- Could NOT find Macaroons (missing: MACAROONS_INCLUDES MACAROONS_LIB)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
[I] Determining version from git
-- crc32c submodule update
-- Check if the system is big endian
-- Searching 16 bit integer
CMake Error at /usr/local/Cellar/cmake/3.16.2/share/cmake/Modules/TestBigEndian.cmake:50 (message):
no suitable type found
Call Stack (most recent call first):
external/crc32c/CMakeLists.txt:67 (test_big_endian)
-- Configuring incomplete, errors occurred!
See also "/Users/basavyr/Pipeline/DevWorkspace/Github/xrootd/build/CMakeFiles/CMakeOutput.log".
See also "/Users/basavyr/Pipeline/DevWorkspace/Github/xrootd/build/CMakeFiles/CMakeError.log".
I've tried to search through those two files but I couldn't find anything useful to be honest. I've also tried to search this issue online but without any success.

Installing the SFGUI with Cmake

I've been trying to install SFGUI library with Cmake tool with instructions given here: SFGUI Install Tutorial . Still got many problems in major with Cmake, which couldn't find few files from SFGUI directory, for example
CMake Error: The source "D:/SFGUI-master/CMakeLists.txt" does not match the source "D:/SFGUI-0.3.0/CMakeLists.txt" used to generate cache. Re-run cmake with a different source directory.
Restarting didn't help. Could anyone write how to install this in simple steps? Regards.
cmake is telling you that the files it has generated in it's cache from a previous run don't match the source files you are currently using. I would imagine that you ran cmake, then switched git branches or tags and tried to run cmake again. You can just rm -r CMakeFiles in your build directory to remove the cache. Then you should be able to run cmake again without errors.
Thanks! It moved a little bit, but stopped actually at error:
CMake Error at cmake/Modules/FindSFML.cmake:306 (message):
Could NOT find SFML (missing: SFML_GRAPHICS_LIBRARY SFML_WINDOW_LIBRARY
SFML_SYSTEM_LIBRARY)
Call Stack (most recent call first):
CMakeLists.txt:21 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/admin/Documents/Visual Studio 2015/Projects/sfml1/sfml1/CMakeFiles/CMakeOutput.log".
To be honest, I will write down steps I did: 1.Configured SFML in VS15 in Windows 8.1 2. I installed the newswet version of CMake 3. Installed also newest SFGUI from Github. 4.In Cmake GUI as a build I choose my project in VS and as a source - SFGUI directory. 5.In CMake Configure and there are the errors. Did I missed something?

CMake error when compiling out of tree model in gnu radio

I have a problem and I can't seem to find a solution to it. I am building a project using gnuradio and in the process of building an OOT module i always get the following error after $cmake ../ (I followed the instruction from the GNU site though)
$ cmake ../
-- Build type not specified: defaulting to release.
-- Could NOT find Boost
CMake Error at CMakeLists.txt:63 (message):
Boost required to compile trial
-- Configuring incomplete, errors occurred!
Please any help will be deeply appreciated (And please I am a noob so kindly have it easy on me).
Enable the debug output for the FindBoost module when invoking cmake, it'll help you pinpoint which packages are missing:
$ cmake -DBoost_DEBUG=ON ../
Here's a similar problem on kubuntu 14.04: https://github.com/antoinet/gr-acars2/issues/2.
The solution was to install the missing libboost-filesystem-dev and libboost-system-dev packages.
The basic issue is that 1 or more Boost components (e.g., system, threads, filesystem) is/are not being found, so you need to get it/them installed. How you do the install depends on your OS. So ... what OS are you trying to do this on?
Also, how did you install GNU Radio in the first place? Any package manager with its salt will make sure dependencies are installed correctly along with the actual package. If you used MacPorts or apt-get or yum to install GNU Radio, Boost should have been installed.
Related: Have you considered signing up for the GNU Radio discussion email list? This question would be quickly answered there. https://lists.gnu.org/mailman/listinfo/discuss-gnuradiosome

Attempting to compile with cmake

I'm attempting to compile a program with dependencies in Cmake and Qt (on Mountain Lion). The code
cmake build
returns
CMake Error at /Applications/CMake 2.8-12.app/Contents/share/cmake-2.8/Modules/FindQt4.cmake:1386 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
CMakeLists.txt:195 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
The current Qt version is 5.1.1, which I have installed in ~/bin/ and I'm not sure how to get Cmake to find it.
The error is saying this code requires Qt 4.x then for what are you wandering? it is due to line FIND_PACKAGE(Qt4 REQUIRED) though Cmake version should support Qt5 but may be your CmakeList is not proper written for that.
Follow this document to correct your CmakeList.