[Wien] libxc lib lib64 workaround

Gavin Abo gsabo at crimson.ua.edu
Sat Jul 14 05:33:00 CEST 2018


In case others encounter the same problem with installing WIEN2k 18.1.

Downloaded libxc-4.2.3.tar.gz from 
http://www.tddft.org/programs/libxc/download/

Put it in my home directory, then in a terminal did:

username at computername:~/Desktop$ cd ~
username at computername:~$ ls libxc-4.2.3.tar.gz
libxc-4.2.3.tar.gz
username at computername:~$ tar -xvf libxc-4.2.3.tar.gz
...
username at computername:~$ mv libxc-4.2.3 libxc
username at computername:~$ cd libxc/
username at computername:~/libxc$ autoreconf -i --force
...
username at computername:~/libxc$ ./configure FC=ifort CC=cc 
--prefix=$HOME/libxc
...
username at computername:~/libxc$ make
...
username at computername:~/libxc$ make check
...
username at computername:~/libxc$ make install

I'm using:

username at computername:~/libxc$ lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04 LTS
Release:    18.04
Codename:    bionic
username at computername:~/libxc$ arch
x86_64
username at computername:~$ cd $WIENROOT
username at computername:~/WIEN2k$ cat WIEN2k_VERSION
WIEN2k_18.1 (Release 30/6/2018)

When compiling lapw0, I get libxc errors:

username at computername:~/WIEN2k$ ./siteconfig
...
   Selection: R
...
   Selection: S
...
    Which program to recompile? lapw0
...
-L/home/username/libxc/lib64 -lxcf03 -lxc
ld: cannot find -lxcf03
ld: cannot find -lxc
...
Compile time errors (if any) were:
SRC_lapw0/compile.msg:make[1]: *** [lapw0] Error 1
SRC_lapw0/compile.msg:make: *** [seq] Error 2
...
   Selection: Q
...

I found that the libxc library folder in WIEN2k 18.1 is hard coded in 
siteconfig_lapw and Makefile to "lib64" while it was "lib" in WIEN2k 17.1:

username at computername:~/WIEN2k$ grep lib64 $WIENROOT/SRC_lapw0/Makefile
   LIBXC_LIBS = -L$(LIBXCROOT)lib64 -l$(LIBXC_FORTRAN) -l$(LIBXC_LIBNAME)

As a workaround, I copied (or renamed) the lib folder created from the 
libxc installation to lib64:

username at computername:~/WIEN2k$ cp -r ~/libxc/lib ~/libxc/lib64
username at computername:~/WIEN2k$ ls ~/libxc/lib64
libxc.a  libxcf03.a  libxcf03.la  libxcf90.a  libxcf90.la libxc.la  
pkgconfig

Then, when I recompiled lapw0, the errors were gone:

username at computername:~/WIEN2k$ ./siteconfig
...
    Which program to recompile? lapw0
...
Compile time errors (if any) were:


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20180713/1afd591c/attachment.html>


More information about the Wien mailing list