GULP installation error

I have a Manjaro Linux system. I am trying to install GULP 5.2. but I am facing some errors. Initially I had faced an error during installation which is due to the gcc version error as given here. I downgraded my gcc, gcc-libs and gfortran to 8.3.0 and ran the mkgulp command and it ran for quite for some time. However the code exits with the following error:

/usr/bin/ld: m_simplex.o: in function `__m_simplex_MOD_simplx':
/home/kjd/Downloads/gulp-5.2/Src/Linux_Debug/../m_simplex.F90:865: undefined reference to `_gfortran_os_error_at'
/usr/bin/ld: m_simplex.o: in function `__m_simplex_MOD_subplx':
/home/kjd/Downloads/gulp-5.2/Src/Linux_Debug/../m_simplex.F90:191: undefined reference to `_gfortran_os_error_at'
/usr/bin/ld: /home/kjd/Downloads/gulp-5.2/Src/Linux_Debug/../m_simplex.F90:192: undefined reference to `_gfortran_os_error_at'
/usr/bin/ld: /home/kjd/Downloads/gulp-5.2/Src/Linux_Debug/../m_simplex.F90:193: undefined reference to `_gfortran_os_error_at'
/usr/bin/ld: m_pdf.o: in function `__m_pdf_MOD_pdfsetup':
/home/kjd/Downloads/gulp-5.2/Src/Linux_Debug/../m_pdf.F90:628: undefined reference to `_gfortran_os_error_at'
/usr/bin/ld: bcgsolve.o:/home/kjd/Downloads/gulp-5.2/Src/Linux_Debug/../bcgsolve.F90:167: more undefined references to `_gfortran_os_error_at' follow
collect2: error: ld returned 1 exit status
make: *** [makefile:210: gulp] Error 1
mv: cannot stat 'gulp': No such file or directory

What does this error indicate? How can I fix this?

This is a new one to me. From what I can find out about _gfortran_os_error_at on line it seems that this is associated with gfortran v10. My only guess is that the directory where the code was being compiled wasn’t cleaned before changing compiler versions & so there is some v8 vs v10 confusion. The directory can be cleaned by:
./mkgulp -t clean
NB: Remember to specify any other options that were present since GULP makes multiple subdirectories depending on which options were specified.

1 Like

Thank you for the quick response. I forgot to add that during the last execution I ran the debug flag -d with mkgulp. Sorry that I forgot to mention this.

In that case you’ll need:
./mkgulp -d -t clean

1 Like

Thanks for the reply. The code now runs without any error. However when I run gulp, the command is not recognized even after seting the environment variables location in /etc/environment.

Glad the code is now compiling. If the exe is not found that just means it’s not in your path. Sorting that out depends on your shell & so is one for another forum on Linux.

Thank you so much for your responses. One quick question: would it break the GULP installation if the gcc and gfortran are upgraded back to the latest versions? Because downgrading gcc for installing GULP led to many broken packages which depended on gcc-10.

I’ve just checked and if you add the following in mkgulp as an option to gfortran v10 then GULP-5.2 will compile with this version:

-fallow-argument-mismatch

The safe way is to change RUNF90 and RUNCC from being "gfortran " to “gfortran -fallow-argument-mismatch”

1 Like

This worked. Thank you!