espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] Error with make and "target pattern" when installin


From: Jean-Noël Grad
Subject: Re: [ESPResSo-users] Error with make and "target pattern" when installing Espresso 4.1.4
Date: Tue, 18 May 2021 12:38:45 +0200
User-agent: Roundcube Webmail/1.3.16

Dear Bora Dirilgen,

If CMake was successful in finding the Boost libraries, lines 2218-2220 in your `src/core/CMakeFiles/EspressoCore.dir/build.make` file should look like this:
```
src/core/EspressoCore.so: /cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_serialization.so.1.72.0 src/core/EspressoCore.so: /cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_mpi.so.1.72.0 src/core/EspressoCore.so: /cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_filesystem.so.1.72.0
```
and `CMakeCache.txt` should have a line similar to this:
```
Boost_MPI_LIBRARY_RELEASE:STRING=/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_mpi.so.1.72.0
```

If CMake failed to locate libboost_mpi.so.1.72.0, the associated CMake variables will be initialized with magic values like `NOTFOUND` to indicate the dependency was not found. In your case, it seems the path to the Boost::mpi library was initialized with `Boost::mpi-NOTFOUND` and written as-is to the list of dependencies in the Makefile. Since the colon symbol `:` is a reserved character, command `make` fails to parse the Makefile and prints the unhelpful error message `target pattern contains no '%'`.

I'm not sure why CMake didn't fail early when it did not find Boost::mpi. Your CMake log shows it was found. This situation typically happens when we troubleshoot CMake error message by running the `cmake ..` command multiple times with different Bash exports and tweaked CMakeLists.txt files to solve an error, and then forget to clean the build directory before running `cmake ..` one last time. CMake relies on global variables that are inherited from previous calls to `cmake ..`, which can lead to cryptic errors.

There is another potential issue with your library vendor. CMake seems to have access to both the serial and multithreaded versions of the intel2020 boost library, and overwrites several of the serial versions with their multithreaded versions. Is it safe for the linker to mix serial and multithreaded Boost libraries? The Boost CMake logic provides the following switches to control library versions and linking:
```
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
```
Not sure if this helps, but the overwrite warnings are similar to those reported in https://stackoverflow.com/questions/58081084/target-boostlibrary-already-has-an-imported-location-link-errors

Best,
JN

On 2021-05-17 19:43, Bora Dirilgen wrote:
Dear all,

I am a new user of ESPResSo. I am trying to install the software on a
remote server which operates on Linux and have come across problems
when executing the "make" command. I have searched all over but could
not find a solution to this problem. When I run make from inside
espresso/build, I get the following error:

[  1%] Built target pdbparser

[  3%] Built target generate_config_features

[  3%] Built target myconfig

[  3%] Built target version

[  3%] Built target check_myconfig

[  3%] Built target EspressoConfig

src/core/CMakeFiles/EspressoCore.dir/build.make:2219: *** target
pattern contains no '%'.  Stop.

make[1]: *** [CMakeFiles/Makefile2:2881:
src/core/CMakeFiles/EspressoCore.dir/all] Error 2

make: *** [Makefile:141: all] Error 2

—————————————————————————————————————


The line src/core/CMakeFiles/EspressoCore.dir/build.make:2219 is as
follows:

(2219) src/core/EspressoCore.so: Boost::mpi-NOTFOUND

this line really does stand out as all the other lines are just file
paths that look like this:

(2211) src/core/EspressoCore.so:
src/core/CMakeFiles/EspressoCore.dir/grid_based_algorithms/EspressoCore_generated_lbgpu_cuda.cu.o


Could there be a syntax issue in the make file?

Any help would be greatly appreciated.

—————————————————————————————


Additional Information

————————————————————————————————————————


These are the current modules installed:

————————————————————————————


Currently Loaded Modules:

  1) CCconfig                 5) intel/2020.1.217 (t)   9) StdEnv/2020
    (S)  13) scipy-stack/2020b (math)

  2) gentoo/2020     (S)      6) ucx/1.8.0             10) libffi/3.3

  3) gcccore/.9.3.0  (H)      7) libfabric/1.10.1      11)
python/3.8.2    (t)

  4) imkl/2020.1.217 (math)   8) openmpi/4.0.3    (m)  12)
ipykernel/2020b

Where:

   S:     Module is Sticky, requires --force to unload or purge

   m:     MPI implementations / Implémentations MPI

   math:  Mathematical libraries / Bibliothèques mathématiques

   t:     Tools for development / Outils de développement

   H:                Hidden Module

————————————————————————————


This is what I got after running ‘cmake ..’ from espresso/build

—————————————————————

-- CMake version: 3.16.5

-- Config file: /home/bora/espresso/src/config/myconfig-default.hpp

-- Could NOT find HDF5: Found unsuitable version "", but required is
at least "1.8" (found HDF5_hdf5_LIBRARY-NOTFOUND)

-- Could NOT find GSL (missing: GSL_INCLUDE_DIR GSL_LIBRARY
GSL_CBLAS_LIBRARY) (found version "")

CMake Warning at
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_serialization-1.72.0/libboost_serialization-variant-shared.cmake:64
[1] (message):

  Target Boost::serialization already has an imported location


