gmarcais / Jellyfish

A fast multi-threaded k-mer counter
Other
471 stars 136 forks source link

[2.2.3] Installation error (No rule to make target `python/swig_wrap.cpp') #46

Closed yk-tanigawa closed 9 years ago

yk-tanigawa commented 9 years ago

Hi, thank you very much for developing this awesome software. I tried this program on my laptop, and am satisfied by the python-binding function. I am now trying to install it with python-binding on server.

I encountered an installation error by using the latest release of tarball. I executed the command as you instructed.

wget -O - "https://github.com/gmarcais/Jellyfish/archive/v2.2.3.tar.gz" | tar xzvf -
cd Jellyfish-2.2.3/
$HOME/bin/autoreconf -i
./configure --prefix=$HOME --enable-python-binding=$HOME/bin/python
make

Then, I encountered the following error massage.

Making all in swig
make[2]: Entering directory `/home/yt/Jellyfish-2.2.3/swig'
make[2]: *** No rule to make target `python/swig_wrap.cpp', needed by `all'.  Stop.
make[2]: Leaving directory `/home/yt/Jellyfish-2.2.3/swig'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/yt/Jellyfish-2.2.3'
make: *** [all] Error 2

I think I have a proper version of g++/make/yaggo/autoconf/autoreconf as follows.

g++ --version
g++ (GCC) 4.9.3
make --version
GNU Make 3.81
yaggo --version
yaggo 1.5.8
$HOME/bin/autoconf --version
autoconf (GNU Autoconf) 2.69

I would be very happy if you could help me to install your awesome software. Thank you in advance.

gmarcais commented 9 years ago

Hi

please try again with v2.2.4. It should solve you problems.

yk-tanigawa commented 9 years ago

Thank you for your swift reply. It doesn't work.

$ make
YAGGO    sub_commands/count_main_cmdline.hpp
YAGGO    sub_commands/info_main_cmdline.hpp
YAGGO    sub_commands/dump_main_cmdline.hpp
YAGGO    sub_commands/histo_main_cmdline.hpp
YAGGO    sub_commands/stats_main_cmdline.hpp
YAGGO    sub_commands/merge_main_cmdline.hpp
YAGGO    sub_commands/bc_main_cmdline.hpp
YAGGO    sub_commands/query_main_cmdline.hpp
YAGGO    sub_commands/cite_main_cmdline.hpp
YAGGO    sub_commands/mem_main_cmdline.hpp
YAGGO    jellyfish/generate_sequence_cmdline.hpp
YAGGO    unit_tests/test_main_cmdline.hpp
make: *** No rule to make target `swig/python/swig_wrap.cpp', needed by `all'.  Stop.
gmarcais commented 9 years ago

Sorry, but the snippet you show does not make sense. If you are starting from the release tar ball, then Yaggo should not run. Also, I checked the latest release, it does indeed contain the file swig/python/swig_wrap.cc:

% wget -O - https://github.com/gmarcais/Jellyfish/releases/download/v2.2.4/jellyfish-2.2.4.tar.gz | tar ztf | grep swig_wrap.cpp
jellyfish-2.2.4/swig/perl5/swig_wrap.cpp
jellyfish-2.2.4/swig/python/swig_wrap.cpp
jellyfish-2.2.4/swig/ruby/swig_wrap.cpp

Looking back at your original post, given that you are using the release tar ball, you don't need yaggo, nor autoconf/automake. Compile like this (the -j4 is to go a little faster:)

wget -O - "https://github.com/gmarcais/Jellyfish/archive/v2.2.4.tar.gz" | tar xzvf -
cd Jellyfish-2.2.4/
./configure --prefix=$HOME --enable-python-binding
make -j 4
make install

To use the python extension, you must set your PYTHONPATH properly. In your $HOME, it created a directory like $HOME/lib/python2.7/site-packages (you can see a message to that effect at the end of the output of make install). Add this directory to your environment PYTHONPATH.

yk-tanigawa commented 9 years ago

The reason why I used autoreconf is that there is no configure program in tarball. This may explain why yaggo runs in my environment.

wget -O - "https://github.com/gmarcais/Jellyfish/archive/v2.2.4.tar.gz" | tar xzvf -
find Jellyfish-2.2.4/ -name 'configure'
cd Jellyfish-2.2.4/
./configure --prefix=$HOME --enable-python-binding
-bash: ./configure: No such file or directory

Also, I surely exported PYTHONPATH to the shell environment. The problem is in the Makefile, I guess.

make: *** No rule to make target `swig/python/swig_wrap.cpp', needed by `all'.  Stop.

This massage says there is no RULE to compile swig_wrap.cpp, and do not states that there are no FILE. What do you think?

gmarcais commented 9 years ago

Please, use this link:

https://github.com/gmarcais/Jellyfish/releases/download/v2.2.4/jellyfish-2.2.4.tar.gz

yk-tanigawa commented 9 years ago

Thank you. It seems like that I encountered a different kind of error.

$ export PYTHONPATH=/home/yt/lib/python2.7/site-packages
$ make -j
make  all-am
make[1]: Entering directory `/home/yt/jellyfish-2.2.4'
  PYTHONC  swig/python/__init__.pyc
  CXX      lib/rectangular_binary_matrix.lo
  CXX      lib/mer_dna.lo
  CXX      lib/storage.lo
  CXX      lib/allocators_mmap.lo
  CXX      lib/misc.lo
  CXX      lib/thread_exec.lo
  CXX      lib/int128.lo
  CXX      lib/time.lo
  CXX      lib/generator_manager.lo
  CXX      lib/jsoncpp.lo
  CXX      sub_commands/jellyfish.o
  CXX      swig/python/swig_python__jellyfish_la-swig_wrap.lo
  CXX      sub_commands/count_main.o
  CXX      sub_commands/info_main.o
  CXX      sub_commands/histo_main.o
  CXX      sub_commands/dump_main.o
  CXX      sub_commands/stats_main.o
  CXX      sub_commands/bc_main.o
  CXX      sub_commands/query_main.o
  CXX      sub_commands/merge_main.o
  CXX      sub_commands/cite_main.o
  CXX      sub_commands/mem_main.o
  CXX      jellyfish/merge_files.o
  CXXLD    libjellyfish-2.0.la
  CXXLD    bin/jellyfish
  CXXLD    swig/python/_jellyfish.la
libtool: link: warning: `/bio/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/../../../../lib64/libstdc++.la' seems to be moved
gmarcais commented 9 years ago

I have never seen this warning before. I don't think it is due to Jellyfish per say, but rather on how gcc was installed on your system. (was it copied over with cp instead of properly installed with make install?)

That said, it is only a warning. It may still work. Please run make install and test.

yk-tanigawa commented 9 years ago

I am so sorry. It works. I misunderstood the warning massage as an error massage.

Now I can use Jellyfish.

Thank you very much for helpful support.