libirecovery icon indicating copy to clipboard operation
libirecovery copied to clipboard

failure to find functions in libreadline on compiling libirecovery (and fix)

Open timsoftgit opened this issue 10 years ago • 6 comments

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

timsoftgit avatar Aug 26 '14 10:08 timsoftgit

Thanks, could you please define "some distro's"? ;)

FunkyM avatar Oct 30 '14 21:10 FunkyM

slackware (sorry for the delay in responding - i didn't get email from github) (maybe also arch and mint)

timsoftgit avatar Sep 06 '15 18:09 timsoftgit

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...

FunkyM avatar Sep 25 '15 02:09 FunkyM

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.

DanTheMann15 avatar Nov 30 '20 18:11 DanTheMann15

pthread is not required, the implementation uses windows native threads/API

nikias avatar Nov 30 '20 20:11 nikias

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.

DanTheMann15 avatar Dec 05 '20 20:12 DanTheMann15