libirecovery
libirecovery copied to clipboard
failure to find functions in libreadline on compiling libirecovery (and fix)
Some distro's fail to compile libirecovery because ncurses is not compiled in (lib)readline. To fix this problem, edit the Makefile in the tools directory and add -lncurses to the line which includes -lreadline (note -LNCURSES in lower case) .The line should now read. AM_LDFLAGS = $(libusb_LIBS) -lreadline -lncurses
Thanks, could you please define "some distro's"? ;)
slackware (sorry for the delay in responding - i didn't get email from github) (maybe also arch and mint)
The problem is that readline does not provide a proper pkg-config file and must be manually detected. Let's call this a bug and fix it in configure.ac on occasion...
sorry for the bump, but i tested out this fix on Windows with MSYS2, and it worked perfectly!
perhaps there should be a conditional that if --disable-shared is passed to configure (or if -all-static is passed to LDFLAGS) it should statically link readline and ncurses. also i need to mention libwinpthread, so for Windows -lpthread should also be thrown in there too.
pthread is not required, the implementation uses windows native threads/API
i just found that out after testing, it's nice that it uses native API's.
plus it's even nicer to have a fully static build of irecovery.