Issues with SimVascular compilation from source on Linux
Posted: Wed Mar 06, 2019 4:25 pm
Dear SimVascular community,
I have some trouble compiling SimVascular from source and would like to ask for help. I checked out the source code and created a separate build directory. My folders are organized as follows:
work/SimVascularSrc.git
work/SimVascularSrc_build
I followed the the instructions at http://simvascular.github.io/docsCompile.html ('Building it all'), and did the following:
cd work/SimvascularSrc_build
ccmake ../SimvascularSrc.git
I configured the build, generated makefiles and then typed 'make'. The build process, however, stops almost immediately with the following error:
CMake Error at /home/emilie/work/SimVascularSrc.git/Code/CMake/SimVascularMacros.cmake:1366 (message):
The operating system does not have any available pre-built binaries. See
the build documentation to build your own.
Call Stack (most recent call first):
CMake/SvExtOptions.cmake:79 (sv_externals_add_new_external)
CMakeLists.txt:95 (include)
I don't know how to tell CMake that it should NOT look for prebuilt binaries but compile everything from source (which I thought was the default behaviour anyway).
My second attempt was with one of the build scripts shipped with SimVascular.
I took cmake-build-linux-download-externals.sh and slightly modified it in order to fit my setup. The script is placed in 'work' and its first part
looks as follows:
export SIMVASC_SRC_DIR="$PWD/SimVascularSrc.git"
rm -Rf $SIMVASC_SRC_DIR/Code/DownloadExternalsBuild
mkdir -p $SIMVASC_SRC_DIR/Code/DownloadExternalsBuild
pushd $SIMVASC_SRC_DIR/Code/DownloadExternalsBuild
#compilers
export CC="gcc"
export CXX="g++"
#cmake
export REPLACEME_SV_CMAKE_CMD="cmake"
export REPLACEME_SV_CMAKE_GENERATOR="Unix Makefiles"
export REPLACEME_SV_CMAKE_BUILD_TYPE="RelWithDebInfo"
export REPLACEME_SV_MAKE_CMD="make -j8"
export REPLACEME_SV_TOP_SRC_DIR_SV="$SIMVASC_SRC_DIR"
#Qt5
export Qt5_DIR="/opt/gcc/Qt5.4.2/5.4/gcc_64/lib/cmake/Qt5"
export EXTERNALS_DIR="/opt/gcc/simvasc/ext"
The rest was left without change. When I run the script, it stops almost immediately and stdout-cmake-config.txt contains some generic information followed by
-- Configuring done
-- Generating /home/emilie/work/SimVascularSrc.git/Code/DownloadExternalsBuild
Called from: [1] /home/emilie/work/SimVascularSrc.git/CMakeLists.txt
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
BUILD_TESTING
SV_DOWNLOAD_EXTERNALS
SV_EXTERNALS_TOPLEVEL_DIR
SV_EXTERNALS_USE_TOPLEVEL_DIR
SV_USE_FREETYPE
SV_USE_FREETYPE_SHARED
SV_USE_GDCM
SV_USE_GDCM_SHARED
SV_USE_ITK
SV_USE_ITK_SHARED
SV_USE_MITK
SV_USE_MITK_SHARED
SV_USE_MMG
SV_USE_MPICH2
SV_USE_OpenCASCADE
SV_USE_OpenCASCADE_SHARED
SV_USE_PYTHON
SV_USE_QT_GUI
SV_USE_SYSTEM_FREETYPE
SV_USE_SYSTEM_GDCM
SV_USE_SYSTEM_ITK
SV_USE_SYSTEM_MITK
SV_USE_SYSTEM_MMG
SV_USE_SYSTEM_OpenCASCADE
SV_USE_SYSTEM_PYTHON
SV_USE_SYSTEM_TCL
SV_USE_SYSTEM_VTK
SV_USE_TCL_SHARED
SV_USE_VTK_SHARED
-- Build files have been written to: /home/emilie/work/SimVascularSrc.git/Code/DownloadExternalsBuild
I don't understand why all variables are reported as unused. Am I doing something wrong? In addition to this, stdout-compile.txt shows that the compilation terminated almost immediately with an error:
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- 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/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- SimVascular Version: simvascular 2019-03-06
SV_BUILD_TYPE_DIR: relwithdebinfo
CMake Error at /home/emilie/work/SimVascularSrc.git/Code/CMake/SimVascularMacros.cmake:1366 (message):
The operating system does not have any available pre-built binaries. See
the build documentation to build your own.
Call Stack (most recent call first):
CMake/SvExtOptions.cmake:79 (sv_externals_add_new_external)
CMakeLists.txt:95 (include)
-- Configuring incomplete, errors occurred!
See also "/home/emilie/work/SimVascularSrc.git/Code/DownloadExternalsBuild/Externals-build/CMakeFiles/CMakeOutput.log".
make[2]: *** [CMakeFiles/Externals.dir/build.make:106: Externals-prefix/src/Externals-stamp/Externals-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/Externals.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
AS a last attempt, I modified the build script again and set
-DSV_DOWNLOAD_EXTERNALS=OFF
hoping that this would force CMake to compile all externals. Not surprisingly, this didn't work (as I said above, all SV_* variables were for some reason ignored ...)
Could you please help me and tell me what am I doing wrong? I would like to compile SimVascular from sources, preferably with all externals compiled as well. I don't seem to be able to actually force SimVascular to attempt the compilation.
Thank you very much in advance for your help.
Kind regards,
Emilie
I have some trouble compiling SimVascular from source and would like to ask for help. I checked out the source code and created a separate build directory. My folders are organized as follows:
work/SimVascularSrc.git
work/SimVascularSrc_build
I followed the the instructions at http://simvascular.github.io/docsCompile.html ('Building it all'), and did the following:
cd work/SimvascularSrc_build
ccmake ../SimvascularSrc.git
I configured the build, generated makefiles and then typed 'make'. The build process, however, stops almost immediately with the following error:
CMake Error at /home/emilie/work/SimVascularSrc.git/Code/CMake/SimVascularMacros.cmake:1366 (message):
The operating system does not have any available pre-built binaries. See
the build documentation to build your own.
Call Stack (most recent call first):
CMake/SvExtOptions.cmake:79 (sv_externals_add_new_external)
CMakeLists.txt:95 (include)
I don't know how to tell CMake that it should NOT look for prebuilt binaries but compile everything from source (which I thought was the default behaviour anyway).
My second attempt was with one of the build scripts shipped with SimVascular.
I took cmake-build-linux-download-externals.sh and slightly modified it in order to fit my setup. The script is placed in 'work' and its first part
looks as follows:
export SIMVASC_SRC_DIR="$PWD/SimVascularSrc.git"
rm -Rf $SIMVASC_SRC_DIR/Code/DownloadExternalsBuild
mkdir -p $SIMVASC_SRC_DIR/Code/DownloadExternalsBuild
pushd $SIMVASC_SRC_DIR/Code/DownloadExternalsBuild
#compilers
export CC="gcc"
export CXX="g++"
#cmake
export REPLACEME_SV_CMAKE_CMD="cmake"
export REPLACEME_SV_CMAKE_GENERATOR="Unix Makefiles"
export REPLACEME_SV_CMAKE_BUILD_TYPE="RelWithDebInfo"
export REPLACEME_SV_MAKE_CMD="make -j8"
export REPLACEME_SV_TOP_SRC_DIR_SV="$SIMVASC_SRC_DIR"
#Qt5
export Qt5_DIR="/opt/gcc/Qt5.4.2/5.4/gcc_64/lib/cmake/Qt5"
export EXTERNALS_DIR="/opt/gcc/simvasc/ext"
The rest was left without change. When I run the script, it stops almost immediately and stdout-cmake-config.txt contains some generic information followed by
-- Configuring done
-- Generating /home/emilie/work/SimVascularSrc.git/Code/DownloadExternalsBuild
Called from: [1] /home/emilie/work/SimVascularSrc.git/CMakeLists.txt
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
BUILD_SHARED_LIBS
BUILD_TESTING
SV_DOWNLOAD_EXTERNALS
SV_EXTERNALS_TOPLEVEL_DIR
SV_EXTERNALS_USE_TOPLEVEL_DIR
SV_USE_FREETYPE
SV_USE_FREETYPE_SHARED
SV_USE_GDCM
SV_USE_GDCM_SHARED
SV_USE_ITK
SV_USE_ITK_SHARED
SV_USE_MITK
SV_USE_MITK_SHARED
SV_USE_MMG
SV_USE_MPICH2
SV_USE_OpenCASCADE
SV_USE_OpenCASCADE_SHARED
SV_USE_PYTHON
SV_USE_QT_GUI
SV_USE_SYSTEM_FREETYPE
SV_USE_SYSTEM_GDCM
SV_USE_SYSTEM_ITK
SV_USE_SYSTEM_MITK
SV_USE_SYSTEM_MMG
SV_USE_SYSTEM_OpenCASCADE
SV_USE_SYSTEM_PYTHON
SV_USE_SYSTEM_TCL
SV_USE_SYSTEM_VTK
SV_USE_TCL_SHARED
SV_USE_VTK_SHARED
-- Build files have been written to: /home/emilie/work/SimVascularSrc.git/Code/DownloadExternalsBuild
I don't understand why all variables are reported as unused. Am I doing something wrong? In addition to this, stdout-compile.txt shows that the compilation terminated almost immediately with an error:
-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is GNU 8.2.1
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- 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/g++
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- SimVascular Version: simvascular 2019-03-06
SV_BUILD_TYPE_DIR: relwithdebinfo
CMake Error at /home/emilie/work/SimVascularSrc.git/Code/CMake/SimVascularMacros.cmake:1366 (message):
The operating system does not have any available pre-built binaries. See
the build documentation to build your own.
Call Stack (most recent call first):
CMake/SvExtOptions.cmake:79 (sv_externals_add_new_external)
CMakeLists.txt:95 (include)
-- Configuring incomplete, errors occurred!
See also "/home/emilie/work/SimVascularSrc.git/Code/DownloadExternalsBuild/Externals-build/CMakeFiles/CMakeOutput.log".
make[2]: *** [CMakeFiles/Externals.dir/build.make:106: Externals-prefix/src/Externals-stamp/Externals-configure] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/Externals.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
AS a last attempt, I modified the build script again and set
-DSV_DOWNLOAD_EXTERNALS=OFF
hoping that this would force CMake to compile all externals. Not surprisingly, this didn't work (as I said above, all SV_* variables were for some reason ignored ...)
Could you please help me and tell me what am I doing wrong? I would like to compile SimVascular from sources, preferably with all externals compiled as well. I don't seem to be able to actually force SimVascular to attempt the compilation.
Thank you very much in advance for your help.
Kind regards,
Emilie