Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to build code #303

Open
FabianaRossi opened this issue Apr 9, 2021 · 7 comments
Open

failed to build code #303

FabianaRossi opened this issue Apr 9, 2021 · 7 comments

Comments

@FabianaRossi
Copy link

FabianaRossi commented Apr 9, 2021

I have followed https://pachterlab.github.io/kallisto/source guide to build Kallisto on a 11.2.3 macOS Big Sur, doing the following steps:

# install Homebrew package manager
   % /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

   # use homebrew to install cmake, autoconf, HDF5 library
   % brew install cmake
   % brew install autoconf
   % brew install hdf5

   # get the kallisto source code, unpack, build, and install it:

   % git clone https://github.com/pachterlab/kallisto.git
   % cd kallisto
   % cd ext/htslib
   % autoheader
   % autoconf
   % cd ../..
   % mkdir build
   % cd build
   % cmake ..
   % make
   % make install

When I execute % make, I get the following error:

[  3%] Creating directories for 'htslib'
[  6%] No download step for 'htslib'
[ 10%] No update step for 'htslib'
[ 13%] No patch step for 'htslib'
[ 17%] Performing configure step for 'htslib'
configure: error: cannot find required auxiliary files: config.guess config.sub
make[2]: *** [../ext/htslib/src/htslib-stamp/htslib-configure] Error 1
make[1]: *** [CMakeFiles/htslib.dir/all] Error 2
make: *** [all] Error 2

Any idea of what might be going on?

Thank you in advance!

GNU M4 1.4.6
zlib version 1.2.11
cmake version 3.20.1
autoconf version 2.71
hdf5 version 1.12.0_1
g++ version Apple clang version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-darwin20.3.0

@ihnorton
Copy link

In case it is helpful, FYI: this is caused by a change in autoconf 2.70, which is now the default in homebrew (the only other version available from homebrew now is 2.13; haven't tried that myself). It's fixed in htslib by samtools/htslib#1198 which is released in htslib 1.12. (I happened across this issue while trying to fix it myself, in a different software package)

@t4eyang
Copy link

t4eyang commented May 23, 2021

Hi, Actually, the same error message still appears even after installing htslib 1.12. Do you have any idea what is being problematic in this case?
I am quite new to git and it is bit confusing in terms of where I should be starting

@Yenaled
Copy link
Collaborator

Yenaled commented Jul 14, 2021

It is an autoconf issue; installing the newest version of htslib will not fix the issue (kallisto comes bundled with an older version of htslib, not htslib 1.12).

You need to uninstall autoconf then manually install autoconf 2.69.

@akhst7
Copy link

akhst7 commented Jul 22, 2021

@Yenaled
I have a htslib 1.13 installed by brew. Is there any way to skip htslib config step by providing the path to existing htslib 1.13 during make process ?

@Yenaled
Copy link
Collaborator

Yenaled commented Jul 22, 2021

It won't work. Kallisto relies on the older version of htslib and I think there are updates in the newer version of htslib that make it incompatible with kallisto.

One way is to simply get autoconf 2.69.

Otherwise, if you really want to stick with autoconf 2.7, here's a modified version of the installation that should work (at least it does on my end):

git clone https://github.com/pachterlab/kallisto.git
cd kallisto/ext/htslib
sed '/AC_PROG_CC/a \
AC_CANONICAL_HOST \
AC_PROG_INSTALL \
' configure.ac > configure.ac2
mv configure.ac2 configure.ac
autoreconf -i
autoheader
autoconf
cd ../../
mkdir build
cd build
cmake ..
make
make install

Basically, what the above does is add AC_CANONICAL_HOST and AC_PROG_INSTALL to configure.ac and it also runs autoreconf -i (which generates config.guess and config.sub). Credit goes to jmarshall/htslib@16e2301

@akhst7
Copy link

akhst7 commented Aug 13, 2021

@Yenaled , Thanks. kallisto is now installed in my M1 Mac mini.

build git:(master) ✗ sudo make install
Password:
[ 27%] Built target htslib
[ 93%] Built target kallisto_core
[100%] Built target kallisto
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/bin/kallisto
autoconf -V
autoconf (GNU Autoconf) 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>, <https://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.
 ~ neofetch
                 ,xNMM.          -------------------------
               .OMMMMo           OS: macOS 11.5.1 20G80 arm64
               OMMM0,            Host: Macmini9,1
     .;loddo:' loolloddol;.      Kernel: 20.6.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 5 days, 21 hours, 58 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 70 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.8
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1920x1080
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Light)
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: iTerm2
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   Terminal Font: Monaco 11
    kMMMMMMMMMMMMMMMMMMMMMMd     CPU: Apple M1
     ;KMMMMMMMWXXWMMMMMMMk.      GPU: Apple M1
       .cooc,.    .,coo:.        Memory: 2376MiB / 16384MiB

~ kallisto
kallisto 0.46.2

Usage: kallisto <CMD> [arguments] ..

Where <CMD> can be one of:

   index         Builds a kallisto index
   quant         Runs the quantification algorithm
   bus           Generate BUS files for single-cell data
   pseudo        Runs the pseudoalignment step
   merge         Merges several batch runs
   h5dump        Converts HDF5-formatted results to plaintext
   inspect       Inspects and gives information about an index
   version       Prints version information
   cite          Prints citation information

Running kallisto <CMD> without arguments prints usage information for <CMD>

@stiv1n
Copy link

stiv1n commented Feb 1, 2024

The solution from Jul 22, 2021 works for 0.48.0, but I cannot get it to work on any of the 0.46 versions.
I am using the htslib provided in the source folders.

[ 62%] Building CXX object src/CMakeFiles/kallisto_core.dir/MinCollector.cpp.o
/src/MinCollector.cpp: In member function ‘std::vector<int> MinCollector::intersectECs(std::vector<std::pair<KmerEntry, int> >&) const’:
/src/MinCollector.cpp:194:21: error: ‘numeric_limits’ is not a member of ‘std’
  194 |   int minpos = std::numeric_limits<int>::max();
      |                     ^~~~~~~~~~~~~~
/src/MinCollector.cpp:194:36: error: expected primary-expression before ‘int’
  194 |   int minpos = std::numeric_limits<int>::max();
      |                                    ^~~
/src/MinCollector.cpp: In member function ‘double MinCollector::get_mean_frag_len(bool) const’:
src/MinCollector.cpp:294:19: error: ‘numeric_limits’ is not a member of ‘std’
  294 |       return std::numeric_limits<double>::max();
      |                   ^~~~~~~~~~~~~~
/src/MinCollector.cpp:294:34: error: expected primary-expression before ‘double’
  294 |       return std::numeric_limits<double>::max();
      |                                  ^~~~~~
/src/MinCollector.cpp:294:34: error: expected ‘;’ before ‘double’
  294 |       return std::numeric_limits<double>::max();
      |                                  ^~~~~~
      |                                  ;
/src/MinCollector.cpp:294:40: error: expected unqualified-id before ‘>’ token
  294 |       return std::numeric_limits<double>::max();
      |                                        ^
make[2]: *** [src/CMakeFiles/kallisto_core.dir/build.make:202: src/CMakeFiles/kallisto_core.dir/MinCollector.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:128: src/CMakeFiles/kallisto_core.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants