Error in compiling CP2K trunk version with PLUMED-2.1.1

Hang Xiao xiaoh... at gmail.com
Fri Mar 6 02:37:03 UTC 2015


Dear all,

I am able to compile CP2K trunk version without PLUMED, but I run into 
problem when I compile CP2K trunk version with PLUMED-2.1.1. 

The ARCH file I used is:

# CP2K 2.6 Tested with: GFortran 4.9.1, OPENMPI 1.6.5
include /usr/local/lib/plumed/src/lib/Plumed.inc
EXTERNAL_OBJECTS=$(PLUMED_STATIC_DEPENDENCIES)
CC         = cc
CPP        =
FC         = mpif90
LD         = mpif90
AR         = ar -r
DFLAGS   =  -D__FFTSG -D__parallel  -D__SCALAPACK -D__FFTW3 -D__PLUMED2
CPPFLAGS =
FCFLAGS  = $(DFLAGS)  -ffree-form -O2 -ffast-math -march=opteron -cpp -g
LDFLAGS  = $(FCFLAGS)  -lz -ldl -lstdc++
LIBS     = -L/usr/lib -lscalapack-openmpi -lblacsF77init-openmpi 
-lblacs-openmpi -llapack -lblas   -lfftw3

OBJECTS_ARCHITECTURE = machine_gfortran.o

The errors are: 

/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[3]: *** [/home/xxx007/cp2k/cp2k/exe/Linux-x86-64-gfortran/graph.popt] 
Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all] Error 2
make[1]: *** [popt] Error 2
make: *** [all] Error 2

I realize that I need to install libz. After some search, I find that
 sudo apt-get install   zlib1g-dev
 will do the trick. And I have found libz.a in /usr/lib/x86_64-linux-gnu. I 
thought it would work, but it does not.

The errors are:
collect2: ld returned 1 exit status
make[3]: *** [/home/xxx007/cp2k/cp2k/exe/Linux-x86-64-gfortran/graph.popt] 
Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [all] Error 2
make[1]: *** [popt] Error 2
make: *** [all] Error 2

Although lz is found, the error still persists. 

Have you guys seen this error before?

Thank you! 


Regards,

Hang Xiao

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20150305/0b37425c/attachment.htm>


More information about the CP2K-user mailing list