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

Building OPENCMISS Iron after setting up arch path raises problem with gdcm #187

Open
vraj004 opened this issue Nov 24, 2019 · 26 comments
Open

Comments

@vraj004
Copy link
Contributor

vraj004 commented Nov 24, 2019

I tried to compile opencmiss iron (ubuntu 18.04, gcc-9, gfortran 9) by first setting up arch path:

  1. cd setup-build

  2. cmake -DOPENCMISS_ROOT=../opencmiss -DOPENCMISS_LIBRARIES=iron
    .-DOPENCMISS_PERFORM_INITIAL_BUILD=False ./setup

  3. make VERBOSE=1

  4. cd ../../build/manage/release

cmake .

  1. make create_config

  2. make build_config

The compiler fails at OC_GDCM:

Scanning dependencies of target OC_GDCM-ABI
[ 15%] Creating directories for 'OC_GDCM-ABI'
[ 17%] No download step for 'OC_GDCM-ABI'
[ 17%] No patch step for 'OC_GDCM-ABI'
[ 17%] No update step for 'OC_GDCM-ABI'
[ 17%] Performing configure step for 'OC_GDCM-ABI'
-- OC_GDCM-ABI configure command succeeded. See also /home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/build/x86_64_linux/gnu-C9.0-gnu-F9.0/no_mpi/dependencies/gdcm-abi/release/extproj/stamp/OC_GDCM-ABI-configure-*.log
[ 17%] Performing build step for 'OC_GDCM-ABI'
CMake Error at extproj/stamp/OC_GDCM-ABI-build-Release.cmake:49 (message):
Command failed: 2

'/usr/local/bin/cmake' '--build' '/home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/build/x86_64_linux/gnu-C9.0-gnu-F9.0/no_mpi/dependencies/gdcm-abi/release' '--' '-j8'

See also

/home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/build/x86_64_linux/gnu-C9.0-gnu-F9.0/no_mpi/dependencies/gdcm-abi/release/extproj/stamp/OC_GDCM-ABI-build-*.log

CMakeFiles/OC_GDCM-ABI.dir/build.make:114: recipe for target '/home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/build/x86_64_linux/gnu-C9.0-gnu-F9.0/no_mpi/dependencies/gdcm-abi/release/extproj/stamp/OC_GDCM-ABI-build' failed
make[6]: *** [/home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/build/x86_64_linux/gnu-C9.0-gnu-F9.0/no_mpi/dependencies/gdcm-abi/release/extproj/stamp/OC_GDCM-ABI-build] Error 1
CMakeFiles/Makefile2:3104: recipe for target 'CMakeFiles/OC_GDCM-ABI.dir/all' failed

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 24, 2019

Further examination of the compiler error inside the gdcm-abi folder:
[ 7%] Built target gdcmCommon
[ 7%] Building CXX object Wrapping/C/CMakeFiles/gdcmCWRAPPER.dir/gdcmCReader.cxx.o
In file included from /home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/dependencies/gdcm-abi/Source/DataStructureAndEncodingDefinition/gdcmDataSet.h:21,
from /home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/dependencies/gdcm-abi/Source/DataStructureAndEncodingDefinition/gdcmFile.h:19,
from /home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/dependencies/gdcm-abi/Source/DataStructureAndEncodingDefinition/gdcmReader.h:19,
from /home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/dependencies/gdcm-abi/Wrapping/C/gdcmCReader.cxx:12:
/home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/dependencies/gdcm-abi/Source/DataStructureAndEncodingDefinition/gdcmElement.h:606:26: error: declaration of ‘class gdcm::Element<4096, TVM>’ ambiguates earlier template instantiation for ‘class gdcm::Element<4096, 218367>’ [-fpermissive]
606 | template class Element<VR::OB, TVM>;
| ^~~~~~~~~~~~~~~~~~~~
/home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/dependencies/gdcm-abi/Source/DataStructureAndEncodingDefinition/gdcmElement.h:612:26: error: declaration of ‘class gdcm::Element<16384, TVM>’ ambiguates earlier template instantiation for ‘class gdcm::Element<16384, 218367>’ [-fpermissive]
612 | template class Element<VR::OW, TVM>;
| ^~~~~~~~~~~~~~~~~~~~
/home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/dependencies/gdcm-abi/Source/DataStructureAndEncodingDefinition/gdcmElement.h:612:26: error: declaration of ‘class gdcm::Element<16384, TVM>’ ambiguates earlier template instantiation for ‘class gdcm::Element<4096, 218367>’ [-fpermissive]
Wrapping/C/CMakeFiles/gdcmCWRAPPER.dir/build.make:62: recipe for target 'Wrapping/C/CMakeFiles/gdcmCWRAPPER.dir/gdcmCReader.cxx.o' failed
make[2]: *** [Wrapping/C/CMakeFiles/gdcmCWRAPPER.dir/gdcmCReader.cxx.o] Error 1
CMakeFiles/Makefile2:113: recipe for target 'Wrapping/C/CMakeFiles/gdcmCWRAPPER.dir/all' failed
make[1]: *** [Wrapping/C/CMakeFiles/gdcmCWRAPPER.dir/all] Error 2
M

@chrispbradley
Copy link
Member

Hi Vijay,
yes, whilst gcc-9 fixes the internal compiler fault it brings in additional problems in that some of the external libraries do not build with it because they are too old. GDCM above is not required by iron so you can turn it off. Indeed, go to your configs directory and edit OpenCMISSLocalConfig.cmake and set

set(OC_USE_CLANG OFF)
set(OC_USE_CSIM OFF)
set(OC_USE_LLVM OFF)
set(OC_USE_ZINC OFF)
set(CELLML_WITH_CSIM NO)

It should then build with gcc-9

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 24, 2019

Why does this error not pop up when setting up opencmiss iron with the default settings - without setting the arch paths?

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 24, 2019

After setting the corresponding flags off as suggested (in OpenCMISSLocalConfig.cmake) I now get compilation error with OC_SCOTCH:

lex.yy.c: In function ‘scotchyy_init_buffer’:
lex.yy.c:1566:48: warning: implicit declaration of function ‘fileno’ [-Wimplicit-function-declaration]
In file included from /home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/dependencies/scotch/src/libscotch/bdgraph.c:57:
/home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/dependencies/scotch/src/libscotch/common.h:194:21: fatal error: mpi.h: No such file or directory
194 | #include <mpi.h>
| ^~~~~~~
compilation terminated.
make[9]: *** [src/libscotch/libptscotch/CMakeFiles/ptscotch.dir/__/bdgraph.c.o] Error 1
make[8]: *** [src/libscotch/libptscotch/CMakeFiles/ptscotch.dir/all] Error 2
make[8]: *** Waiting for unfinished jobs....
make[7]: *** [all] Error 2

@sgenie68
Copy link

sgenie68 commented Nov 24, 2019 via email

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 24, 2019 via email

@chrispbradley
Copy link
Member

Why does this error not pop up when setting up opencmiss iron with the default settings - without setting the arch paths?

Hi Vijay, I'll speculate that when you do the setup you specify iron only libraries and therefore it doesn't build zinc and therefore the zinc dependencies.

@chrispbradley
Copy link
Member

Hi Vijay,
It can't find mpich for some reason. What do you get when you do a which mpiexec? mpif90 --version? mpicc --version? Also have you installed libmpich-dev?

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 24, 2019 via email

@chrispbradley
Copy link
Member

Hi Vijay,
is that output for

which mpiexec

or for when you run mpiexec? Something is not right. Can you send the output for env | grep PATH?

@sgenie68
Copy link

sgenie68 commented Nov 24, 2019 via email

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 24, 2019 via email

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 24, 2019 via email

@sgenie68
Copy link

sgenie68 commented Nov 24, 2019 via email

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 24, 2019 via email

@sgenie68
Copy link

sgenie68 commented Nov 24, 2019 via email

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 24, 2019 via email

@sgenie68
Copy link

sgenie68 commented Nov 24, 2019 via email

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 25, 2019 via email

@sgenie68
Copy link

sgenie68 commented Nov 25, 2019 via email

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 25, 2019 via email

@sgenie68
Copy link

sgenie68 commented Nov 25, 2019 via email

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 25, 2019 via email

@sgenie68
Copy link

sgenie68 commented Nov 25, 2019 via email

@vraj004
Copy link
Contributor Author

vraj004 commented Nov 25, 2019 via email

@sgenie68
Copy link

sgenie68 commented Nov 26, 2019 via email

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

No branches or pull requests

3 participants