public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Fergus Daly <fergusd84@outlook.com>
To: "'cygwin@cygwin.com'" <cygwin@cygwin.com>
Cc: "brian.inglis@shaw.ca" <brian.inglis@shaw.ca>,
	Fergus Daly <fergusd84@outlook.com>
Subject: RE: gcc v.11.3.0 failing - possible cause gcc or libreadline.a?
Date: Mon, 19 Dec 2022 12:13:04 +0000	[thread overview]
Message-ID: <DB6P18901MB005536CF7E1CC5B444889CA5A4E59@DB6P18901MB0055.EURP189.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <DB6P18901MB0055CB2FA11847A55C63B1B4A4E19@DB6P18901MB0055.EURP189.PROD.OUTLOOK.COM>

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

      parent reply	other threads:[~2022-12-19 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 10:42 Fergus Daly
2022-12-15  8:06 ` Fergus Daly
2022-12-17 22:40   ` Brian Inglis
2022-12-19 12:13   ` Fergus Daly [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB6P18901MB005536CF7E1CC5B444889CA5A4E59@DB6P18901MB0055.EURP189.PROD.OUTLOOK.COM \
    --to=fergusd84@outlook.com \
    --cc=brian.inglis@shaw.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).