Open yanlinlin82 opened 4 years ago
https://github.com/samtools/samtools/pull/942 attempted to fix this, but apparently not well enough.
Did you build by just doing "make", or "./configure; make"? If the latter, is there anything about testing for ltinfo in your config. log output?
This is #940 once again. PR #942 was not applied as it was no longer needed for Conda. As there's no evidence of tinfo
shenanigans in upstream autoconf-archive's AX_WITH_CURSES
, one would think it is not needed for Gentoo (or any other distributions) either.
As per https://github.com/samtools/samtools/issues/940#issuecomment-418678823, @yanlinlin82: is the gentoo-provided libncurses.so on your system a real shared object (and if so what does ldd libncurses.so
say?) or a text file (and if so, what are its contents?)?
Gentoo's ncurses….ebuild suggests that it is doing the same linker script trick as other Linux distributions, so explicit tinfo
should be unnecessary. I tried reproducing this on Gentoo yesterday, but got bored on about step 3 of “obviously Gentoo users want to install their OS by hand”…
In the meantime on your system, configuring with ./configure LIBS=-ltinfo
should work.
Thank you very much!
I build by just doing "make". I tried again. "./configure; make" does solve the problem. In addition, I checked the difference between the two conditions. The success one uses link option '-lcrypto -lncursesw' instead of '-lcurses'.
Therefore, I guess this issue could be closed?
Running configure has had the opportunity to pick the right flavour of curses library for your system (-lncursesw
), while the non-configure default has a lowest common denominator flavour that works on many platforms but not yours.
The instructions in INSTALL note
[…] you may wish to omit configure and just type
make; make install
as for previous versions of samtools. However if the build fails you should run./configure
as it can diagnose the common reasons for build failures.
however this paragraph has got rather buried over the years. It might be worth considering emitting a Try again running ./configure first if this build fails message for non-configure builds; and this is another data point in the question of whether to retire non-configure samtools builds.
however this paragraph has got rather buried over the years. It might be worth considering emitting a Try again running ./configure first if this build fails message for non-configure builds; and this is another data point in the question of whether to retire non-configure samtools builds.
Agreed with your last bit. I favour the nuclear option here - ditch the non-configure build completely. Samtools / htslib is a clear outlier in having two alternative build strategies and it continues to generate issues such as this one which is both a waste of our time as well as our users.
I downloaded the latest source code package (
samtools-1.10.tar.bz2
, md5sum:506b0b9b2628e1f3bbedd77855b4c709
) and build it. It prompts the following error:I guess this problem could be solved by adding option '-ltinfo' at the final link step for 'samtools'.
By the way, I am using gcc-9.2.0: