Closed rcurtin closed 9 years ago
Commented by rcurtin on 22 Jun 43830035 01:41 UTC Adding BOOST_ROOT would only be necessary if the configuration step (cmake) failed. Are you on RHEL6? If so, try adding -D Boost_NO_BOOST_CMAKE=1 to the cmake command. If that doesn't help, can you tell me more about your system? i.e. what distribution, what version of Boost is installed, what version of CMake, and a copy of the CMakeCache.txt that CMake generated in your build directory.
Commented by Madda on 8 Dec 43831377 07:43 UTC Hello,
I have Ubuntu 12.04; I installed the boost libraries with the ubuntu packages and the version is 1.48.0.2; Cmake version is 2.8.10.1
I tried adding -D Boost_NO_BOOST_CMAKE=1 but I still get the same errors.
This is the CMakeChace.txt generated
########################
########################
//Path to a file. ARMADILLO_INCLUDE_DIR:PATH=/usr/local/armadillo-3.920.2/include
//Path to a library. ARMADILLO_LIBRARY:FILEPATH=/usr/local/armadillo-3.920.2/libarmadillo.so
//Compile with extra Armadillo debugging symbols. ARMA_EXTRA_DEBUG:BOOL=OFF
//Path to a file. Boost_INCLUDE_DIR:PATH=/usr/local/include
//Boost library directory Boost_LIBRARY_DIRS:FILEPATH=/usr/lib
//No help, variable specified on the command line. Boost_NO_BOOST_CMAKE:UNINITIALIZED=1
//The Boost PROGRAM_OPTIONS library Boost_PROGRAM_OPTIONS_LIBRARY:FILEPATH=/usr/lib/libboost_program_options-mt.so
//Boost program_options library (debug) Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_program_options-mt.so
//Boost program_options library (release) Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_program_options-mt.so
//The Boost RANDOM library Boost_RANDOM_LIBRARY:FILEPATH=/usr/lib/libboost_random-mt.so
//Boost random library (debug) Boost_RANDOM_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_random-mt.so
//Boost random library (release) Boost_RANDOM_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_random-mt.so
//The Boost UNIT_TEST_FRAMEWORK library Boost_UNIT_TEST_FRAMEWORK_LIBRARY:FILEPATH=/usr/lib/libboost_unit_test_framework-mt.so
//Boost unit_test_framework library (debug) Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_unit_test_framework-mt.so
//Boost unit_test_framework library (release) Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_unit_test_framework-mt.so
//Path to a program. CMAKE_AR:FILEPATH=/usr/bin/ar
//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. CMAKE_BUILD_TYPE:STRING=
//Enable/Disable color output during build. CMAKE_COLOR_MAKEFILE:BOOL=ON
//CXX compiler. CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++
//Flags used by the compiler during all build types. CMAKE_CXX_FLAGS:STRING=
//Flags used by the compiler during debug builds. CMAKE_CXX_FLAGS_DEBUG:STRING=-g
//Flags used by the compiler during release minsize builds. CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds (/MD /Ob1 /Oi // /Ot /Oy /Gs will produce slightly less optimized but smaller // files). CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the compiler during Release with Debug Info builds. CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//C compiler. CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc
//Flags used by the compiler during all build types. CMAKE_C_FLAGS:STRING=
//Flags used by the compiler during debug builds. CMAKE_C_FLAGS_DEBUG:STRING=-g
//Flags used by the compiler during release minsize builds. CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
//Flags used by the compiler during release builds (/MD /Ob1 /Oi // /Ot /Oy /Gs will produce slightly less optimized but smaller // files). CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
//Flags used by the compiler during Release with Debug Info builds. CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
//Flags used by the linker. CMAKE_EXE_LINKER_FLAGS:STRING=' '
//Flags used by the linker during debug builds. CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds. CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds. CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds. CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Enable/Disable output of compile commands during generation. CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
//Install path prefix, prepended onto install directories. CMAKE_INSTALL_PREFIX:PATH=/usr/local
//Path to a program. CMAKE_LINKER:FILEPATH=/usr/bin/ld
//Path to a program. CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
//Flags used by the linker during the creation of modules. CMAKE_MODULE_LINKER_FLAGS:STRING=' '
//Flags used by the linker during debug builds. CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds. CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds. CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds. CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//Path to a program. CMAKE_NM:FILEPATH=/usr/bin/nm
//Path to a program. CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy
//Path to a program. CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump
//Value Computed by CMake CMAKE_PROJECT_NAME:STATIC=mlpack
//Path to a program. CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
//Flags used by the linker during the creation of dll's. CMAKE_SHARED_LINKER_FLAGS:STRING=' '
//Flags used by the linker during debug builds. CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
//Flags used by the linker during release minsize builds. CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
//Flags used by the linker during release builds. CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
//Flags used by the linker during Release with Debug Info builds. CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
//If set, runtime paths are not added when installing shared libraries, // but are added when building. CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
//If set, runtime paths are not added when using shared libraries. CMAKE_SKIP_RPATH:BOOL=NO
//Path to a program. CMAKE_STRIP:FILEPATH=/usr/bin/strip
//If true, cmake will use relative paths in makefiles and projects. CMAKE_USE_RELATIVE_PATHS:BOOL=OFF
//If this value is on, makefiles will be generated without the // .SILENT directive, and all commands will be echoed to the console // during the make. This is useful for debugging only. With Visual // Studio IDE projects all commands are done without /nologo. CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
//Compile with debugging information DEBUG:BOOL=OFF
//Graphviz Dot tool for using Doxygen DOXYGEN_DOT_EXECUTABLE:FILEPATH=DOXYGEN_DOT_EXECUTABLE-NOTFOUND
//Doxygen documentation generation tool (http://www.doxygen.org) DOXYGEN_EXECUTABLE:FILEPATH=DOXYGEN_EXECUTABLE-NOTFOUND
//Path to a file. LIBXML2_INCLUDE_DIR:PATH=/usr/local/include/libxml2
//Path to a library. LIBXML2_LIBRARIES:FILEPATH=/usr/local/lib/libxml2.so
//Path to a program. LIBXML2_XMLLINT_EXECUTABLE:FILEPATH=/usr/local/bin/xmllint
//Compile MATLAB bindings if MATLAB is found. MATLAB_BINDINGS:BOOL=OFF
//pkg-config executable PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/pkg-config
//Compile with profiling information PROFILE:BOOL=OFF
//Path to a program. TXT2MAN:FILEPATH=TXT2MAN-NOTFOUND
//Value Computed by CMake mlpack_BINARY_DIR:STATIC=/usr/local/mlpack/mlpack-1.0.7/build
//Dependencies for the target mlpack_LIB_DEPENDS:STATIC=general;/usr/local/armadillo-3.920.2/libarmadillo.so;general;/usr/lib/libboost_program_options-mt.so;general;/usr/lib/libboost_unit_test_framework-mt.so;general;/usr/lib/libboost_random-mt.so;general;/usr/lib/libboost_program_options-mt.so;general;/usr/lib/libboost_unit_test_framework-mt.so;general;/usr/local/lib/libxml2.so;general;rt;
//Value Computed by CMake mlpack_SOURCE_DIR:STATIC=/usr/local/mlpack/mlpack-1.0.7
########################
########################
//ADVANCED property for variable: ARMADILLO_INCLUDE_DIR ARMADILLO_INCLUDE_DIR-ADVANCED:INTERNAL=1 //ADVANCED property for variable: ARMADILLO_LIBRARY ARMADILLO_LIBRARY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: Boost_INCLUDE_DIR Boost_INCLUDE_DIR-ADVANCED:INTERNAL=1 //ADVANCED property for variable: Boost_LIBRARY_DIRS Boost_LIBRARY_DIRS-ADVANCED:INTERNAL=1 //The library version string for boost libraries Boost_LIB_VERSION:INTERNAL=1_54 //Whether the Boost PROGRAM_OPTIONS library found Boost_PROGRAM_OPTIONS_FOUND:INTERNAL=ON //ADVANCED property for variable: Boost_PROGRAM_OPTIONS_LIBRARY Boost_PROGRAM_OPTIONS_LIBRARY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 //Whether the Boost RANDOM library found Boost_RANDOM_FOUND:INTERNAL=ON //ADVANCED property for variable: Boost_RANDOM_LIBRARY Boost_RANDOM_LIBRARY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: Boost_RANDOM_LIBRARY_DEBUG Boost_RANDOM_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: Boost_RANDOM_LIBRARY_RELEASE Boost_RANDOM_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 //Whether the Boost UNIT_TEST_FRAMEWORK library found Boost_UNIT_TEST_FRAMEWORK_FOUND:INTERNAL=ON //ADVANCED property for variable: Boost_UNIT_TEST_FRAMEWORK_LIBRARY Boost_UNIT_TEST_FRAMEWORK_LIBRARY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE-ADVANCED:INTERNAL=1 //The version number for boost libraries Boost_VERSION:INTERNAL=105400 //ADVANCED property for variable: CMAKE_AR CMAKE_AR-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_BUILD_TOOL CMAKE_BUILD_TOOL-ADVANCED:INTERNAL=1 //What is the target build tool cmake is generating for. CMAKE_BUILD_TOOL:INTERNAL=/usr/bin/make //This is the directory where this CMakeCache.txt was created CMAKE_CACHEFILE_DIR:INTERNAL=/usr/local/mlpack/mlpack-1.0.7/build //Major version of cmake used to create the current loaded cache CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2 //Minor version of cmake used to create the current loaded cache CMAKE_CACHE_MINOR_VERSION:INTERNAL=8 //Patch version of cmake used to create the current loaded cache CMAKE_CACHE_PATCH_VERSION:INTERNAL=10 //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 //Path to CMake executable. CMAKE_COMMAND:INTERNAL=/usr/local/bin/cmake //Path to cpack program executable. CMAKE_CPACK_COMMAND:INTERNAL=/usr/local/bin/cpack //Path to ctest program executable. CMAKE_CTEST_COMMAND:INTERNAL=/usr/local/bin/ctest //ADVANCED property for variable: CMAKE_CXX_COMPILER CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_COMPILER CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //Executable file format CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 //Name of generator. CMAKE_GENERATOR:INTERNAL=Unix Makefiles //Start directory with the top level CMakeLists.txt file for this // project CMAKE_HOME_DIRECTORY:INTERNAL=/usr/local/mlpack/mlpack-1.0.7 //Install .so files without execute permission. CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 //ADVANCED property for variable: CMAKE_LINKER CMAKE_LINKER-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MAKE_PROGRAM CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_NM CMAKE_NM-ADVANCED:INTERNAL=1 //number of local generators CMAKE_NUMBER_OF_LOCAL_GENERATORS:INTERNAL=38 //ADVANCED property for variable: CMAKE_OBJCOPY CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_OBJDUMP CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_RANLIB CMAKE_RANLIB-ADVANCED:INTERNAL=1 //Path to CMake installation. CMAKE_ROOT:INTERNAL=/usr/local/share/cmake-2.8 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_SKIP_RPATH CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_STRIP CMAKE_STRIP-ADVANCED:INTERNAL=1 //uname command CMAKE_UNAME:INTERNAL=/bin/uname //ADVANCED property for variable: CMAKE_USE_RELATIVE_PATHS CMAKE_USE_RELATIVE_PATHS-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: DOXYGEN_DOT_EXECUTABLE DOXYGEN_DOT_EXECUTABLE-ADVANCED:INTERNAL=1 //ADVANCED property for variable: DOXYGEN_EXECUTABLE DOXYGEN_EXECUTABLE-ADVANCED:INTERNAL=1 //Details about finding Armadillo FIND_PACKAGE_MESSAGE_DETAILS_Armadillo:INTERNAL=[about finding LibXml2 FIND_PACKAGE_MESSAGE_DETAILS_LibXml2:INTERNAL=/usr/local/lib/libxml2.so[/usr/local/include/libxml2][v2.9.1(2.6.0)] //ADVANCED property for variable: LIBXML2_INCLUDE_DIR LIBXML2_INCLUDE_DIR-ADVANCED:INTERNAL=1 //ADVANCED property for variable: LIBXML2_LIBRARIES LIBXML2_LIBRARIES-ADVANCED:INTERNAL=1 //ADVANCED property for variable: LIBXML2_XMLLINT_EXECUTABLE LIBXML2_XMLLINT_EXECUTABLE-ADVANCED:INTERNAL=1 PC_LIBXML_CFLAGS:INTERNAL=-I/usr/local/include/libxml2 PC_LIBXML_CFLAGS_I:INTERNAL= PC_LIBXML_CFLAGS_OTHER:INTERNAL= PC_LIBXML_FOUND:INTERNAL=1 PC_LIBXML_INCLUDEDIR:INTERNAL=/usr/local/include PC_LIBXML_INCLUDE_DIRS:INTERNAL=/usr/local/include/libxml2 PC_LIBXML_LDFLAGS:INTERNAL=-L/usr/local/lib;-lxml2 PC_LIBXML_LDFLAGS_OTHER:INTERNAL= PC_LIBXML_LIBDIR:INTERNAL=/usr/local/lib PC_LIBXML_LIBRARIES:INTERNAL=xml2 PC_LIBXML_LIBRARY_DIRS:INTERNAL=/usr/local/lib PC_LIBXML_LIBS:INTERNAL= PC_LIBXML_LIBS_L:INTERNAL= PC_LIBXML_LIBS_OTHER:INTERNAL= PC_LIBXML_LIBS_PATHS:INTERNAL= PC_LIBXML_PREFIX:INTERNAL=/usr/local PC_LIBXML_STATIC_CFLAGS:INTERNAL=-I/usr/local/include/libxml2 PC_LIBXML_STATIC_CFLAGS_I:INTERNAL= PC_LIBXML_STATIC_CFLAGS_OTHER:INTERNAL= PC_LIBXML_STATIC_INCLUDE_DIRS:INTERNAL=/usr/local/include/libxml2 PC_LIBXML_STATIC_LDFLAGS:INTERNAL=-L/usr/local/lib;-lxml2;-lz;-lm PC_LIBXML_STATIC_LDFLAGS_OTHER:INTERNAL= PC_LIBXML_STATIC_LIBDIR:INTERNAL= PC_LIBXML_STATIC_LIBRARIES:INTERNAL=xml2;z;m PC_LIBXML_STATIC_LIBRARY_DIRS:INTERNAL=/usr/local/lib PC_LIBXML_STATIC_LIBS:INTERNAL= PC_LIBXML_STATIC_LIBS_L:INTERNAL= PC_LIBXML_STATIC_LIBS_OTHER:INTERNAL= PC_LIBXML_STATIC_LIBS_PATHS:INTERNAL= PC_LIBXML_VERSION:INTERNAL=2.9.1 PC_LIBXML_libxml-2.0_INCLUDEDIR:INTERNAL= PC_LIBXML_libxml-2.0_LIBDIR:INTERNAL= PC_LIBXML_libxml-2.0_PREFIX:INTERNAL= PC_LIBXML_libxml-2.0_VERSION:INTERNAL= //ADVANCED property for variable: PKG_CONFIG_EXECUTABLE PKG_CONFIG_EXECUTABLE-ADVANCED:INTERNAL=1 __pkg_config_checked_PC_LIBXML:INTERNAL=1
Thanks a lot for your help, Madda
Commented by rcurtin on 8 Jun 43838969 16:16 UTC Hi there,
I'm sorry for the slow response. I have spent some time investigating the issue but I don't have a solution yet. I am attempting to set up an Ubuntu 12.04 system so that I can reproduce the problem.
Can you give me the output of the following command?
VERBOSE=1 make
This should give a lot of output and might help me figure out why the linker isn't actually linking against the boost program_options library.
Also, does the file /usr/lib/libboost_program_options-mt.so exist on your filesystem?
Thanks,
Ryan
Commented by Madda on 31 Aug 43839753 18:46 UTC Hi,
I manages to solve the problem, but in a very unclean way. The file /usr/lib/libboost_program_options-mt.so is existing.
What I did is to remove the boost installed with the ubuntu packages, and to install from scratch boost-1.54. I installed them in /usr/local/boost/ , so in /usr/local/include/boost/ I have the headers and in /usr/local/lib the .so files.
I tried to compile the mlpack with: ccmake -D BOOST_ROOT=/ust/local/boost ,but I still had the same problems.
So I went into CMakeCache.txt and saw that: Boost_LIBRARY_DIRS:FILEPATH=/usr/lib Boost_PROGRAM_OPTIONS_LIBRARY:FILEPATH=/usr/lib/libboost_program_options-mt.so Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG:FILEPATH=/usr/lib/libboost_program_options-mt.so Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE:FILEPATH=/usr/lib/libboost_program_options-mt.so
I modified these lines:
Boost_LIBRARY_DIRS:FILEPATH=/usr/local/lib
Boost_PROGRAM_OPTIONS_LIBRARY:FILEPATH=/usr/local/lib/libboost_program_options.so
Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG:FILEPATH=/usr/local/lib/libboost_program_options.so
Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE:FILEPATH=/usr/local/lib/libboost_program_options.so
(In /usr/local/lib/ there is no libboost_program_options-mt.so but only libboost_program_options.so)
And then it compiles without errors. I think this is not the appropriate way!!!!
Do you have any suggestion on how to do it in the correct way?
Thanks a lot! Madda
Commented by birm on 23 Sep 44186418 00:19 UTC It seems that, from other projects, using the BOOST_ROOT variable has helped; do you want me to conditionally set this depending on the installation environment in CMakeLists, or would that not be of any help here?
Commented by rcurtin on 19 May 44196307 10:29 UTC Hello Madda,
I'm sorry for the very slow response to this ticket.
I think that when you specified 'ccmake -D BOOST_ROOT=/ust/local/boost', that was incorrect, and you should have specified BOOST_ROOT=/usr/local/ because the libraries are in /usr/local/lib/ and the headers in /usr/local/include/, not /usr/local/boost/lib/ and /usr/local/boost/include/.
Even so, I am not sure what happened in your situation. I think that maybe on your system, you had only partially uninstalled the Boost libraries, causing the FindBoost script to find Boost headers in /usr/include/ and assume the libraries were in /usr/lib/.
If specifying BOOST_ROOT=/usr/local/ does not work, you can try adding additional options that are documented in the FindBoost.cmake script:
If none of these work, feel free to reopen the ticket, but I am fairly sure that one of these things should resolve the issue.
Thanks for the patience, and sorry for the slow response.
Ryan
Reported by Madda on 9 Jul 43830007 18:54 UTC Hi, I am trying to build mlpack-1.0.7, but I am getting linking errors with boost. There was already a ticket on this topic and the suggestion was to add -D BOOST_ROOT=/usr/include/ which I did, but I am still getting problems.
These are the command:
$ sudo cmake -D BOOST_ROOT=/usr/local/ -D ARMADILLO_INCLUDE_DIR=/usr/local/armadillo-3.920.2/include/ -D ARMADILLO_LIBRARY=/usr/local/armadillo-3.920.2/libarmadillo.so ../ CMake Warning at CMakeLists.txt:81 (message): This is a 64-bit system, but Armadillo was compiled without 64-bit index support. Consider recompiling Armadillo with ARMA_64BIT_WORD to enable 64-bit indices (large matrix support). MLPACK will still work without ARMA_64BIT_WORD defined, but will not scale to matrices with more than 4 billion elements.
-- Boost version: 1.54.0 -- Found the following Boost libraries: -- program_options -- unit_test_framework -- Boost version: 1.54.0 -- Found the following Boost libraries: -- random -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) CMake Warning at CMakeLists.txt:270 (message): txt2man not found; man pages will not be generated.
-- Configuring done -- Generating done -- Build files have been written to: /usr/local/mlpack/mlpack-1.0.7/build
$ sudo make Scanning dependencies of target mlpack [ 1%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/dists/discrete_distribution.cpp.o [ 2%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/dists/gaussian_distribution.cpp.o [ 3%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/kernels/epanechnikov_kernel.cpp.o [ 4%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/kernels/pspectrum_string_kernel.cpp.o [ 5%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/math/lin_alg.cpp.o [ 6%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/math/random.cpp.o [ 7%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/optimizers/aug_lagrangian/aug_lagrangian_test_functions.cpp.o [ 8%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/optimizers/lbfgs/test_functions.cpp.o [ 9%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/optimizers/sgd/test_function.cpp.o [ 10%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/tree/mrkd_statistic.cpp.o [ 11%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/util/cli.cpp.o [ 12%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/util/cli_deleter.cpp.o [ 13%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/util/log.cpp.o [ 14%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/util/option.cpp.o [ 15%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/util/prefixedoutstream.cpp.o [ 17%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/util/save_restore_utility.cpp.o [ 18%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/util/string_util.cpp.o [ 19%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/util/timers.cpp.o [ 20%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/methods/cf/cf.cpp.o In file included from /usr/local/mlpack/mlpack-1.0.7/src/mlpack/../mlpack/methods/neighbor_search/neighbor_search.hpp:254:0, from /usr/local/mlpack/mlpack-1.0.7/src/mlpack/methods/cf/cf.hpp:29, from /usr/local/mlpack/mlpack-1.0.7/src/mlpack/methods/cf/cf.cpp:26: /usr/local/mlpack/mlpack-1.0.7/src/mlpack/../mlpack/methods/neighbor_search/neighbor_search_impl.hpp: In member function void mlpack::neighbor::NeighborSearch<SortPolicy, MetricType, TreeType>::Search(size_t, arma::Mat&, arma::mat&) SortPolicy = mlpack::neighbor::NearestNeighborSort, MetricType = mlpack::metric::LMetric<2, true>, TreeType = mlpack::tree::BinarySpaceTreemlpack::bound::HRectBound<2, mlpack::neighbor::NeighborSearchStatmlpack::neighbor::NearestNeighborSort, arma::Mat >, size_t = long unsigned int, arma::mat = arma::Mat :
/usr/local/mlpack/mlpack-1.0.7/src/mlpack/methods/cf/cf.cpp:144:67: instantiated from here
/usr/local/mlpack/mlpack-1.0.7/src/mlpack/../mlpack/methods/neighbor_search/neighbor_search_impl.hpp:205:10: warning: unused variable numPrunes 21% Building CXX object src/mlpack/CMakeFiles/mlpack.dir/methods/det/dtree.cpp.o
/usr/local/mlpack/mlpack-1.0.7/src/mlpack/methods/det/dtree.cpp:143:6: warning: unused parameter maxLeafSize 22% Building CXX object src/mlpack/CMakeFiles/mlpack.dir/methods/det/dt_utils.cpp.o
[ 23%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/methods/lars/lars.cpp.o
[ 24%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/methods/linear_regression/linear_regression.cpp.o
[ 25%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/methods/neighbor_search/sort_policies/nearest_neighbor_sort.cpp.o
[ 26%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/methods/neighbor_search/sort_policies/furthest_neighbor_sort.cpp.o
[ 27%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/methods/neighbor_search/unmap.cpp.o
[ 28%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/methods/pca/pca.cpp.o
[ 29%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/methods/radical/radical.cpp.o
Linking CXX shared library ../../lib/libmlpack.so
Moving header files to include/mlpack/
[ 29%] Built target mlpack
Scanning dependencies of target cf
[ 30%] Building CXX object src/mlpack/methods/cf/CMakeFiles/cf.dir/cf_main.cpp.o
Linking CXX executable ../../../../bin/cf
CMakeFiles/cf.dir/cf_main.cpp.o: In function , std::allocator > const&) const'
CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEEfor boost::exception_detail::error_info_injectorboost::program_options::validation_error+0x20): undefined reference to , std::allocator > const&) const'
CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEEfor boost::exception_detail::clone_implboost::exception_detail::error_info_injector +0x28): undefined reference to , std::allocator > const&) const'
CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost15program_options20invalid_option_valueEfor boost::program_options::invalid_option_value+0x20): undefined reference to , std::allocator > const&) const'
CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEEfor boost::exception_detail::error_info_injectorboost::program_options::invalid_option_value+0x20): undefined reference to , std::allocator > const&) const'
CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEEfor boost::exception_detail::clone_implboost::exception_detail::error_info_injector +0x28): undefined reference to , std::allocator > const&) const'
CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTIN5boost15program_options16validation_errorEfor boost::program_options::validation_error+0x10): undefined reference to
boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)': cf_main.cpp:(.text._ZN5boost15program_options16validation_errorC2ENS1_6kind_tERKSsS4_i[undefined reference to
boost::program_options::validation_error::get_template(boost::program_options::validation_error::kind_t)' cf_main.cpp:(.text._ZN5boost15program_options16validation_errorC2ENS1_6kind_tERKSsS4_i_ZN5boost15program_options16validation_errorC5ENS1_6kind_tERKSsS4_i:)+0x44): undefined reference toboost::program_options::error_with_option_name::error_with_option_name(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' CMakeFiles/cf.dir/cf_main.cpp.o: In function
boost::program_options::error_with_option_name::~error_with_option_name()': cf_main.cpp:(.text._ZN5boost15program_options22error_with_option_nameD2Ev[undefined reference tovtable for boost::program_options::error_with_option_name' CMakeFiles/cf.dir/cf_main.cpp.o: In function
boost::program_options::validation_error::~validation_error()': cf_main.cpp:(.text._ZN5boost15program_options16validation_errorD2Ev_ZN5boost15program_options16validation_errorD5Ev:)+0x7): undefined reference tovtable for boost::program_options::error_with_option_name' CMakeFiles/cf.dir/cf_main.cpp.o: In function
boost::program_options::error_with_option_name::~error_with_option_name()': cf_main.cpp:(.text._ZN5boost15program_options22error_with_option_nameD0Ev[undefined reference tovtable for boost::program_options::error_with_option_name' CMakeFiles/cf.dir/cf_main.cpp.o: In function
boost::program_options::invalid_option_value::~invalid_option_value()': cf_main.cpp:(.text._ZN5boost15program_options20invalid_option_valueD0Ev_ZN5boost15program_options20invalid_option_valueD5Ev:)+0x7): undefined reference tovtable for boost::program_options::error_with_option_name' CMakeFiles/cf.dir/cf_main.cpp.o: In function
boost::program_options::invalid_option_value::~invalid_option_value()': cf_main.cpp:(.text._ZN5boost15program_options20invalid_option_valueD2Ev[undefined reference tovtable for boost::program_options::error_with_option_name' CMakeFiles/cf.dir/cf_main.cpp.o:cf_main.cpp:(.text._ZN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEED2Ev[_ZN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEED5Ev](_ZN5boost15program_options20invalid_option_valueD5Ev]+0x7):)+0x2c): more undefined references to
vtable for boost::program_options::error_with_option_name' follow CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost15program_options16validation_errorEfor boost::program_options::validation_error+0x20): undefined reference toboost::program_options::error_with_option_name::what() const' CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost15program_options16validation_errorE[for boost::program_options::validation_error](vtable)+0x30): undefined reference to
boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traitsboost::program_options::error_with_option_name::what() const' CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE[for boost::exception_detail::error_info_injector<boost::program_options::validation_error>](vtable)+0x30): undefined reference to
boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traitsboost::program_options::error_with_option_name::what() const' CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE[for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::validation_error> >](vtable)+0x38): undefined reference to
boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traitsboost::program_options::error_with_option_name::what() const' CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost15program_options20invalid_option_valueE[for boost::program_options::invalid_option_value](vtable)+0x30): undefined reference to
boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traitsboost::program_options::error_with_option_name::what() const' CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE[for boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value>](vtable)+0x30): undefined reference to
boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traitsboost::program_options::error_with_option_name::what() const' CMakeFiles/cf.dir/cf_main.cpp.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE[for boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::program_options::invalid_option_value> >](vtable)+0x38): undefined reference to
boost::program_options::error_with_option_name::substitute_placeholders(std::basic_string<char, std::char_traitstypeinfo for boost::program_options::error_with_option_name' ../../../../lib/libmlpack.so.1.0: undefined reference to
boost::program_options::detail::cmdline::get_canonical_option_prefix()' collect2: ld returned 1 exit status make[* bin/cf Error 1 make[* src/mlpack/methods/cf/CMakeFiles/cf.dir/all Error 2 make: *\ [all] Error 2I hope ypu can help me. Best, Madda