Page 1 of 1

Fix for faulty path to ~abinit/config/wrappers

Posted: Tue Mar 13, 2012 4:49 pm
by jjramsey
I ran ./configure with the options --prefix=/usr/people/jjramsey/my_abinit_6_12_1 --enable-mpi --with-mpi-prefix=/usr/cta/unsupported/openmpi/gcc/4.4.1/openmpi-1.4.1, and the output from ./configure appeared sane enough. However, the output from running "make" was this:

Code: Select all

The build of fox has been disabled
make[3]: Leaving directory `/usr/people/jjramsey/abinit-6.12.1/fallbacks'
Checking build of fox fallback
test -e stamps/fox-install-stamp
make libxc
make[3]: Entering directory `/usr/people/jjramsey/abinit-6.12.1/fallbacks'
cd sources && \
          gzip -cd /usr/people/jjramsey/.abinit/tarballs/libxc-1.1.0.1.tar.gz | tar xf -
patch -d sources/libxc-1.1.0.1 -p1 <./patches/libxc-1.1.0.1-0001.patch
patching file src/gga_x_b88.c
cd sources/libxc-1.1.0.1 && \
          CPP="config/wrappers/wrap-mpicc -E" \
          CPPFLAGS=" -I/usr/people/jjramsey/abinit-6.12.1/fallbacks/exports/include" \
          CC="config/wrappers/wrap-mpicc" \
          CFLAGS="-g -O2" \
          CXX="config/wrappers/wrap-mpicxx" \
          CXXFLAGS="" \
          FCCPP="cpp -P -std=c99" \
          F77="config/wrappers/wrap-mpifc" \
          FFLAGS="-ffixed-form -g -ffree-line-length-none  -O2 -mtune=native -march=native -mfpmath=sse -g -O2 -I/usr/people/jjramsey/abinit-6.12.1/fallbacks/exports/include" \
          F90="config/wrappers/wrap-mpifc" \
          F90FLAGS="-ffree-form -g -ffree-line-length-none  -O2 -mtune=native -march=native -mfpmath=sse -g -O2 -I/usr/people/jjramsey/abinit-6.12.1/fallbacks/exports/include" \
          FC="config/wrappers/wrap-mpifc" \
          FCFLAGS="-ffree-form -g -ffree-line-length-none  -O2 -mtune=native -march=native -mfpmath=sse -g -O2 -I/usr/people/jjramsey/abinit-6.12.1/fallbacks/exports/include" \
          LDFLAGS=" " \
          LIBS="" \
          AR="ar" \
          ARFLAGS="rc" \
          RANLIB="ranlib" \
          /bin/sh ./configure \
            --prefix="/usr/people/jjramsey/abinit-6.12.1/fallbacks/exports" \
            --program-suffix="-abinit" \
            --enable-fortran --enable-static --disable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... config/wrappers/wrap-mpicc
checking whether the C compiler works... no
configure: error: in `/usr/people/jjramsey/abinit-6.12.1/fallbacks/sources/libxc-1.1.0.1':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[3]: *** [stamps/libxc-config-stamp] Error 77
make[3]: Leaving directory `/usr/people/jjramsey/abinit-6.12.1/fallbacks'
make[2]: [all-local] Error 2 (ignored)
Checking build of libxc fallback
test -e stamps/libxc-install-stamp
make[2]: *** [all-local] Error 1
make[2]: Leaving directory `/usr/people/jjramsey/abinit-6.12.1/fallbacks'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/people/jjramsey/abinit-6.12.1'
make: *** [all] Error 2


If I look at config.log in ~abinit/fallbacks/sources/libxc-1.1.0.1/, I see the following lines:

Code: Select all

configure:3544: checking whether the C compiler works
configure:3566: config/wrappers/wrap-mpicc -g -O2  -I/usr/people/jjramsey/abinit-6.12.1/fallbacks/exports/include   conftest.c  >&5
./configure: line 3568: config/wrappers/wrap-mpicc: No such file or directory


Now ~abinit/config/wrappers/wrap-mpicc does exist, and it appears that the problem is that CPP is set to a relative path not an absolute one, so "make" tries to run ~abinit/fallbacks/sources/libxc-1.1.0.1/config/wrappers/wrap-mpicc instead of ~abinit/config/wrappers/wrap-mpicc, which of course fails. One can fix this by applying the following patch to the main ABINIT configure script:

Code: Select all

--- configure.orig      2012-03-13 13:45:57.000000000 -0400
+++ configure   2012-03-13 12:56:22.000000000 -0400
@@ -9372,7 +9372,7 @@
 
     chmod u+x config/wrappers/wrap-mpi${tmp_name}
 
-    eval CC="config/wrappers/wrap-mpi${tmp_name}"
+    eval CC="$ac_pwd/config/wrappers/wrap-mpi${tmp_name}"
 
     unset tmp_name
 
@@ -9397,7 +9397,7 @@
 
     chmod u+x config/wrappers/wrap-mpi${tmp_name}
 
-    eval CXX="config/wrappers/wrap-mpi${tmp_name}"
+    eval CXX="$ac_pwd/config/wrappers/wrap-mpi${tmp_name}"
 
     unset tmp_name
 
@@ -9422,7 +9422,7 @@
 
     chmod u+x config/wrappers/wrap-mpi${tmp_name}
 
-    eval FC="config/wrappers/wrap-mpi${tmp_name}"
+    eval FC="$ac_pwd/config/wrappers/wrap-mpi${tmp_name}"
 
     unset tmp_name

Re: Fix for faulty path to ~abinit/config/wrappers

Posted: Tue Mar 13, 2012 7:27 pm
by pouillon
Thank you for your report. This will be fixed in the upcoming version of Abinit.