Closed jlpoolen closed 5 months ago
It would seem it's already linking against libtinfo ... or libncurses is linked against libtinfo. Furthermore Debian has a libtinfo-dev package, but it's provided by libncurses-dev which needs to be installed anyhow to compile with ncurses. Thus it should be fairly safe to add.
@wiedehopf Commit https://github.com/wiedehopf/readsb/commit/75eddd7382f9889cdda107731e7cb340facd4d46 breaks building on Alpine Linux (there is no libtinfo)
pkg-config --libs ncurses
does this return something sensible on alpine?
Or just clone and make and see if that works @Dennis14e on debian it doesn't hurt and it should work on gentoo i assume ....
@wiedehopf Commit 75eddd7 breaks building on Alpine Linux (there is no libtinfo)
@Dennis14e can you provide the command line that breaks the build as well as the ensuing error message?
@jlpoolen
@Dennis14e can you provide the command line that breaks the build as well as the ensuing error message?
Command:
make readsb RTLSDR=yes BLADERF=yes HACKRF=yes SOAPYSDR=yes
Error:
28.38 /usr/lib/gcc/x86_64-alpine-linux-musl/13.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -ltinfo: No such file or directory
28.39 collect2: error: ld returned 1 exit status
28.39 make: *** [Makefile:158: readsb] Error 1
Oh you're using sid ... complicated.
But the build logic waits for dev to have a new commit?
Anyhow can you just kick off another bump on your project, i've already put the pkg-config thing.
I would not recommend using my sid branch @Dennis14e
#43 [linux/arm/v7 builder 4/7] RUN git clone -b sid https://github.com/wiedehopf/readsb.git . && git -c advice.detachedHead=false checkout 3e33c89fadca9f701219d7ad2b6aa1e75dd0b50b && mkdir patches
use dev or stale branch ... if you check for tags, probably best to just stick to dev.
Also it would seem pkg-config works nicely.
I attempted to build readsb in Gentoo and ran into this error:
I spent several hours tracking down what may be causing the problem in Gentoo. I then successfully built this project in Debian thereby confirming my suspicions that Gentoo's build of the ncurses library differed from Debian's. Gentoo's ncurses library has the symbol "stdscr" [The Standard Screen (https://manpages.org/stdscr/3)] undefined, see the "U" below. The fact that the symbol is undefined causes the linker to halt.
Compare with the symbol output from Debian's library where there follows an index, i.e. "@NCURSES6_TINFO_5.0.19991023":
I learned that is may be possible in Gentoo Linux that the ncurses library is broken out into two library files -- a fact which proved to be true.
The symbol, stdscr, is defined within library tinfo:
Using the command with the option "--libs", /usr/bin/ncurses6-config --libs, below, I was able to identify the missing library: tinfo.
Oddly enough, though, Debian indicates that the tinfo library should be referenced, too, but as we see below, it was not necessary to reference tinfo to cause readsb to successfully link:
Here's the linker command from my Debian build (with surrounding commands for context) showing that the "-ltinfo" was not included and thus not needed:
Accordingly, I took the link command that failed (above in the Gentoo console) and appended " -ltinfo" and ran same and the linker, and thus the build with "make", succeeded.
While my manual addition helped me successfully build the project, I leave this Issue open for @wiedehopf to close and/or consider further. I can see that my adding -ltinfo, there could be a risk of the linker aborting with "No such file or directory" if in that particular build of Debian the ncurses libraries are not split. I can see in Gentoo a package, were one built for readsb, to query "usr/bin/ncurses6-config --libs" and then assure the results are added to the linker command.