public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gcc v.11.3.0 failing - possible cause gcc or libreadline.a?
@ 2022-12-14 10:42 Fergus Daly
  2022-12-15  8:06 ` Fergus Daly
  0 siblings, 1 reply; 4+ messages in thread
From: Fergus Daly @ 2022-12-14 10:42 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'; +Cc: Fergus Daly

In a gcc build script terminating with the instruction
    gcc -w -static -o myexe -O3 ./myarchive.a -lreadline -lncurses -lm
I have suddenly started getting very many instances of both of
    ld: /usr/src/debug/readline-8.2-2/terminal.c:nn various: undefined reference to `{various}'
    ld: /usr/src/debug/readline-8.2-2/display.c:nn various: undefined reference to `{various}'
and the build fails.
It's a while since I attempted this build of myexe (myarchive has been unaltered for years) and the attempt is triggered by a reported bug in gcc -pg after update that has been corrected.
I don't know whether it is a change in readline (libreadline.a) or gcc that has possibly caused the glitch (and obviously I cannot and do not expect anybody to debug my build for me) but is this glitch familiar to anybody through current or previous experience, or by appearance, that means you could point to cause or possible cause?
Thank you!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: gcc v.11.3.0 failing - possible cause gcc or libreadline.a?
  2022-12-14 10:42 gcc v.11.3.0 failing - possible cause gcc or libreadline.a? Fergus Daly
@ 2022-12-15  8:06 ` Fergus Daly
  2022-12-17 22:40   ` Brian Inglis
  2022-12-19 12:13   ` Fergus Daly
  0 siblings, 2 replies; 4+ messages in thread
From: Fergus Daly @ 2022-12-15  8:06 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'

>> In a gcc build script terminating with the instruction
>>     gcc -w -static -o myexe -O3 ./myarchive.a -lreadline -lncurses -lm
>> I have suddenly started getting very many instances of both of
>>     ld: /usr/src/debug/readline-8.2-2/terminal.c:nn various: undefined reference to `{various}'
>>     ld: /usr/src/debug/readline-8.2-2/display.c:nn various: undefined reference to `{various}'
>> and the build fails.

The problem was with readline not gcc
and I assume originates in myarchive.a and the required switch -lreadline in the gcc line
rather than in readline: nevertheless I reverted both libreadline-devel and libreadline7
from 8.22 to 7.03 and the problem went away.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: gcc v.11.3.0 failing - possible cause gcc or libreadline.a?
  2022-12-15  8:06 ` Fergus Daly
@ 2022-12-17 22:40   ` Brian Inglis
  2022-12-19 12:13   ` Fergus Daly
  1 sibling, 0 replies; 4+ messages in thread
From: Brian Inglis @ 2022-12-17 22:40 UTC (permalink / raw)
  To: cygwin

On Thu, 15 Dec 2022 08:06:01 +0000, Fergus Daly wrote:
>>> In a gcc build script terminating with the instruction
>>>     gcc -w -static -o myexe -O3 ./myarchive.a -lreadline -lncurses -lm
>>> I have suddenly started getting very many instances of both of
>>>     ld: /usr/src/debug/readline-8.2-2/terminal.c:nn various: undefined reference to `{various}'
>>>     ld: /usr/src/debug/readline-8.2-2/display.c:nn various: undefined reference to `{various}'
>>> and the build fails.

> The problem was with readline not gcc
> and I assume originates in myarchive.a and the required switch -lreadline in the gcc line
> rather than in readline: nevertheless I reverted both libreadline-devel and libreadline7
> from 8.2-2 to 7.03 and the problem went away.

Please provide a few examples which include the actual texts of "nn various" and 
`{various}' especially where any prefixes vary.

Did you also upgrade/downgrade libncurses-devel concurrent with 
libreadline-devel as they are dependent?

Why suppress all warnings -w from the ld (or any) phase of compilation?
Those warnings could tell you what causes an issue.

-- 
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry

-- 
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry

-- 
Take care. Thanks, Brian Inglis			Calgary, Alberta, Canada

La perfection est atteinte			Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter	not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer	but when there is no more to cut
			-- Antoine de Saint-Exupéry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: gcc v.11.3.0 failing - possible cause gcc or libreadline.a?
  2022-12-15  8:06 ` Fergus Daly
  2022-12-17 22:40   ` Brian Inglis
@ 2022-12-19 12:13   ` Fergus Daly
  1 sibling, 0 replies; 4+ messages in thread
From: Fergus Daly @ 2022-12-19 12:13 UTC (permalink / raw)
  To: 'cygwin@cygwin.com'; +Cc: brian.inglis, Fergus Daly

[-- Attachment #1: Type: text/plain, Size: 1868 bytes --]

>>>  In a gcc build script terminating with the instruction
>>>      gcc -w -static -o myexe -O3 ./myarchive.a -lreadline -lncurses -lm
>>>  I have suddenly started getting very many instances of both of
>>>      ld: /usr/src/debug/readline-8.2-2/terminal.c:nn various: undefined reference to `{various}'
>>>      ld: /usr/src/debug/readline-8.2-2/display.c:nn various: undefined reference to `{various}'
>>>  and the build fails.

>> The problem was with readline not gcc
>> and I assume originates in myarchive.a and the required switch -lreadline in the gcc line
>> rather than in readline: nevertheless I reverted both libreadline-devel and libreadline7
>> from 8.2-2 to 7.03 and the problem went away.

> Please provide a few examples which include the actual texts of "nn various" and 
> `{various}' especially where any prefixes vary.
> Did you also upgrade/downgrade libncurses-devel concurrent with 
> libreadline-devel as they are dependent?
> Why suppress all warnings -w from the ld (or any) phase of compilation?
> Those warnings could tell you what causes an issue.

