glennhickey / progressiveCactus

Distribution package for the Prgressive Cactus multiple genome aligner. Dependencies are linked as submodules
Other
79 stars 26 forks source link

Error with Kyoto Cabinet version 1.2.76 configuration #112

Closed Morteza-M-Saber closed 6 years ago

Morteza-M-Saber commented 6 years ago

I am trying to install Cactus on computer cluster and it keep returning the following error after running 'make':

#================================================================
# Configuring Kyoto Cabinet version 1.2.76.
#================================================================
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/Cactus/progressiveCactus/submodules/kyotocabinet':
configure: error: C compiler cannot create executables
See `config.log' for more details
make[1]: *** [Makefile:54: kyotocabinetRule] Error 77

Here is 'config.log':

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by kyotocabinet configure 1.2.76, which was
generated by GNU Autoconf 2.68.  Invocation command line was

  $ ./configure --prefix=/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/kyotocabinet

## --------- ##
## Platform. ##
## --------- ##

hostname = gra-login4
uname -m = x86_64
uname -r = 3.10.0-693.11.6.el7.x86_64
uname -s = Linux
uname -v = #1 SMP Thu Jan 4 01:06:37 UTC 2018

/usr/bin/uname -p = x86_64
/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: /home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/hdf5/bin
PATH: /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/gcc-4.9.4/bin
PATH: /home/masih/miniconda3/envs/Sim/bin
PATH: /home/masih/miniconda3/bin
PATH: /opt/software/slurm/current/bin
PATH: /cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/imkl/11.3.4.258/mkl/bin
PATH: /cvmfs/soft.computecanada.ca/easybuild/software/2017/Core/imkl/11.3.4.258/bin
PATH: /cvmfs/soft.computecanada.ca/easybuild/bin
PATH: /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09/bin
PATH: /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09/sbin
PATH: /cvmfs/soft.computecanada.ca/custom/bin
PATH: /opt/software/bin
PATH: /opt/software/slurm/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /usr/local/sbin
PATH: /usr/sbin
PATH: /home/masih/.local/bin
PATH: /home/masih/bin

## ----------- ##
## Core tests. ##
## ----------- ##

configure:2341: checking for gcc
configure:2357: found /usr/bin/gcc
configure:2368: result: gcc
configure:2597: checking for C compiler version
configure:2606: gcc --version >&5
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2617: $? = 0
configure:2606: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
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-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) 
configure:2617: $? = 0
configure:2606: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:2617: $? = 4
configure:2606: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:2617: $? = 4
configure:2637: checking whether the C compiler works
configure:2659: gcc   -L/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/zlib/lib -L/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/kyotocabinet/lib  conftest.c  >&5
/usr/bin/ld: /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09/lib/../lib64/crt1.o: unrecognized relocation (0x29) in section `.text'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
configure:2663: $? = 1
configure:2701: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "kyotocabinet"
| #define PACKAGE_TARNAME "kyotocabinet"
| #define PACKAGE_VERSION "1.2.76"
| #define PACKAGE_STRING "kyotocabinet 1.2.76"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2706: error: in `/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/kyotocabinet':
configure:2708: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-O3 -g -Wall -funroll-loops -DNDEBUG -I /home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/sonLib/lib -I /home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/tokyocabinet/include -DHAVE_TOKYO_CABINET=1 -I/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/kyotocabinet/include -I/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/kyototycoon/include -DHAVE_KYOTO_TYCOON=1 -I/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/zlib/include    '
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value='-L/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/zlib/lib -L/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/kyotocabinet/lib '
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_ac_ct_CC=gcc

## ----------------- ##
## Output variables. ##
## ----------------- ##

