OpenCMISS / iron

Source code repository for OpenCMISS-Iron
9 stars 62 forks source link

segmentation fault when trying to install OpenCMISS iron on ubuntu 18.04 #186

Closed vraj004 closed 4 years ago

vraj004 commented 4 years ago

Trying to install opencmiss iron on ubuntu 18.04, gnu toolchain, gcc-7, gfortran-7, g++-7, mpich (compiled against gcc-7). Note, this issue occurs with gcc-8 toolchain as well.

After executing inside setup-build/: cmake -DOPENCMISS_LIBRARIES=iron -DOPENCMISS_ROOT=../opencmiss ../setup make VERBOSE=1

I get the following error at OC_IRON: [ 0%] Building Fortran object CMakeFiles/iron.dir/src/fieldml_output_routines.F90.o /home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/iron/src/fieldml_output_routines.F90:182:0:

   FIELDML_OUTPUT_IMPORT_FML = Fieldml_AddImport( FML_HANDLE, IMPORT_INDEX, cchar(REMOTE_NAME), cchar(REMOTE_NAME) )

internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-7/README.Bugs for instructions. CMakeFiles/iron.dir/build.make:1739: recipe for target 'CMakeFiles/iron.dir/src/fieldml_output_routines.F90.o' failed make[2]: [CMakeFiles/iron.dir/src/fieldml_output_routines.F90.o] Error 1 CMakeFiles/Makefile2:77: recipe for target 'CMakeFiles/iron.dir/all' failed make[1]: [CMakeFiles/iron.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2

chrispbradley commented 4 years ago

Hi Vijay, yes, there appears to be a bug with the compilers on 18.04. You can install the gcc-9 compilers to fix this. Try something like

sudo apt-get install gcc-9 g++-9 gfortran-9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++- sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortan-9 90

then test it with

gcc --version gfortran --version

sgenie68 commented 4 years ago

Hi, Vijay

Yes, the compiler has a bug that crashes it during Fieldml processing. You need to update your GCC to v 9

Cheers, Gene

-- Scientific Software Specialist Auckland Bioengineering Institute The University of Auckland e: g.soudlenkov@auckland.ac.nz p: +64 9 3737599 ext 89834 c: +64 21 840 825 w: https://www.auckland.ac.nz/en/abi.html

On 24/11/19 13:50, Vijay Rajagopal wrote:

Trying to install opencmiss iron on ubuntu 18.04, gnu toolchain, gcc-7, gfortran-7, g++-7, mpich (compiled against gcc-7). Note, this issue occurs with gcc-8 toolchain as well.

After executing inside setup-build/: cmake -DOPENCMISS_LIBRARIES=iron -DOPENCMISS_ROOT=../opencmiss ../setup make VERBOSE=1

I get the following error at OC_IRON: [ 0%] Building Fortran object CMakeFiles/iron.dir/src/fieldml_output_routines.F90.o /home/unimelb.edu.au/vrajagopal/applications/opencmiss_install/opencmiss/src/iron/src/fieldml_output_routines.F90:182:0:

|FIELDML_OUTPUT_IMPORT_FML = Fieldml_AddImport( FML_HANDLE, IMPORT_INDEX, cchar(REMOTE_NAME), cchar(REMOTE_NAME) ) |

internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See file:///usr/share/doc/gcc-7/README.Bugs for instructions. CMakeFiles/iron.dir/build.make:1739: recipe for target 'CMakeFiles/iron.dir/src/fieldml_output_routines.F90.o' failed make[2]: [CMakeFiles/iron.dir/src/fieldml_output_routines.F90.o] Error 1 CMakeFiles/Makefile2:77: recipe for target 'CMakeFiles/iron.dir/all' failed make[1]: [CMakeFiles/iron.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenCMISS/iron/issues/186?email_source=notifications&email_token=AAGJIDUPOMYZ2KPR4B2V4ITQVHFVFA5CNFSM4JQ4UZU2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H3TAHRA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGJIDSXIR2RK5LYGC6ZBELQVHFVFANCNFSM4JQ4UZUQ.

vraj004 commented 4 years ago

This suggestion resolved the issue, thanks.