No I didn't upgrade / downgrade libncurses-devel concurrently with libreadline-devel.
In fact after upgrading back to 8.2-2 and confirming the failed build I retained all current and up-to-date
and made _just_one_change_: I extracted the single file libreadline.a from libreadline-devel-8.1-2.tar.xz
(i.e. just one reversion to 8.1 not two to 7.0) and substituted it in place leaving everything else as for 8.2-2
including libreadline.dll.a and confirmed that this single substitution allowed the build. 

I suppress the warnings because there are so many of them! I can supply them but for the moment the issues
that prevent a successful build using libreadline.a (8.2-2) are listed in the attached text file.

Thank you very much for taking an interest.


[-- Attachment #2: 4444 --]
[-- Type: application/octet-stream, Size: 7952 bytes --]

/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(display.o): in function `_rl_move_cursor_relative':
/usr/src/debug/readline-8.2-2/display.c:2839: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(display.o): in function `_rl_move_vert':
/usr/src/debug/readline-8.2-2/display.c:2893: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(display.o): in function `_rl_clear_to_eol':
/usr/src/debug/readline-8.2-2/display.c:3199: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/display.c:3199: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(display.o): in function `open_some_spaces':
/usr/src/debug/readline-8.2-2/display.c:3258: undefined reference to `__imp_tgoto'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/display.c:3259: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(display.o): in function `delete_chars':
/usr/src/debug/readline-8.2-2/display.c:3300: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(display.o): in function `open_some_spaces':
/usr/src/debug/readline-8.2-2/display.c:3277: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(display.o): in function `delete_chars':
/usr/src/debug/readline-8.2-2/display.c:3294: undefined reference to `__imp_tgoto'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/display.c:3295: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(display.o): in function `open_some_spaces':
/usr/src/debug/readline-8.2-2/display.c:3263: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(display.o): in function `_rl_clear_screen':
/usr/src/debug/readline-8.2-2/display.c:3228: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(display.o): in function `_rl_clear_to_eol':
/usr/src/debug/readline-8.2-2/display.c:3199: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/display.c:3199: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_get_screen_size':
/usr/src/debug/readline-8.2-2/terminal.c:303: undefined reference to `__imp_tgetnum'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/terminal.c:322: undefined reference to `__imp_tgetnum'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_backspace':
/usr/src/debug/readline-8.2-2/terminal.c:723: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_cr':
/usr/src/debug/readline-8.2-2/terminal.c:750: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `rl_ding':
/usr/src/debug/readline-8.2-2/terminal.c:771: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_standout_on':
/usr/src/debug/readline-8.2-2/terminal.c:797: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_standout_off':
/usr/src/debug/readline-8.2-2/terminal.c:806: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_init_terminal_io':
/usr/src/debug/readline-8.2-2/terminal.c:580: undefined reference to `__imp_PC'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/terminal.c:581: undefined reference to `__imp_BC'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/terminal.c:582: undefined reference to `__imp_UP'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/terminal.c:523: undefined reference to `__imp_tgetent'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/terminal.c:526: undefined reference to `__imp_tgetstr'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/terminal.c:591: undefined reference to `__imp_PC'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/terminal.c:592: undefined reference to `__imp_BC'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/terminal.c:593: undefined reference to `__imp_UP'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/src/debug/readline-8.2-2/terminal.c:598: undefined reference to `__imp_tgetflag'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_region_color_on':
/usr/src/debug/readline-8.2-2/terminal.c:858: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_region_color_off':
/usr/src/debug/readline-8.2-2/terminal.c:867: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_enable_meta_key':
/usr/src/debug/readline-8.2-2/terminal.c:885: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_disable_meta_key':
/usr/src/debug/readline-8.2-2/terminal.c:897: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o): in function `_rl_control_keypad':
/usr/src/debug/readline-8.2-2/terminal.c:910: undefined reference to `__imp_tputs'
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: /usr/lib/gcc/x86_64-pc-cygwin/11/../../../../lib/libreadline.a(terminal.o):/usr/src/debug/readline-8.2-2/terminal.c:933: more undefined references to `__imp_tputs' follow

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-19 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14 10:42 gcc v.11.3.0 failing - possible cause gcc or libreadline.a? Fergus Daly
2022-12-15  8:06 ` Fergus Daly
2022-12-17 22:40   ` Brian Inglis
2022-12-19 12:13   ` Fergus Daly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).