On 13 Jul 2025, at 10:10, Fergus Daly via Cygwin <[email protected]> wrote:
> 
> Sorry - this is very person- rather than Cygwin-specific, but any insight 
> would be greatly appreciated.
> In Cygwin and for many years I have compiled an executable myx.exe from 
> source and then re-compiled it
> as the need arises when revised or new {source}/*.c occur.
> After creating the archive myx0.a the key gcc command line is
> $ gcc -w -static -o myx -O3 ./myx0.a -lreadline -lncurses -lm
> This worked flawlessly up to and including readline-8.1.2 but failed with 
> 8.2.2 and this week's latest update to 8.3.1.

What's the exact error message you are getting?


> To get the compilation to work it is (thank Goodness) not necessary to revert 
> entirely to 8.1.2. I simply
> temporarily utilise the single previous file /lib/libreadline.a and then 
> recover the current version. So the key
> command now reads (3 lines not 1)
> $ cp -v /lib/libreadline.8.1.2.a /lib/libreadline.a            # grab the old 
> working file                  
> $ gcc -w -static -o sc -O3 ./clib.a -lreadline -lncurses -lm  # i.e. UNCHANGED
> $ cp -v /lib/libreadline.8.3.1.a /lib/libreadline.a            # recover the 
> current file
> But I don't much like messing about within /lib/ and would like to avoid this 
> intrusion if I can.

Instead of doing this, it might be handier to figure out what the root cause of 
the failure is. In this particular case, I think the newer version of 
libreadline requires some additional libraries to be passed on the link command 
line, at least for static linking.

-Dimitry


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to