errors with configure for ctffind4
Forums
To Whom It May Concern,
it seems that no matter what Fortran compiler I have in my PATH and specify on the configure line for FC and F77, e.g., Intel ifort (using 2013 distro) or gfortran (4.7.2), the configure program always fails when generating confdefs.h and exits with status 77 in its config.log. The output to the console says it cannot create executables, however if I try to touch files there as the uid running the build and it succeeds.
Various posts online seem to indicate this could be from something not being installed on the system. I am running on CentOS 6.4 for linux building, and I am not aware that anything is missing on my system.
So just wondering if you have seen/encountered this error before. Thanks in advance for your time and attention.
- rob
Hello Rob, Usually when the
Hello Rob,
Usually when the configure script fails saying that the compiler cannot create executables, it is because the compiler was not found or was not working for some reason. You should look in the config.log file to get more information about what failed exactly. If you would like, you can upload it here and I'll look. We can then take it from there.
Cheers,
Alexis
configure options/output for ctffind4 with Intel compilers
In reply to Hello Rob, Usually when the by Alexis
I start with a simple configure command (config command #1 below). I found I had to add -fpp for the fortran preprocessor to handle the ifdefs (else compilation fails). It did not work for me to set FCFLAGS from the configure command line (with -fpp there instead). This configure command appears to work even though it complains that the command line is too long starting at line 5381.
However, I want to build ctffind4 to use an external libfftw3 and not use INTEL MK, so for config command #2 below, I add —with-fftw-libdir with the path where libfftw3.so lives. Note that “./configure —help” lists this as a valid option. So config command #2 is just config command #1 with the addition of --with-fftw-libdir=/programs/x86_64-linux/xmipp/3.1/lib. But configure still outputs “Will use Intel MKL rather than FFTW for fast Fourier transforms” Also, the configure generated Makefile has no -lfftw3 entry in LIBS. The ldd command shoes the binary is not linked against libfftw3.so. Now I can add -lfftw3 to LIBS in the configure generated Makefile (that works but is cheating ;-)
Finally, when I try to build the same way on Mac I currently have to use old Mac OS 10.6 since that is the machine the Intel compilers are licensed on (the rev is version 11.1). It looks like the build output has the same compiler and linker options, but compilation fails with an internal error on,
/build/compilers/osx.i386/intel/bin/ifort -fpp -FR -O3 -c -o core/string_manipulations.o core/string_manipulations.f90
core/string_manipulations.f90(280): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance.
allocate(character(len=NumberOfDigitsInInteger(intg)) :: string)
^
[ Aborting due to internal error. ]
The Intel support pages seem to indicate the solution to this is to upgrade to later versions of the compilers (which may not be an option for me).
Happy to hear suggestions/alternate ways to get the result I need with configure. Config log files for config command #1 and #1 are config.log.1 and config.log.2 respectively.
- rob
LINUX ENVIRONMENT
$ cat /etc/redhat-release
CentOS release 6.5 (Final)
$ which ifort
/nfs/build/compilers/linux/intel-13/composer_xe_2013.5.192/bin/intel64/ifort
$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.1.3.192 Build 20130607
Copyright (C) 1985-2013 Intel Corporation. All rights reserved.
CONFIG COMMAND #1:
$ ./configure --prefix=/nfs/home/sbgrid/ctffind4/linux/4.0.13 --enable-openmp FC="ifort -fpp" F77="ifort -fpp"
CONFIG COMMAND #1 TERMINAL OUTPUT:
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 for Fortran 77 compiler default output file name... a.out
checking whether the Fortran 77 compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU Fortran 77 compiler... rm: cannot remove `core': Is a directory
no
checking whether ifort -fpp accepts -g... rm: cannot remove `core': Is a directory
yes
checking whether we are using the GNU Fortran compiler... rm: cannot remove `core': Is a directory
no
checking whether ifort -fpp accepts -g... rm: cannot remove `core': Is a directory
yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... rm: cannot remove `core': Is a directory
yes
checking whether gcc accepts -g... rm: cannot remove `core': Is a directory
yes
checking for gcc option to accept ISO C89... rm: cannot remove `core': Is a directory
none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for Fortran flag to compile .f90 files... none
checking for Fortran flag to compile .f files... none
checking for Fortran flag needed to allow free-form source... rm: cannot remove `core': Is a directory
rm: cannot remove `core': Is a directory
-FR
checking for library containing cblas_sswap... rm: cannot remove `core': Is a directory
rm: cannot remove `core': Is a directory
-lgslcblas
checking for library containing gsl_log1p... rm: cannot remove `core': Is a directory
rm: cannot remove `core': Is a directory
-lgsl
checking fortran 90 modules inclusion flag... rm: cannot remove `core': Is a directory
-I
checking fortran 90 modules extension... mod
checking for fftwf_malloc in -lmkl_rt... rm: cannot remove `core': Is a directory
yes
configure: Will use Intel MKL rather than FFTW for fast Fourier transforms
./configure: line 5381: test: too many arguments
./configure: line 5389: test: too many arguments
./configure: line 5397: test: too many arguments
./configure: line 5405: test: too many arguments
checking for ranlib... ranlib
configure: Debugging disabled
configure: Optimisations enabled
configure: Latest instruction sets disabled
configure: Profiling disabled
configure: OpenMP enabled
configure: OpenMP profiling disabled
configure: Coarrays disabled
configure: svn version = 2042
configure: FCFLAGS at the end: -FR -O3
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
rm: cannot remove `core': Is a directory
CONFIG LOG (see attached file = config.log.1)
BUILD OUTPUT #1:
$ make
ifort -fpp -FR -O3 -c -o core/dates_and_times.o core/dates_and_times.f90
ifort -fpp -FR -O3 -c -o core/program_instances.o core/program_instances.f90
ifort -fpp -FR -O3 -c -o core/globals.o core/globals.f90
ifort -fpp -FR -O3 -c -o core/look_up_tables.o core/look_up_tables.f90
ifort -fpp -O3 -c -o external_libs/napack/sort2.o external_libs/napack/sort2.f
ifort -fpp -FR -O3 -c -o core/useful_functions.o core/useful_functions.f90
ifort -fpp -FR -O3 -c -o core/string_manipulations.o core/string_manipulations.f90
ifort -fpp -FR -O3 -c -o core/user_supplied_parameters.o core/user_supplied_parameters.f90
ifort -fpp -FR -O3 -c -o core/user_input.o core/user_input.f90
ifort -fpp -FR -O3 -c -o external_libs/fftw3.3/fftw3.3.o external_libs/fftw3.3/fftw3.3.f90
ifort -fpp -FR -O3 -c -o core/histograms.o core/histograms.f90
ifort -fpp -FR -O3 -c -o core/empirical_distributions.o core/empirical_distributions.f90
ifort -fpp -FR -O3 -c -o core/peaks.o core/peaks.f90
ifort -fpp -O3 -c -o external_libs/netlib/gcvspl.o external_libs/netlib/gcvspl.f
external_libs/netlib/gcvspl.f(86): remark #8577: The scale factor (k) and number of fractional digits (d) do not have the allowed combination of either -d < k < 0 or 0 < k < d+2. Expect asterisks as output.
710 FORMAT(2I10,E15.0,I10)
----------------------^
ifort -fpp -FR -O3 -c -o core/numeric_text_files.o core/numeric_text_files.f90
ifort -fpp -FR -O3 -c -o core/curves.o core/curves.f90
ifort -fpp -FR -O3 -c -o core/image_header_records.o core/image_header_records.f90
ifort -fpp -FR -O3 -c -o core/image_headers.o core/image_headers.f90
ifort -fpp -FR -O3 -c -o core/image_files.o core/image_files.f90
ifort -fpp -FR -O3 -c -o core/units.o core/units.f90
ifort -fpp -FR -O3 -c -o core/contrast_transfer_functions.o core/contrast_transfer_functions.f90
ifort -fpp -FR -O3 -c -o core/images_core.o core/images_core.f90
ifort -fpp -FR -O3 -c -o core/progress_bars.o core/progress_bars.f90
ifort -fpp -FR -O3 -c -o core/brute_force_searches.o core/brute_force_searches.f90
ifort -fpp -FR -O3 -c -o core/conjugate_gradients.o core/conjugate_gradients.f90
ifort -fpp -FR -O3 -c -o src/ctffind.o src/ctffind.f90
ifort -fpp -O3 -L/nfs/build/compilers/linux/intel-13/composer_xe_2013.5.192/mkl/lib/intel64 -o ctffind core/dates_and_times.o core/program_instances.o core/globals.o core/look_up_tables.o external_libs/napack/sort2.o core/useful_functions.o core/string_manipulations.o core/user_supplied_parameters.o core/user_input.o external_libs/fftw3.3/fftw3.3.o core/histograms.o core/empirical_distributions.o core/peaks.o external_libs/netlib/gcvspl.o core/numeric_text_files.o core/curves.o core/image_header_records.o core/image_headers.o core/image_files.o core/units.o core/contrast_transfer_functions.o core/images_core.o core/progress_bars.o core/brute_force_searches.o core/conjugate_gradients.o src/ctffind.o -lgsl -lgslcblas -lmkl_rt
LDD OF CTFFIND4 FROM BUILD #1:
(-lmkl_rt got us the libmkl_rt.so from the compiler distribution, and all other libs are system libs)
$ ldd ctffind
linux-vdso.so.1 => (0x00007fff11de3000)
libgsl.so.0 => /usr/lib64/libgsl.so.0 (0x0000003dd9600000)
libgslcblas.so.0 => /usr/lib64/libgslcblas.so.0 (0x0000003dd9200000)
libmkl_rt.so => /nfs/build/compilers/linux/intel-13/composer_xe_2013.5.192/mkl/lib/intel64/libmkl_rt.so (0x00007f860daa5000)
libm.so.6 => /lib64/libm.so.6 (0x0000003dd9e00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000351d800000)
libc.so.6 => /lib64/libc.so.6 (0x0000003dd8e00000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003150400000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f860d89f000)
/lib64/ld-linux-x86-64.so.2 (0x0000003dd8a00000)
================================
CONFIG COMMAND #2:
$ ./configure --prefix=/nfs/home/sbgrid/ctffind4/linux/4.0.13 --enable-openmp --with-fftw-libdir=/programs/x86_64-linux/xmipp/3.1/lib FC="ifort -fpp" F77="ifort -fpp"
CONFIG COMMAND #2 TERMINAL OUTPUT:
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 for Fortran 77 compiler default output file name... a.out
checking whether the Fortran 77 compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU Fortran 77 compiler... rm: cannot remove `core': Is a directory
no
checking whether ifort -fpp accepts -g... rm: cannot remove `core': Is a directory
yes
checking whether we are using the GNU Fortran compiler... rm: cannot remove `core': Is a directory
no
checking whether ifort -fpp accepts -g... rm: cannot remove `core': Is a directory
yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... rm: cannot remove `core': Is a directory
yes
checking whether gcc accepts -g... rm: cannot remove `core': Is a directory
yes
checking for gcc option to accept ISO C89... rm: cannot remove `core': Is a directory
none needed
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for Fortran flag to compile .f90 files... none
checking for Fortran flag to compile .f files... none
checking for Fortran flag needed to allow free-form source... rm: cannot remove `core': Is a directory
rm: cannot remove `core': Is a directory
-FR
checking for library containing cblas_sswap... rm: cannot remove `core': Is a directory
rm: cannot remove `core': Is a directory
-lgslcblas
checking for library containing gsl_log1p... rm: cannot remove `core': Is a directory
rm: cannot remove `core': Is a directory
-lgsl
checking fortran 90 modules inclusion flag... rm: cannot remove `core': Is a directory
-I
checking fortran 90 modules extension... mod
checking for fftwf_malloc in -lmkl_rt... rm: cannot remove `core': Is a directory
yes
configure: Will use Intel MKL rather than FFTW for fast Fourier transforms
./configure: line 5381: test: too many arguments
./configure: line 5389: test: too many arguments
./configure: line 5397: test: too many arguments
./configure: line 5405: test: too many arguments
checking for ranlib... ranlib
configure: Debugging disabled
configure: Optimisations enabled
configure: Latest instruction sets disabled
configure: Profiling disabled
configure: OpenMP enabled
configure: OpenMP profiling disabled
configure: Coarrays disabled
configure: svn version = 2042
configure: FCFLAGS at the end: -FR -O3
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
rm: cannot remove `core': Is a directory
CONFIG LOG (see attached file = config.log.2)
BUILD OUTPUT #2 IS THE SAME AS BUILD OUTPUT #1
But instead of the LIBS being, -lgsl -lgslcblas -lmkl_rt
- I want configure to generate the LIBS options = -lgsl -lgslcblas -lmkl_rt -lfftw3
Such that ldd on the binary looks like,
$ ldd ctffind
linux-vdso.so.1 => (0x00007fff649ef000)
libgsl.so.0 => /usr/lib64/libgsl.so.0 (0x0000003dd9600000)
libgslcblas.so.0 => /usr/lib64/libgslcblas.so.0 (0x0000003dd9200000)
libmkl_rt.so => /nfs/build/compilers/linux/intel-13/composer_xe_2013.5.192/mkl/lib/intel64/libmkl_rt.so (0x00007f75d1e3f000)
libfftw3.so.3 => /usr/lib64/libfftw3.so.3 (0x0000003ae0200000)
libm.so.6 => /lib64/libm.so.6 (0x0000003dd9e00000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000351d800000)
libc.so.6 => /lib64/libc.so.6 (0x0000003dd8e00000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003150400000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f75d1c39000)
/lib64/ld-linux-x86-64.so.2 (0x0000003dd8a00000)
configure options/output for ctffind4 with Intel compilers
In reply to configure options/output for ctffind4 with Intel compilers by builder
Not sure I see where to upload my config.log files.
- rob
Ahhh sorry about that, it
In reply to configure options/output for ctffind4 with Intel compilers by builder
Ahhh sorry about that, it looks like the forum software only allows attachments to forum topics, not forum replies, and since you didn't create the forum topic yourself, you won't be able to edit it I guess. Feel free to create a new topic if you'd like to attach output files. I'll see if we can re-configure things to allow attachments to forum replies but I'm not sure whether it's possible.
errors with configure for ctffind4
In reply to Ahhh sorry about that, it by Alexis
OK - thanks Alexis for reviewing that. Happy to switch from ifort to gfortran if that is preferable. Now trying to run configure with natively installed gfortran = rev 4.4.7 (though I think I also have 4.7.2 somewhere). But it looks like config.log first runs gfortran with --version and -v (which succeeds), but then also tries to run it with "-V" - which as far as I know does not work (and configure fails). The output from config.log is lised below. I would be happy to try and use the script you build with if you care to send it along.
- rob
$ which gfortran
/usr/bin/gfortran
$ gfortran --version
GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright (C) 2010 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
$ gfortran -V
gfortran: '-V' option must have argument
OUTPUT FROM CONFIG.LOG
$ ./configure --prefix=/nfs/home/sbgrid/ctffind4/linux/4.0.13 --enable-openmp FC=gfortran F77=gfortran
## --------- ##
## Platform. ##
## --------- ##
hostname = dev-vm-13.in.hwlab
uname -m = x86_64
uname -r = 2.6.32-431.11.2.el6.x86_64
uname -s = Linux
uname -v = #1 SMP Tue Mar 25 19:59:55 UTC 2014
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /build/compilers/linux/cuda/4.1.28-x86_64/cuda/bin
PATH: /nfs/build/compilers/linux/intel-13/composer_xe_2013.5.192/bin/intel64
PATH: /nfs/build/compilers/linux/intel-13/composer_xe_2013.5.192/mpirt/bin/intel64
PATH: /nfs/build/compilers/linux/intel-13/composer_xe_2013.5.192/bin/intel64
PATH: /nfs/build/compilers/linux/intel-13/composer_xe_2013.5.192/bin/intel64_mic
PATH: /nfs/build/compilers/linux/intel-13/composer_xe_2013.5.192/debugger/gui/intel64
PATH: /build/compilers/linux/gnu/4.7.2-x86_64/bin
PATH: /usr/lib64/qt-3.3/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /sbin
PATH: /build/bin
PATH: /usr/local/bin
PATH: /nfs/home/sbgrid/bin
PATH: /usr/X11R6/bin
PATH: /programs/share/sbgrid/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2164: checking for a BSD-compatible install
configure:2232: result: /usr/bin/install -c
configure:2243: checking whether build environment is sane
configure:2303: result: yes
configure:2444: checking for a thread-safe mkdir -p
configure:2483: result: /bin/mkdir -p
configure:2496: checking for gawk
configure:2512: found /bin/gawk
configure:2523: result: gawk
configure:2534: checking whether make sets $(MAKE)
configure:2556: result: yes
configure:2753: checking for Fortran 77 compiler version
configure:2761: gfortran --version >&5
GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-11)
Copyright (C) 2010 Free Software Foundation, Inc.
GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
configure:2765: $? = 0
configure:2772: gfortran -v >&5
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap -
-enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object -
-enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-
multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with
-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
configure:2776: $? = 0
configure:2783: gfortran -V >&5
gfortran: '-V' option must have argument
configure:2787: $? = 1
configure:2801: checking for Fortran 77 compiler default output file name
configure:2823: gfortran conftest.f "-lgsl -lgslcblas -lmkl_rt -lfftw" >&5
gfortran: "-lgsl: No such file or directory
configure:2827: $? = 1
configure:2865: result:
configure: failed program was:
| program main
|
| end
configure:2871: error: in `/nfs/home/sbgrid/ctffind4/linux/4.0.13':
configure:2874: error: Fortran 77 compiler cannot create executables
See `config.log' for more details.
Rob,The preferred option
In reply to errors with configure for ctffind4 by builder
Rob,
The preferred option right now is to use a recent Intel compiler.
In any case, as specified at the page below, you need verion >= 4.9.1 of the GNU compiler to build ctffind.
http://grigoriefflab.janelia.org/ctffind4
Also, there is a dependency on the GNU scientific library (-lgsl), as well as gslcblas and fftw3f.
Have you considered just using the binaries distributed on our main page? http://grigoriefflab.janelia.org/ctf
These should work on many linux systems - do they not work on yours?
Below is how I build ctffind:
configure_flags=" --enable-static --disable-debug --enable-optimisations --enable-openmp FC=ifort F77=ifort "
# Prepare for building
mkdir build
cd build
# Configure
echo "Configuring..."
mkdir temp_install
prefix=$PWD/temp_install
../configure $configure_flags --prefix $prefix
# Build
echo "Building..."
make
Many things appear to have
In reply to configure options/output for ctffind4 with Intel compilers by builder
Many things appear to have gone wrong here:
Hope this helps - let me know if you have better luck configuring in a fresh directory. If not, I'll send you the script I use to build the release binaries, which obviously work.
Alexis