Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error #719

Closed
ghost opened this issue Jul 10, 2016 · 8 comments
Closed

Compilation error #719

ghost opened this issue Jul 10, 2016 · 8 comments

Comments

@ghost
Copy link

ghost commented Jul 10, 2016

I followed the instructions given here, but on the make step, I get the following error:

➜  build make                                        
[  1%] Updating arma_config.hpp (if necessary)
[  1%] Built target mlpack_arma_config
Moving header files to include/mlpack/
[  1%] Built target mlpack_headers
[  2%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/dists/discrete_distribution.cpp.o
In file included from /usr/include/armadillo:84:0,
                 from /home/anukul/dl/mlpack-2.0.2/src/mlpack/../mlpack/core/arma_extend/arma_extend.hpp:52,
                 from /home/anukul/dl/mlpack-2.0.2/src/mlpack/../mlpack/prereqs.hpp:78,
                 from /home/anukul/dl/mlpack-2.0.2/src/mlpack/../mlpack/core.hpp:206,
                 from /home/anukul/dl/mlpack-2.0.2/src/mlpack/core/dists/discrete_distribution.hpp:18,
                 from /home/anukul/dl/mlpack-2.0.2/src/mlpack/core/dists/discrete_distribution.cpp:14:
/usr/include/armadillo_bits/include_superlu.hpp:91:53: fatal error: /usr/include/SuperLU43/supermatrix.h: No such file or directory
   #include ARMA_INCFILE_WRAP(ARMA_SLU_SUPERMATRIX_H)
                                                     ^
compilation terminated.
src/mlpack/CMakeFiles/mlpack.dir/build.make:62: recipe for target 'src/mlpack/CMakeFiles/mlpack.dir/core/dists/discrete_distribution.cpp.o' failed
make[2]: *** [src/mlpack/CMakeFiles/mlpack.dir/core/dists/discrete_distribution.cpp.o] Error 1
CMakeFiles/Makefile2:234: recipe for target 'src/mlpack/CMakeFiles/mlpack.dir/all' failed
make[1]: *** [src/mlpack/CMakeFiles/mlpack.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

I'm on Fedora 24, and I've installed the dependencies mentioned on the page.

@rcurtin
Copy link
Member

rcurtin commented Jul 10, 2016

Hi there Anukul,

This seems weird to me because if Armadillo is detecting SuperLU, then SuperLU should be installed. Can you try installing SuperLU with dnf install SuperLU-devel and then try compiling again?

I will check to see that the Fedora Armadillo package (and the Fedora mlpack package) have the correct install dependencies. I wonder if the Armadillo package has SuperLU-devel as a build requirement but not an install requirement...

@rcurtin
Copy link
Member

rcurtin commented Jul 10, 2016

Ah, I should also ask, what version of the armadillo-devel package is installed?

@ghost ghost closed this as completed Jul 10, 2016
@ghost ghost reopened this Jul 10, 2016
@ghost
Copy link
Author

ghost commented Jul 10, 2016

Okay, I installed SuperLU separately but the error still persists.
I have armadillo-devel-6.700.6-1.fc24.x86_64

@rcurtin
Copy link
Member

rcurtin commented Jul 10, 2016

Ok, let's dig a bit deeper then. :)

Can you list which armadillo/mlpack/SuperLU packages are installed on your system?

dnf list installed | grep -i 'armadillo\|mlpack\|superlu'

Then, can you provide the output of cmake when you run CMake to configure mlpack? And also the actual build log itself? It will probably be a lot of output but it should at least give us enough to dig in and figure out what is going on.

@ghost
Copy link
Author

ghost commented Jul 10, 2016

List of packages:

➜  build sudo dnf list installed | grep -i 'armadillo\|mlpack\|superlu'
SuperLU.x86_64                         5.2.0-1.fc24             @fedora         
SuperLU-devel.x86_64                   5.2.0-1.fc24             @fedora         
SuperLU43.x86_64                       4.3-3.fc24               @fedora         
armadillo.x86_64                       6.700.6-1.fc24           @fedora         
armadillo-devel.x86_64                 6.700.6-1.fc24           @fedora  

cmake:

  ➜  build cmake ../
  -- The C compiler identification is GNU 6.1.1
  -- The CXX compiler identification is GNU 6.1.1
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Found Armadillo: /usr/lib64/libarmadillo.so (found suitable version "6.700.6", minimum required is "4.100.0") 
  -- Armadillo libraries: /usr/lib64/libarmadillo.so
  -- Boost version: 1.60.0
  -- Found the following Boost libraries:
  --   program_options
  --   unit_test_framework
  --   serialization
  -- Try OpenMP C flag = [-fopenmp]
  -- Performing Test OpenMP_FLAG_DETECTED
  -- Performing Test OpenMP_FLAG_DETECTED - Success
  -- Try OpenMP CXX flag = [-fopenmp]
  -- Performing Test OpenMP_FLAG_DETECTED
  -- Performing Test OpenMP_FLAG_DETECTED - Success
  -- Found OpenMP: -fopenmp  
  -- Found Git: /usr/bin/git (found version "2.7.4") 
  -- Regenerating arma_config.hpp.
  CMake Warning (dev) at src/mlpack/methods/neighbor_search/CMakeLists.txt:39 (get_property):
    Policy CMP0026 is not set: Disallow use of the LOCATION target property.
    Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
    command to set the policy and suppress this warning.

    The LOCATION property should not be read from target "mlpack_knn".  Use the
    target name directly with add_custom_command, or use the generator
    expression $<TARGET_FILE>, as appropriate.

  This warning is for project developers.  Use -Wno-dev to suppress it.

  CMake Warning (dev) at src/mlpack/methods/neighbor_search/CMakeLists.txt:47 (get_property):
    Policy CMP0026 is not set: Disallow use of the LOCATION target property.
    Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
    command to set the policy and suppress this warning.

    The LOCATION property should not be read from target "mlpack_kfn".  Use the
    target name directly with add_custom_command, or use the generator
    expression $<TARGET_FILE>, as appropriate.

  This warning is for project developers.  Use -Wno-dev to suppress it.

  CMake Warning (dev) at src/mlpack/methods/rann/CMakeLists.txt:42 (get_property):
    Policy CMP0026 is not set: Disallow use of the LOCATION target property.
    Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
    command to set the policy and suppress this warning.

    The LOCATION property should not be read from target "mlpack_krann".  Use
    the target name directly with add_custom_command, or use the generator
    expression $<TARGET_FILE>, as appropriate.

  This warning is for project developers.  Use -Wno-dev to suppress it.

  -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
  -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
  -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
  -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
  -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
  -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
  -- Found Doxygen: /usr/bin/doxygen (found version "1.8.11") 
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /home/anukul/dl/mlpack-2.0.2/build

make:

➜  build make
Scanning dependencies of target mlpack_arma_config
[  0%] Updating arma_config.hpp (if necessary)
-- Regenerating arma_config.hpp.
[  0%] Built target mlpack_arma_config
Scanning dependencies of target mlpack_headers
Moving header files to include/mlpack/
[  0%] Built target mlpack_headers
Scanning dependencies of target mlpack
[  1%] Building CXX object src/mlpack/CMakeFiles/mlpack.dir/core/dists/discrete_distribution.cpp.o
In file included from /usr/include/armadillo:84:0,
                 from /home/anukul/dl/mlpack-2.0.2/src/mlpack/../mlpack/core/arma_extend/arma_extend.hpp:52,
                 from /home/anukul/dl/mlpack-2.0.2/src/mlpack/../mlpack/prereqs.hpp:78,
                 from /home/anukul/dl/mlpack-2.0.2/src/mlpack/../mlpack/core.hpp:206,
                 from /home/anukul/dl/mlpack-2.0.2/src/mlpack/core/dists/discrete_distribution.hpp:18,
                 from /home/anukul/dl/mlpack-2.0.2/src/mlpack/core/dists/discrete_distribution.cpp:14:
/usr/include/armadillo_bits/include_superlu.hpp:91:53: fatal error: /usr/include/SuperLU43/supermatrix.h: No such file or directory
   #include ARMA_INCFILE_WRAP(ARMA_SLU_SUPERMATRIX_H)
                                                     ^
compilation terminated.
src/mlpack/CMakeFiles/mlpack.dir/build.make:62: recipe for target 'src/mlpack/CMakeFiles/mlpack.dir/core/dists/discrete_distribution.cpp.o' failed
make[2]: *** [src/mlpack/CMakeFiles/mlpack.dir/core/dists/discrete_distribution.cpp.o] Error 1
CMakeFiles/Makefile2:266: recipe for target 'src/mlpack/CMakeFiles/mlpack.dir/all' failed
make[1]: *** [src/mlpack/CMakeFiles/mlpack.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

I'm sorry for the edits, but the output of cmake changed considerably once I deleted everything in the build folder and executed it again.

@rcurtin
Copy link
Member

rcurtin commented Jul 10, 2016

Ah, okay, I see. That particular version of Armadillo was compiled against the SuperLU43-devel package, but you only have the SuperLU-devel and SuperLU43 packages installed... so I think that if you install SuperLU43-devel, that should fix the issue.

Looking at the Armadillo spec files, I think that when you upgrade your system, the correct dependencies will be installed, so you should not encounter this problem on other up-to-date F24 systems or in the future. This particular bug is one that the Armadillo packagers for Fedora encountered back in March, and it should be fixed now.

@ghost
Copy link
Author

ghost commented Jul 10, 2016

That fixed it, thanks!

@rcurtin
Copy link
Member

rcurtin commented Jul 10, 2016

Sure, glad we could help! :)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant