iontorrent / TS

Torrent Suite
Other
39 stars 14 forks source link

TMAP compiling problem #43

Closed alexyfyf closed 5 years ago

alexyfyf commented 6 years ago

Hi,

I followed the instructions step by step. When I come to compiling using

sh autogen.sh && ./configure && make

I get the error at the end.

src/map/tmap_map_driver.o: In function `tmap_map_driver_infer_pairing':
/persistent/home/fyan0011/software/TMAP/src/map/tmap_map_driver.c:630: undefined reference to `tmap_seq_get_bases_length'
/persistent/home/fyan0011/software/TMAP/src/map/tmap_map_driver.c:630: undefined reference to `tmap_seq_get_bases_length'
/persistent/home/fyan0011/software/TMAP/src/map/tmap_map_driver.c:641: undefined reference to `tmap_seq_get_bases_length'
/persistent/home/fyan0011/software/TMAP/src/map/tmap_map_driver.c:641: undefined reference to `tmap_seq_get_bases_length'
/persistent/home/fyan0011/software/TMAP/src/map/tmap_map_driver.c:642: undefined reference to `tmap_seq_get_bases_length'
src/map/tmap_map_driver.o:/persistent/home/fyan0011/software/TMAP/src/map/tmap_map_driver.c:642: more undefined references to `tmap_seq_get_bases_length' follow
collect2: error: ld returned 1 exit status
Makefile:1127: recipe for target 'tmap' failed
make[2]: *** [tmap] Error 1
make[2]: Leaving directory '/persistent/home/fyan0011/software/TMAP'
Makefile:1348: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/persistent/home/fyan0011/software/TMAP'
Makefile:632: recipe for target 'all' failed
make: *** [all] Error 2

There are a lot more lines up containing similar undefined warning. How can I fix this. My system is Ubuntu 16.04.3. GCC 5.4 and sse2 supported.

Thank you for the help.

djb17 commented 6 years ago

Also running into a the same compiling issue.

martaccmoreno commented 5 years ago

Installing TMAP can indeed be quite challenging. I believe that the documentation is somewhat outdated, because e.g. the instructions for TMAP ask you to clone a deprecated repository. My suggestion would be to compile the entire Analysis module for TS, which has the more up-to-date version of Torrent Suite software such as TMAP and TVC. I did it on a freshly installed Ubuntu 14.04 virtual machine as follows:

alexyfyf commented 5 years ago

@martaccmoreno Thank you, following your instruction I was able to build TS, but how can I run TMAP? I'm new to these compiling issues. Do I still need to run sh autogen.sh && ./configure && make? Thank you very much if you could help.

martaccmoreno commented 5 years ago

@alexyfyf No problem! So, after following the compilation steps above, you'll end up with a directory structure like this:

TS
│
└─── build
    │ 
    └─── Analysis
        │ 
        └─── TMAP                       

(ignoring directories irrelevant to our purpose)

Inside the TMAP directory, you'll find a tmap executable, which you can run by prefacing with a dot and forward slash. Assuming you are inside the TS directory:

$ cd build/Analysis/TMAP
$ ./tmap

Sometimes you may need to grant the file permission to execute on your machine, especially if you copy it around:

$ chmod +X tmap

To make it easier to run tmap from anywhere, you can add the path to this executable to your PATH via your .bashrc dot file. Assuming your TS directory is in your home directory, add the following to the end of .bashrc:

# Adds tmap executable to PATH
export PATH="$HOME/TS/build/Analysis/TMAP:$PATH"

And finally refresh the dot file by either closing and re-opening your terminal, or running source .bashrc. Now you can hopefully run tmap from anywhere by using the tmap command!

alexyfyf commented 5 years ago

Thank you so much @martaccmoreno , I think the author @ipan can add these instructions to the README page, it will definitely help people like me.