libint problems - solved
Toon Verstraelen
toon.ver... at UGent.be
Thu Nov 8 11:33:37 UTC 2007
Hi all,
I was trying to compile cp2k with libint. I use libint-1.1.2 and the
latest build of g95 (6-11-2007, 32bit version). I got this error in the
linking phase of cp2k.sopt, but I found the solution before hitting the
send button. :-) (see below) I just post this on the list in case other
newbies would struggle with the same issue. This is the compilation
error:
g95 -D__G95 -D__FFTSG -D__LIBINT -ffree-form -O2 -ffast-math -march=opteron -cpp -g -D__COMPILE_ARCH="\"Linux-x86-64-g95\"" -D__COMPILE_DATE="\"Thu Nov 8 12:00:56 CET 2007\"" -D__COMPILE_HOST="\"molmod22\"" -D__COMPILE_LASTCVS="\"/realspace_grid_cube.F/1.4/Tue Nov 6 14:05:32 2007//\"" -I/home/toon/tmp/build/libint/libint-1.1.2/include/libint
-I/home/toon/tmp/build/libint/libint-1.1.2/include/libderiv -o /home/toon/tmp/build/cp2k/latest/cp2k/makefiles/../exe/Linux-x86-64-g95/cp2k.sopt cp2k.o /home/toon/tmp/build/cp2k/latest/cp2k/makefiles/../lib/Linux-x86-64-g95/sopt/libcp2k_lib.a /home/toon/tmp/build/cp2k/latest/cp2k/makefiles/../lib/Linux-x86-64-g95/sopt/libcp2k_fft_lib.a
/home/toon/tmp/build/cp2k/latest/cp2k/makefiles/../lib/Linux-x86-64-g95/sopt/libcp2k_base_lib.a -llapack -lblas /home/toon/tmp/build/libint/libint-1.1.2/lib/libint.a /home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a /home/toon/tmp/build/libint/libint-1.1.2/lib/libr12.a /usr/lib/libstdc++.so.5 -lpthread
/home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a(d12vrr_order_0000.o): In function `d12vrr_order_0000(Libderiv_t*, pdata*)':
d12vrr_order_0000.cc:(.text+0x6f): undefined reference to `hrr3_build_0p(double const*, double*, double*, double*, int)'
d12vrr_order_0000.cc:(.text+0x147): undefined reference to `hrr3_build_0d(double const*, double*, double*, double*, int)'
d12vrr_order_0000.cc:(.text+0x2d8): undefined reference to `hrr3_build_0p(double const*, double*, double*, double*, int)'
/home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a(d12vrr_order_00p0.o): In function `d12vrr_order_00p0(Libderiv_t*, pdata*)':
d12vrr_order_00p0.cc:(.text+0x1ed): undefined reference to `hrr3_build_pd(double const*, double*, double*, double*, int)'
d12vrr_order_00p0.cc:(.text+0x26a): undefined reference to `hrr3_build_0p(double const*, double*, double*, double*, int)'
/home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a(d12vrr_order_00pp.o): In function `d12vrr_order_00pp(Libderiv_t*, pdata*)':
d12vrr_order_00pp.cc:(.text+0x214): undefined reference to `hrr3_build_pd(double const*, double*, double*, double*, int)'
d12vrr_order_00pp.cc:(.text+0x477): undefined reference to `hrr3_build_0p(double const*, double*, double*, double*, int)'
/home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a(d12vrr_order_d0pp.o): In function `d12vrr_order_d0pp(Libderiv_t*, pdata*)':
d12vrr_order_d0pp.cc:(.text+0x779): undefined reference to `hrr3_build_pd(double const*, double*, double*, double*, int)'
d12vrr_order_d0pp.cc:(.text+0xc36): undefined reference to `hrr3_build_0p(double const*, double*, double*, double*, int)'
/home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a(d12vrr_order_p0p0.o): In function `d12vrr_order_p0p0(Libderiv_t*, pdata*)':
d12vrr_order_p0p0.cc:(.text+0x3d4): undefined reference to `hrr3_build_pd(double const*, double*, double*, double*, int)'
d12vrr_order_p0p0.cc:(.text+0x45e): undefined reference to `hrr3_build_0p(double const*, double*, double*, double*, int)'
/home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a(d12vrr_order_p0pp.o): In function `d12vrr_order_p0pp(Libderiv_t*, pdata*)':
d12vrr_order_p0pp.cc:(.text+0x414): undefined reference to `hrr3_build_pd(double const*, double*, double*, double*, int)'
d12vrr_order_p0pp.cc:(.text+0x78d): undefined reference to `hrr3_build_0p(double const*, double*, double*, double*, int)'
/home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a(d12vrr_order_pppp.o): In function `d12vrr_order_pppp(Libderiv_t*, pdata*)':
d12vrr_order_pppp.cc:(.text+0x38b): undefined reference to `hrr3_build_pd(double const*, double*, double*, double*, int)'
d12vrr_order_pppp.cc:(.text+0x8a4): undefined reference to `hrr3_build_pd(double const*, double*, double*, double*, int)'
d12vrr_order_pppp.cc:(.text+0xcd1): undefined reference to `hrr3_build_0p(double const*, double*, double*, double*, int)'
d12vrr_order_pppp.cc:(.text+0xe34): undefined reference to `hrr3_build_0p(double const*, double*, double*, double*, int)'
/home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a(d1vrr_order_0000.o): In function `d1vrr_order_0000(Libderiv_t*, pdata*)':
d1vrr_order_0000.cc:(.text+0x5f): undefined reference to `hrr3_build_0p(double const*, double*, double*, double*, int)'
make[2]: *** [/home/toon/tmp/build/cp2k/latest/cp2k/makefiles/../exe/Linux-x86-64-g95/cp2k.sopt] Error 1
make[2]: Leaving directory `/home/toon/tmp/build/cp2k/latest/cp2k/obj/Linux-x86-64-g95/sopt'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/toon/tmp/build/cp2k/latest/cp2k/makefiles'
make: *** [sopt] Error 2
The order of the libraries in the LIBS variable seems to matter. This works:
LIBS = -llapack -lblas \
/home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a \
/home/toon/tmp/build/libint/libint-1.1.2/lib/libint.a \
...
and this does not:
LIBS = -llapack -lblas \
/home/toon/tmp/build/libint/libint-1.1.2/lib/libint.a \
/home/toon/tmp/build/libint/libint-1.1.2/lib/libderiv.a \
...
have fun,
Toon
More information about the CP2K-user
mailing list