Installing cp2k fails at make -j $(get_nprocs) > make.log 2>&1

143 views
Skip to first unread message

Paul Arias

unread,
Oct 26, 2021, 3:23:14 PM10/26/21
to cp2k
I'm attempting to build cp2k with the following command

./install_cp2k_toolchain.sh --enable-libxsmm-master --with-intelmpi=system --with-libxc=install --with-fftw --with-mkl=system --with-scalapack --with-libsmm=install --with-libint=install --with-elpa=no --with-sirius=no --with-cmake=install


However, I receive this error:

==================== Installing LIBINT ====================

libint-v2.6.0-cp2k-lmax-5.tgz is found

Installing from scratch into /usr/src/cp2k/tools/toolchain/install/libint-v2.6.0-cp2k-lmax-5

ERROR: (./scripts/stage3/install_libint.sh, line 89) Non-zero exit code detected.


this points to this line: 

make -j $(get_nprocs) > make.log 2>&1

Would love some resources on how to get past this stage. 


Thanks in advance,

Paul

Alin Marin Elena

unread,
Oct 27, 2021, 2:51:55 AM10/27/21
to cp...@googlegroups.com
you may want to share make.log from that line.
without is difficult to see what is the issue.
and I assume you did not run out of memory for compilation.

Regards,
Alin

Without Questions there are no Answers!
______________________________________________________________________
Dr. Alin Marin ELENA
http://alin.elena.space/
______________________________________________________________________
> --
> You received this message because you are subscribed to the Google Groups "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/3e38e8f4-c86b-4168-8041-966ed1ef500fn%40googlegroups.com.

Paul Arias

unread,
Oct 27, 2021, 12:13:17 PM10/27/21
to cp2k
Hi Alin,

Thank you for the suggestion. Seems like I have quite a few errors on c++ compilation, so I should include the output of `g++ --version`:

g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)

Copyright (C) 2015 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

mpic++ already points to the same version of g++ as well. 


Looking forward to hearing suggestions. 


Best,

Paul



make.log

Alin Marin Elena

unread,
Oct 27, 2021, 12:39:02 PM10/27/21
to cp...@googlegroups.com
Hi Paul,

your c++ compiler is very old, I suspect you did not set your
environment correctly.

Regards,
Alin

Without Questions there are no Answers!
______________________________________________________________________
Dr. Alin Marin ELENA
http://alin.elena.space/
______________________________________________________________________

> To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/1d346e09-202d-48ad-b95f-763528e4eb0dn%40googlegroups.com.

Fatih Ertinaz

unread,
Oct 27, 2021, 12:43:50 PM10/27/21
to cp...@googlegroups.com
Like Alin said, this error looks like you're using a compiler that does not support the C++ standard used in the source code:
ISO C++ forbids declaration of 'parameter' with no type

I don't know if there is a suggested gcc version in the compilation instructions, however I was able to build cp2k along with a lot of its dependencies from their source using gcc-7 and openmpi-4. I'd highly recommend using it.

// Fatih

Fabian Ducry

unread,
Oct 28, 2021, 5:11:16 AM10/28/21
to cp...@googlegroups.com

Hi,

Here you can check which compilers are supported: https://www.cp2k.org/dev:compiler_support

Support for gcc 4.x has been dropped quite a while back.

Cheers,

Fabian

Reply all
Reply to author
Forward
0 new messages