[CP2K:6198] Error in compiling CP2K trunk version with PLUMED-2.1.1

Iain Bethune ibet... at epcc.ed.ac.uk
Fri Mar 6 08:44:32 UTC 2015


Hi,

Once you had installed the zlib package it’s not clear from your second build what the actual error reported by ld is - if you look a few lines further back you should see an actual error message.  Most likely the problem is either of:

1) The library is installed OK but the /usr/lib/x86_64-linux-gnu is not in the library search path (fix by adding -L/usr/lib/x86_64-linux-gnu to the LDFLAGS).  ld should give the same error "/usr/bin/ld: cannot find -lz"

2) The library is not correctly installed e.g. you have a 32 bit library for a 64 bit build, in this case ld will give some other error, which should help you figure out what the problem is…

- Iain

--

Iain Bethune
Project Manager, EPCC

Email: ibet... at epcc.ed.ac.uk
Twitter: @IainBethune
Web: http://www2.epcc.ed.ac.uk/~ibethune
Tel/Fax: +44 (0)131 650 5201/6555
Mob: +44 (0)7598317015
Addr: 2404 JCMB, The King's Buildings, Peter Guthrie Tait Road, Edinburgh, EH9 3FD

> On 6 Mar 2015, at 02:37, Hang Xiao <xiaoh... at gmail.com> wrote:
> 
> 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
> 
> 
> -- 
> 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... at googlegroups.com.
> To post to this group, send email to cp... at googlegroups.com.
> Visit this group at http://groups.google.com/group/cp2k.
> For more options, visit https://groups.google.com/d/optout.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2017 bytes
Desc: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20150306/46edf4ee/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20150306/46edf4ee/attachment.ksh>


More information about the CP2K-user mailing list