compilation HFX - sopt
marc
marcvanh... at gmail.com
Tue May 5 14:08:41 UTC 2009
thanks you for the answer manuel. I left out the comments(#) so I
used this arch file:
CC = cc
CPP =
FC = g95
LD = g95
AR = ar -r
DFLAGS = -D__G95 -D__FFTSG -D__FFTW3 -D__LIBINT
CPPFLAGS =
FCFLAGS = $(DFLAGS) -ffree-form -O2 -ffast-math -march=opteron -cpp -
I/usr/include
LDFLAGS = $(FCFLAGS)
LIBPATH = /home/marc/build/libraries
LIBS = $(LIBPATH)/lapack-3.2.1/lapack_G95.a \
$(LIBPATH)/BLAS/blas_G95.a \
$(LIBPATH)/libint-1.1.2/compilation_folder/lib/libderiv.a \
$(LIBPATH)/libint-1.1.2/compilation_folder/lib/libint.a \
$(LIBPATH)/fftw-3.2.1/compilation_folder/lib/libfftw3.a \
/usr/lib/gcc/x86_64-linux-gnu/4.1.2/32/libstdc++.a \
/usr/lib/libstdc++.so.6 \
-lstdc++ -lpthread
OBJECTS_ARCHITECTURE = machine_g95.o
,but now the error is
Warning (158): INTENT(OUT) variable 'e' at (1) is never set
ar: creating /home/marc/build/cp2k/2009-04-27/makefiles/../lib/Linux-
x86-64-g95/sopt/libcp2k_lib.a
ld: cannot find -lstdc++
make[1]: *** [/home/marc/build/cp2k/2009-04-27/makefiles/../exe/Linux-
x86-64-g95/cp2k.sopt] Error 1
make: *** [build] Error 2
So if you say _gxx_personality errors mean that -lstdc++ cannot be
found, this is apparently the same problem now... no? Actually I
already encountered this error before (ld: cannot find -lstdc++), so I
tried to "add" it by including the libraries I originally commented
out, but as you can see I get more or less the same error. So I think
the main problem is that for some reason I don't succeed in letting
cp2k to recognize -lstdc++. I've looked at other input files but they
all just mention this... as is explained in the README of the
libint_tools.
thank you very much for your comments on this.
ciao
marc
On 5 mei, 14:03, mguidon <manuel... at gmail.com> wrote:
> Hi Marc.
>
> Your first way of doing it was correct. Just remove the # comments
> from your arch file (otherwise, libraries that come afterwards are
> ignored)
>
> In general, _gxx_personality errors mean, that -lstdc++ could not be
> found.
>
> Cheers
>
> Manuel
>
> On May 5, 12:56 pm, marc <marcvanh... at gmail.com> wrote:
>
> > CC = cc
> > CPP =
> > Dear all,
>
> > I succesfully compiled cp2k.sopt (no libint) on a x86-64 linux machine
> > with g95. Now I want to include hf exchange using libint 1.1.2. My
> > arch-file (Linux-x86-64-g95.sopt) looks like this.
>
> > FC = g95
> > LD = g95
> > AR = ar -r
> > DFLAGS = -D__G95 -D__FFTSG -D__FFTW3 -D__LIBINT
> > CPPFLAGS =
> > FCFLAGS = $(DFLAGS) -ffree-form -O2 -ffast-math -march=opteron -cpp -
> > I/usr/include
> > LDFLAGS = $(FCFLAGS)
> > LIBPATH = /home/marc/build/libraries
> > LIBS = $(LIBPATH)/lapack-3.2.1/lapack_G95.a \
> > $(LIBPATH)/BLAS/blas_G95.a \
> > $(LIBPATH)/libint-1.1.2/compilation_folder/lib/libderiv.a \
> > $(LIBPATH)/libint-1.1.2/compilation_folder/lib/libint.a \
> > $(LIBPATH)/fftw-3.2.1/compilation_folder/lib/libfftw3.a \
> > #/usr/lib/gcc/x86_64-linux-gnu/4.1.2/32/libstdc++.a \
> > #/usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/libstdc++.so \
> > #/usr/lib/libstdc++.so.5 \
> > -lstdc++ -lpthread
>
> > OBJECTS_ARCHITECTURE = machine_g95.o
>
> > Initially I compiled libint just with a prefix and the option --enable
> > deriv. Then I got an error like this:
>
> > I get errors like this:
> > ar: creating /home/marc/build/cp2k/2009-04-27/makefiles/../lib/Linux-
> > x86-64-g95/sopt/libcp2k_lib.a
> > /home/marc/build/libraries/libint-1.1.2/compilation_folder/lib/
> > libderiv.a(init_libderiv.o):(.eh_frame+0x12): undefined reference to
> > `__gxx_personality_v0'
> > /home/marc/build/libraries/libint-1.1.2/compilation_folder/lib/
> > libderiv.a(d12hrr_order_0000.o):(.eh_frame+0x12): undefined reference
> > to `__gxx_personality_v0'
> > /home/marc/build/libraries/libint-1.1.2/compilation_folder/lib/
> > libderiv.a(d12hrr_order_00d0.o):(.eh_frame+0x12): undefined reference
> > to `__gxx_personality_v0'
> > /home/marc/build/libraries/libint-1.1.2/compilation_folder/lib/
> > libderiv.a(d12hrr_order_00dd.o):(.eh_frame+0x12): undefined reference
> > to `__gxx_personality_v0'
> > /home/marc/build/libraries/libint-1.1.2/compilation_folder/lib/
> > libderiv.a(d12hrr_order_00dp.o):(.eh_frame+0x12): undefined reference
> > to `__gxx_personality_v0'
> > /home/marc/build/libraries/libint-1.1.2/compilation_folder/lib/
> > libderiv.a(d12hrr_order_00p0.o):(.eh_frame+0x12): more undefined
> > references to `__gxx_personality_v0' follow
> > make[1]: *** [/home/marc/build/cp2k/2009-04-27/makefiles/../exe/Linux-
> > x86-64-g95/cp2k.sopt] Error 1
> > make: *** [build] Error 2
>
> > Then, a collegue thought that the problem could be in the underscores,
> > so I compiled libint again with the options " --enable-deriv FFLAGS='-
> > fno-second-underscore -g -O2' ". The previous errors are now gone,
> > but now I get an even more strange error like this:
>
> > Warning (158): INTENT(OUT) variable 'e' at (1) is never set
> > ar: creating /home/marc/build/cp2k/2009-04-27/makefiles/../lib/Linux-
> > x86-64-g95/sopt/libcp2k_lib.a
> > g95: : No such file or directory
> > make[1]: *** [/home/marc/build/cp2k/2009-04-27/makefiles/../exe/Linux-
> > x86-64-g95/cp2k.sopt] Error 1
> > make: *** [build] Error 2
>
> > cp2k can't find g95?? I started compiling in the first place, so I
> > definitely symlinked my g95-executable (/opt/g95/0.91_32/bin/x86_64-
> > suse-linux-gnu-g95) with the command "g95" correct, so I don't really
> > understand this error message...
> > Any ideas?
>
> > thanks in advance!!
More information about the CP2K-user
mailing list