'/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_serialization-mt.so.1.72.0
[2]',

  which will be overwritten with


'/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_serialization.so.1.72.0
[3]'

Call Stack (most recent call first):


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_serialization-1.72.0/boost_serialization-config.cmake:57
[4] (include)


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120
[5] (find_package)


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185
[6] (boost_find_component)


/cvmfs/soft.computecanada.ca/gentoo/2020/usr/share/cmake/Modules/FindBoost.cmake:443
[7] (find_package)

  CMakeLists.txt:265 (find_package)

CMake Warning at
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_filesystem-1.72.0/libboost_filesystem-variant-shared.cmake:64
[8] (message):

  Target Boost::filesystem already has an imported location


'/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_filesystem-mt.so.1.72.0
[9]',

  which will be overwritten with


'/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_filesystem.so.1.72.0
[10]'

Call Stack (most recent call first):


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_filesystem-1.72.0/boost_filesystem-config.cmake:57
[11] (include)


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120
[5] (find_package)


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185
[6] (boost_find_component)


/cvmfs/soft.computecanada.ca/gentoo/2020/usr/share/cmake/Modules/FindBoost.cmake:443
[7] (find_package)

  CMakeLists.txt:265 (find_package)

CMake Warning at
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_system-1.72.0/libboost_system-variant-shared.cmake:64
[12] (message):

  Target Boost::system already has an imported location


'/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_system-mt.so.1.72.0
[13]',

  which will be overwritten with


'/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_system.so.1.72.0
[14]'

Call Stack (most recent call first):


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_system-1.72.0/boost_system-config.cmake:57
[15] (include)


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120
[5] (find_package)


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185
[6] (boost_find_component)


/cvmfs/soft.computecanada.ca/gentoo/2020/usr/share/cmake/Modules/FindBoost.cmake:443
[7] (find_package)

  CMakeLists.txt:265 (find_package)

CMake Warning at
/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_unit_test_framework-1.72.0/libboost_unit_test_framework-variant-shared.cmake:64
[16] (message):

  Target Boost::unit_test_framework already has an imported location


'/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_unit_test_framework-mt.so.1.72.0
[17]',

  which will be overwritten with


'/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_unit_test_framework.so.1.72.0
[18]'

Call Stack (most recent call first):


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_unit_test_framework-1.72.0/boost_unit_test_framework-config.cmake:57
[19] (include)


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120
[5] (find_package)


/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185
[6] (boost_find_component)


/cvmfs/soft.computecanada.ca/gentoo/2020/usr/share/cmake/Modules/FindBoost.cmake:443
[7] (find_package)

  CMakeLists.txt:265 (find_package)

-- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE
SPHINX_API_DOC_EXE) (Required is at least version "1.6.6")

-- The following OPTIONAL packages have been found:

 * CUDA (required version >= 9.0)

 * FFTW3

 * PkgConfig

 * Doxygen

 * Git

-- The following REQUIRED packages have been found:

 * CUDACompiler

 * PythonInterp (required version >= 3.3)

 * Cython (required version >= 0.23)

 * PythonHeaders

 * NumPy

 * MPI

 * boost_mpi (required version == 1.72.0)

 * boost_serialization (required version == 1.72.0)

 * boost_filesystem (required version == 1.72.0)

 * boost_system (required version == 1.72.0)

 * boost_headers (required version == 1.72.0)

 * boost_unit_test_framework (required version == 1.72.0)

 * Boost (required version >= 1.55.0)

-- The following OPTIONAL packages have not been found:

 * HDF5 (required version >= 1.8)

 * GSL

 * Sphinx (required version >= 1.6.6)

-- Configuring done

-- Generating done

-- Build files have been written to: /home/bora/espresso/build

————————————————————————————————

Best Regards,

Bora Dirilgen

McGill University



Links:
------
[1]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_serialization-1.72.0/libboost_serialization-variant-shared.cmake:64
[2]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_serialization-mt.so.1.72.0
[3]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_serialization.so.1.72.0
[4]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_serialization-1.72.0/boost_serialization-config.cmake:57
[5]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120
[6]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185
[7]
http://soft.computecanada.ca/gentoo/2020/usr/share/cmake/Modules/FindBoost.cmake:443
[8]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_filesystem-1.72.0/libboost_filesystem-variant-shared.cmake:64
[9]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_filesystem-mt.so.1.72.0
[10]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_filesystem.so.1.72.0
[11]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_filesystem-1.72.0/boost_filesystem-config.cmake:57
[12]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_system-1.72.0/libboost_system-variant-shared.cmake:64
[13]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_system-mt.so.1.72.0
[14]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_system.so.1.72.0
[15]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_system-1.72.0/boost_system-config.cmake:57
[16]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_unit_test_framework-1.72.0/libboost_unit_test_framework-variant-shared.cmake:64
[17]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_unit_test_framework-mt.so.1.72.0
[18]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/libboost_unit_test_framework.so.1.72.0
[19]
http://soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/intel2020/boost/1.72.0/lib/cmake/boost_unit_test_framework-1.72.0/boost_unit_test_framework-config.cmake:57



reply via email to

[Prev in Thread] Current Thread [Next in Thread]