compilation HFX - sopt

mguidon manuel... at gmail.com
Tue May 5 12:03:14 UTC 2009


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