boost_regex library not found with CMake - cmake
I'm trying to install something (emulationstation modified on a Raspberry 2), which require at some point to use a CMake command that need the Boost library to execute properly.
Here is the debug of my command line:
root#retropie:/home/pi/recalbox-emulationstation# sudo make
Looking for bcm_host.h
bcm_host.h found
Looking for libMali.so
libMali.so not found
-- Looking for FreeImage...
-- checking for module 'freeimage'
-- package 'freeimage' not found
-- Found FreeImage: optimized;/usr/lib/libfreeimage.so;debug;/usr/lib/libfreeimage.so
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:566 ] _boost_TEST_VERSIONS = 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:568 ] Boost_USE_MULTITHREADED = TRUE
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:570 ] Boost_USE_STATIC_LIBS =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:572 ] Boost_USE_STATIC_RUNTIME =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:574 ] Boost_ADDITIONAL_VERSIONS =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:576 ] Boost_NO_SYSTEM_PATHS =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:644 ] Declared as CMake or Environmental Variables:
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:646 ] BOOST_ROOT = /usr/include/boost
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:648 ] BOOST_INCLUDEDIR =
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:650 ] BOOST_LIBRARYDIR = /usr/include/boost/regex/v4
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:652 ] _boost_TEST_VERSIONS = 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53;1.52.0;1.52;1.51.0;1.51;1.50.0;1.50;1.49.0;1.49;1.48.0;1.48;1.47.0;1.47;1.46.1;1.46.0;1.46;1.45.0;1.45;1.44.0;1.44;1.43.0;1.43;1.42.0;1.42;1.41.0;1.41;1.40.0;1.40;1.39.0;1.39;1.38.0;1.38;1.37.0;1.37;1.36.1;1.36.0;1.36;1.35.1;1.35.0;1.35;1.34.1;1.34.0;1.34;1.33.1;1.33.0;1.33
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:734 ] location of version.hpp: /usr/include/boost/version.hpp
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:753 ] version.hpp reveals boost 1.49.0
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:785 ] guessed _boost_COMPILER = -gcc47
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:795 ] _boost_MULTITHREADED = -mt
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:838 ] _boost_RELEASE_ABI_TAG = -
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:840 ] _boost_DEBUG_ABI_TAG = -d
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:883 ] _boost_LIBRARY_SEARCH_DIRS = /usr/include/boost/regex/v4;/usr/include/boost/lib;/usr/include/boost/stage/lib;/usr/include/lib;/usr/include/../lib;/usr/include/stage/lib;C:/boost/lib;C:/boost;/boost/boost_1_49_0/lib;/boost/boost_1_49/lib;/boost/lib;/boost;/sw/local/lib
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for SYSTEM_LIBRARY_RELEASE: boost_system-gcc47-mt-1_49;boost_system-gcc47-mt;boost_system-mt-1_49;boost_system-mt;boost_system
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for SYSTEM_LIBRARY_DEBUG: boost_system-gcc47-mt-d-1_49;boost_system-gcc47-mt-d;boost_system-mt-d-1_49;boost_system-mt-d;boost_system-mt;boost_system
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for FILESYSTEM_LIBRARY_RELEASE: boost_filesystem-gcc47-mt-1_49;boost_filesystem-gcc47-mt;boost_filesystem-mt-1_49;boost_filesystem-mt;boost_filesystem
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for FILESYSTEM_LIBRARY_DEBUG: boost_filesystem-gcc47-mt-d-1_49;boost_filesystem-gcc47-mt-d;boost_filesystem-mt-d-1_49;boost_filesystem-mt-d;boost_filesystem-mt;boost_filesystem
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for DATE_TIME_LIBRARY_RELEASE: boost_date_time-gcc47-mt-1_49;boost_date_time-gcc47-mt;boost_date_time-mt-1_49;boost_date_time-mt;boost_date_time
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for DATE_TIME_LIBRARY_DEBUG: boost_date_time-gcc47-mt-d-1_49;boost_date_time-gcc47-mt-d;boost_date_time-mt-d-1_49;boost_date_time-mt-d;boost_date_time-mt;boost_date_time
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for REGEX_LIBRARY_RELEASE: boost_regex-gcc47-mt-1_49;boost_regex-gcc47-mt;boost_regex-mt-1_49;boost_regex-mt;boost_regex
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for REGEX_LIBRARY_DEBUG: boost_regex-gcc47-mt-d-1_49;boost_regex-gcc47-mt-d;boost_regex-mt-d-1_49;boost_regex-mt-d;boost_regex-mt;boost_regex
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for LOCALE_LIBRARY_RELEASE: boost_locale-gcc47-mt-1_49;boost_locale-gcc47-mt;boost_locale-mt-1_49;boost_locale-mt;boost_locale
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for LOCALE_LIBRARY_DEBUG: boost_locale-gcc47-mt-d-1_49;boost_locale-gcc47-mt-d;boost_locale-mt-d-1_49;boost_locale-mt-d;boost_locale-mt;boost_locale
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:961 ] Searching for THREAD_LIBRARY_RELEASE: boost_thread-gcc47-mt-1_49;boost_thread-gcc47-mt;boost_thread-mt-1_49;boost_thread-mt;boost_thread
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:993 ] Searching for THREAD_LIBRARY_DEBUG: boost_thread-gcc47-mt-d-1_49;boost_thread-gcc47-mt-d;boost_thread-mt-d-1_49;boost_thread-mt-d;boost_thread-mt;boost_thread
-- [ /usr/share/cmake-2.8/Modules/FindBoost.cmake:1107 ] Boost_FOUND = FALSE
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1194 (message):
Unable to find the requested Boost libraries.
Boost version: 1.49.0
Boost include path: /usr/include
The following Boost libraries could not be found:
boost_regex
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
CMakeLists.txt:56 (find_package)
-- Configuring incomplete, errors occurred!
Makefile:237: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
I don't get why it's not working i tried to set variables on my CMakeLists.txt (where the boost library seems to be installed)
set(BOOST_ROOT /usr/include/boost/)
set(BOOST_LIBRARYDIR /usr/include/boost/regex/)
I even tried to look how was working the /usr/share/cmake-2.8/Modules/FindBoost.cmake file, but i didn't learn much. So i'm trying to post a distress call here, if someone could enlighten me a little bit !
The thing i don't get is why it seems to find the other libraries but not the regex one, despite everything being in /usr/include/boost
The boost version is 1.49 (i looked inside the version.hpp file), but on boost documentation, they don't speak about regex library in this version? I'm a bit lost.
You have to install the headers of the Boost library, too. CMake checks for both the libraries and the headers.
Most Linux distributions provide the headers as a -devel package. In your case something like boost_regex-1.49-devel.
Related
COPY from stdin PostgreSQL
I am having a hard time with this bulk copy syntax. Looks to me like I followed the correct syntax from a tutorial i checked out. But there seems to be a syntax error that i cannot detect. Need some help on this. COPY aza_ods_version2.test2 FROM {'/Users/kevingitonga/Desktop/test1.csv' | STDIN} [ [ WITH ] [ BINARY ] [ OIDS ] [ DELIMITER [ AS ] ',' ] [ CSV [ HEADER ]]
Clang is misinterpretting #import statement as a file, not a framework
I have #import <customframeworkname/customframeworkname.h>. Xcode does list the frameworks under Linked Frameworks and Libraries. However, when compiling it from the command line using Clang, it says: ../cppsrc/stuff.mm:6:9: fatal error: 'customframeworkname/customframeworkname.h' file not found #import <customframeworkname/customframeworkname.h> I tried changing it to the relative path by doing #import <../customfwdir/customframeworkname/Headers/customframeworkname.h>. Now it finds the file, but since a framework contains many headers, it doesn't recognize the framework's internal headers which uses #import <customframeworkname/otherheader.h>. Obviously, changing up the whole framework would be bad. I'm super new to macOS development, any tips in the right direction would be appreciated! Additional context: building a cross platform node.js addon, which is why I'm compiling it through commandline, specifically node-gyp. Node-gyp has a command to generate a xcode project file, which I use to check to make sure the build settings which I define in the bindings file do get properly translated to xcode settings. { "targets": [ { "target_name": "myproj", "cflags!": [ "-fno-exceptions" ], "cflags_cc!": [ "-fno-exceptions" ], "sources": [ "cppsrc/wrapper.cc" ], "conditions": [ ["OS=='mac'", { "xcode_settings": { "FRAMEWORK_SEARCH_PATHS": "$(SRCROOT)/**" }, "link_settings": { "libraries": [ "customfws/fwname.framework" ] }, "sources": [ "cppsrc/stuff.mm" ] }] ], "include_dirs": [ "<!#(node -p \"require('node-addon-api').include\")" ], 'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ] } ] }
How to find static python libs with find_package(pythonlibs 2) in CMake
I printed ${PYTHON_LIBRARY} out, it's [ /usr/lib/i386-linux-gnu/libpython2.7.so ] but what i actually need is [ /usr/lib/i386-linux-gnu/libpython2.7.a ] i don't find some options like [Boost_USE_STATIC_LIBS], so what can i do?
Durandal.js optimizer not working (empty main-built.js)
I'm trying to get Durandal.js optimizer working on my test project, but it seems to generate nothing to main-built.js. I use the following command from node.js command prompt, in durandal/amd folder: optimizer.exe --verbose true Result is Using default base configuration. Configuring for deploy with almond (custom). { "name": "durandal/amd/almond-custom", "inlineText": true, "stubModules": [ "durandal/amd/text" ], "paths": { "text": "durandal/amd/text" }, "baseUrl": "C:\\Users\\Tommi Gustafsson\\Documents\\Visual Studio 2012\\Projects\\DurandalTests\\DurandalTest1\\TestApp", "mainConfigFile": "C:\\Users\\Tommi Gustafsson\\Documents\\Visual Studio 2012\\Projects\\DurandalTests\\DurandalTest1\\TestApp\\main.js", "include": [ "main-built", "main", "bindings/tinymce-binding", "durandal/app", "durandal/composition", "durandal/events", "durandal/http", "text!durandal/messageBox.html", "durandal/messageBox", "durandal/modalDialog", "durandal/system", "durandal/viewEngine", "durandal/viewLocator", "durandal/viewModel", "durandal/viewModelBinder", "durandal/widget", "durandal/plugins/router", "durandal/transitions/entrance", "raphael-amd/eve.0.3.4", "raphael-amd/raphael.2.1.0.amd", "raphael-amd/raphael.2.1.0.core", "raphael-amd/raphael.2.1.0.svg", "raphael-amd/raphael.2.1.0.vml", "viewmodels/flickr", "viewmodels/modal1", "viewmodels/myPage", "viewmodels/shell", "viewmodels/welcome", "text!views/detail.html", "text!views/flickr.html", "text!views/modal1.html", "text!views/myPage.html", "text!views/shell.html", "text!views/welcome.html" ], "exclude": [], "keepBuildDir": true, "optimize": "uglify2", "out": "C:\\Users\\Tommi Gustafsson\\Documents\\Visual Studio 2012\\Projects\\DurandalTests\\DurandalTest1\\TestApp\\main-built.js", "pragmas": { "build": true }, "wrap": true, "insertRequire": [ "main" ] } Deleting old output file. Tracing dependencies for: durandal/amd/almond-custom Then, when I check main-built.js, it is empty. Can anyone help me what is the problem? I have several AMD modules in the test project, including Raphael.js AMD modules. My requirejs configuration looks like this: requirejs.config({ paths: { 'text': 'durandal/amd/text', 'eve': './raphael-amd/eve.0.3.4', 'raphael.core': './raphael-amd/raphael.2.1.0.core', 'raphael.svg': './raphael-amd/raphael.2.1.0.svg', 'raphael.vml': './raphael-amd/raphael.2.1.0.vml', 'raphael': './raphael-amd/raphael.2.1.0.amd', 'tinymce': "../Scripts/tinymce/jquery.tinymce.min" } });
In the same amd folder, where optimizer is stored, try running node r.js -o app.build.js. I've seen r.js sometimes choke about some dependencies, which resolves without problem when loading via require.js. For whatever reason the error messages won't show up when using optimizer --verbose. Typically the error message provides enough information to see where this occurs and if you've to update require.contig.paths or a specific define dependency.
How can I optimize this custom dojo 1.7.2 build
I am working on my first project which uses a dojo 1.7.2 component, and only need a vertical slider widget. I was able to create a custom build which is supposed to include only the modules needed for my stated dependencies. Using the following build profile, and the command C:\dojo-release-1.7.2-src\util\buildscripts>build -p profiles/km.admin.dashboard.profile.js -r the resulting release/dojo/dojo.js.uncompressed.js is 796kb, and the release/dojo/dojo.js is 236kb. Is there any way to exclude more unneeded modules to reduce the file size? For instance, I just opened the release/dojo/dojo.js.uncompressed.js and took a quick look, there is a dojo/json package, I am not using any json. How do I exclude it? Thank you. dependencies = { layers: [ { name: 'dojo.js', customBase: true, dependencies: [ 'dojo/dojo', 'dojo.aspect', 'dojo/selector/acme', 'dojo/cldr/nls/number', 'dijit.form.VerticalSlider', 'dijit.form.VerticalRule', 'dijit.form.VerticalRuleLabels' ] } ], staticHasFeatures: { 'dojo-trace-api':0, 'dojo-log-api':0, 'dojo-publish-privates':0, 'dojo-sync-loader':0, 'dojo-xhr-factory':0, 'dojo-test-sniff':0 }, prefixes: [ [ 'dijit', '../dijit' ], [ 'dojox', '../dojox' ] ] }
There are some approaches by which you can trim down dojo.js to a bare minimum and keep adding the modules within dojo.js that you really need. See: http://dojotoolkit.org/reference-guide/1.7/build/customBase.html and also: http://www.sitepen.com/blog/2008/07/01/dojo-in-6k/ (this is somewhat old and cutombase approach in the first link might work better)