s4hts / HTStream

A high throughput sequence read toolset using a streaming approach facilitated by Linux pipes
https://s4hts.github.io/HTStream/
Apache License 2.0
49 stars 9 forks source link

Version incorrect and CMAKE_PREFIX_PATH not working #242

Open najoshi opened 3 years ago

najoshi commented 3 years ago

I use the CMAKE_PREFIX_PATH option in cmake to install htstream into a non-default directory, but when I run "make install" it still tries to install the binaries in /usr/local/bin. Also, the version number is wrong for the 1.3.3 release in the help text for the binaries (It still says 1.3.2).

samhunter commented 3 years ago

You must have something up with your paths and/or another version installed.

I just tested it as follows:

cd ~ git clone https://github.com/s4hts/HTStream.git cd HTStream/ mkdir build cd build cmake -DBUILD_STATIC_BIN=ON -DCMAKE_INSTALL_PREFIX=./ .. make -j 3 make install ./bin/hts_AdapterTrimmer --version

shunter@HS:build$ ./bin/hts_AdapterTrimmer --version v1.3.3

msettles commented 3 years ago

Nik our system is "unique", as it so often, and the module load boost doesn't do the right thing or work, you need to do

module load cmake mkdir build cd build cmake -DCMAKE_INCLUDE_PATH=/software/boost/1.67/lssc0-linux/include -DCMAKE_LIBRARY_PATH=/software/boost/1.67/lssc0-linux/lib -DCMAKE_INSTALL_PREFIX=/share/biocore/software -DBUILD_STATIC_BIN=ON .. make -j 3 make install /share/biocore/software/bin/hts_AdapterTrimmer --version

(base) msettles@tadpole:/share/biocore/software/src/HTStream/build$ /share/biocore/software/bin/hts_AdapterTrimmer --version v1.3.3

najoshi commented 3 years ago

It's the source code tarball for 1.3.3 that I have problems with... when I git clone the repo, it works fine.

samhunter commented 3 years ago

Ugh.

The version is meant to be auto-detected based on the tag in the git repo. For example:

Scanning dependencies of target generateVersion
[ 22%] Generating always_rebuild
[ 23%] Configuring version.h
execute git version v1.3.3
[ 25%] generateVersion target
[ 25%] Built target generateVersion
[ 26%] Generating always_rebuild
[ 28%] Configuring version.h
execute git version v1.3.3

However, when you download the zip, it reports an error and pulls from a local file:

Scanning dependencies of target generateVersion
[ 22%] Generating always_rebuild
[ 23%] Configuring version.h
fatal: not a git repository (or any of the parent directories): .git
using release version
[ 25%] generateVersion target
[ 25%] Built target generateVersion
[ 26%] Generating always_rebuild
[ 28%] Configuring version.h
fatal: not a git repository (or any of the parent directories): .git
using release version

In theory some fixes @joe-angell made were meant to remove the need for updating a version file, but it looks like we will need to update the /HTStream-1.3.3/common/src/version.h.release file on new releases to support proper version numbers in the zip even with these fixes.

joe-angell commented 3 years ago

Yeah as part of the release process you need to update https://github.com/s4hts/HTStream/blob/master/common/src/version.h.release