cp2K installation error on Kubuntu 20.04

39 views
Skip to first unread message

Albert C. N. Assonkeng

unread,
May 25, 2020, 12:31:56 PM5/25/20
to cp2k
Hi everyone,
I encounter the following error during the installation of cp2K in ubuntu 20.04.
/usr/bin/ld: /home/albert/cp2k/cp2k/tools/toolchain/install/libsmm/lib/libsmm_dnn.a(smm_dnn.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
make[4]: *** [/home/albert/cp2k/cp2k/obj/local/sopt/all.dep:123: /home/albert/cp2k/cp2k/exe/local/libcp2k_unittest.sopt] Error 1
make[3]: *** [Makefile:141: all] Error 2
If I recompile as suggested with option -fPIE, I obtain the followin error:
ERROR: (install_cp2k_toolchain.sh) Unknown flag: -fPIE
I am looking forward to a any suggestion than can help me solve this issue.

Regards
Albert

Fabian Ducry

unread,
May 26, 2020, 3:23:25 AM5/26/20
to cp2k
Dear Albert,

Did you follow https://www.cp2k.org/howto:compile, especially 3a and 3b?

To help you find the error you need to provide more information: https://www.cp2k.org/howto:gethelp

Fabian

Matt W

unread,
May 26, 2020, 5:46:23 AM5/26/20
to cp2k
Has anyone successfully compiled on 20.04? I had problems with the gcc compilers as seen above (though I am not sure that was the root cause).

Ole Schütt

unread,
May 26, 2020, 5:58:40 AM5/26/20
to cp...@googlegroups.com, Matt W
I'm working on building CP2K on Ubuntu 20.04 and also ran into the
problem with GCC 9.2. Apparently, there was an ABI change (can't find
the link right now). Upgrading to GCC 9.3 solved it for me.

-Ole


On 2020-05-26 11:46, Matt W wrote:
> Has anyone successfully compiled on 20.04? I had problems with the gcc
> compilers as seen above (though I am not sure that was the root
> cause).
>
> On Tuesday, May 26, 2020 at 8:23:25 AM UTC+1, Fabian Ducry wrote:
>
>> Dear Albert,
>>
>> Did you follow https://www.cp2k.org/howto:compile [1], especially 3a
>> and 3b?
>>
>> To help you find the error you need to provide more information:
>> https://www.cp2k.org/howto:gethelp [2]
>>
>> Fabian
>
> --
> 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/936f043b-3306-442d-acc9-3bb5ed26ae64%40googlegroups.com
> [3].
>
>
> Links:
> ------
> [1] https://www.cp2k.org/howto:compile
> [2] https://www.cp2k.org/howto:gethelp
> [3]
> https://groups.google.com/d/msgid/cp2k/936f043b-3306-442d-acc9-3bb5ed26ae64%40googlegroups.com?utm_medium=email&utm_source=footer
Reply all
Reply to author
Forward
0 new messages