CC='gcc'
CFLAGS=''
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXFLAGS='-O3 -g -Wall -funroll-loops -DNDEBUG -I /home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/sonLib/lib -I /home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/tokyocabinet/include -DHAVE_TOKYO_CABINET=1 -I/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/kyotocabinet/include -I/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/kyototycoon/include -DHAVE_KYOTO_TYCOON=1 -I/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/zlib/include    '
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
GREP=''
LDFLAGS='-L/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/zlib/lib -L/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/kyotocabinet/lib '
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MYCFLAGS='-Wall -ansi -pedantic -fPIC -fsigned-char -g0 -O2'
MYCMDLDFLAGS=''
MYCMDLIBS=''
MYCOMMANDFILES='kcutiltest kcutilmgr kcprototest kcstashtest kccachetest kcgrasstest kchashtest kchashmgr kctreetest kctreemgr kcdirtest kcdirmgr kcforesttest kcforestmgr kcpolytest kcpolymgr kclangctest'
MYCPPFLAGS='-I. -I$(INCLUDEDIR) -I/usr/local/include -DNDEBUG -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__ -D_MYZLIB'
MYCXXFLAGS='-Wall -fPIC -fsigned-char -g0 -O2'
MYDOCUMENTFILES='COPYING FOSSEXCEPTION ChangeLog doc kyotocabinet.idl'
MYFORMATVER='5'
MYHEADERFILES='kccommon.h kcutil.h kcthread.h kcfile.h kccompress.h kccompare.h kcmap.h kcregex.h kcdb.h kcplantdb.h kcprotodb.h kcstashdb.h kccachedb.h kchashdb.h kcdirdb.h kctextdb.h kcpolydb.h kcdbext.h kclangc.h'
MYLDFLAGS='-L. -L$(LIBDIR) -L/usr/local/lib'
MYLDLIBPATH=''
MYLDLIBPATHENV='LD_LIBRARY_PATH'
MYLIBOBJFILES='kcutil.o kcthread.o kcfile.o kccompress.o kccompare.o kcmap.o kcregex.o kcdb.o kcplantdb.o kcprotodb.o kcstashdb.o kccachedb.o kchashdb.o kcdirdb.o kctextdb.o kcpolydb.o kcdbext.o kclangc.o'
MYLIBRARYFILES='libkyotocabinet.a'
MYLIBREV='13'
MYLIBVER='16'
MYMAN1FILES='kcutiltest.1 kcutilmgr.1 kcprototest.1 kcstashtest.1 kccachetest.1 kcgrasstest.1 kchashtest.1 kchashmgr.1 kctreetest.1 kctreemgr.1 kcdirtest.1 kcdirmgr.1 kcforesttest.1 kcforestmgr.1 kcpolytest.1 kcpolymgr.1 kclangctest.1'
MYPCFILES='kyotocabinet.pc'
MYPOSTCMD='true'
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='kyotocabinet'
PACKAGE_STRING='kyotocabinet 1.2.76'
PACKAGE_TARNAME='kyotocabinet'
PACKAGE_URL=''
PACKAGE_VERSION='1.2.76'
PATH_SEPARATOR=':'
SHELL='/bin/sh'
ac_ct_CC='gcc'
ac_ct_CXX=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host_alias=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/home/masih/BacterialSimulator/Cactus/progressiveCactus/submodules/kyotocabinet'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "kyotocabinet"
#define PACKAGE_TARNAME "kyotocabinet"
#define PACKAGE_VERSION "1.2.76"
#define PACKAGE_STRING "kyotocabinet 1.2.76"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 77

I used GCC version 4,5,6 and 7. All returns the same error. I am not sure what is going wrong. Any solutions?

joelarmstrong commented 6 years ago

Thanks for including the config.log.

It looks very similar to a known incompatibility between certain versions of binutils: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=808205

If I had to guess, I think the root cause may be that the version of ld used to link /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09/lib/../lib64/crt1.o was newer than the version you're using to link kyotocabinet. It looks like that object is within a NixOS installation, so it might be that the ld from that Nix profile (likely a newer version) is being replaced by an earlier version by other things in your PATH. If you put /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09/bin or /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09/usr/bin first in your PATH, it might help?

Morteza-M-Saber commented 6 years ago

I deleted everything in the PATH that could contain ld library and added /cvmfs/soft.computecanada.ca/nix/var/nix/profiles/16.09/bin to the PATH. But still get the same error.

Morteza-M-Saber commented 6 years ago

Talking with computerCanada Admin it turned out the problem is due to following:

"  There's something very weird about this "configure" script . When you load the gcc/5.4.0 module everything seems fine, you can do
[masih@gra-login4 kyotocabinet]$ which gcc
/cvmfs/soft.computecanada.ca/nix/var/nix/profiles/gcc-5.4.0/bin/gcc
and you get the right gcc binary. However, in the config.log file we see that the script states,
configure:2341: checking for gcc
configure:2357: found /usr/bin/gcc
configure:2368: result: gcc
It looks as if somewhere in the configure script the author of this program has hard-coded the idea that executables should be in /usr/bin, which results in the program using the wrong gcc and the wrong ld (the linker), which is why nothing works.

After looking through the configure file I found the lines which were causing issues:

Building paths

PATH=".:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:$PATH" CPATH=".:/usr/local/include:$CPATH" LIBRARY_PATH=".:/usr/local/lib:$LIBRARY_PATH" LD_LIBRARY_PATH=".:/usr/local/lib:$LD_LIBRARY_PATH" PKG_CONFIG_PATH=".:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH I commented out all of these lines and the configure script now runs correctly. The problem here is that the author of this file was modifying the environment to make it so that the PATH variable (and the gcc, ld etc.) were being superseded by versions in /usr/bin that don't work.

Morteza-M-Saber commented 6 years ago

"You may want to tell the author of the tool to eventually excise these lines from the configure script so they don't create problems on other platforms by blindly imposing the toolchain found in /usr/bin.

joelarmstrong commented 6 years ago

Thanks for getting to the bottom of this! I think kyototycoon is unmaintained now, sadly, which is probably the core issue here. One of these days we will have to bite the bullet and switch over to a newer key-value DB.