gcc v.11.3.0 failing - possible cause gcc or libreadline.a?

Brian Inglis Brian.Inglis@Shaw.ca
Sat Dec 17 22:40:02 GMT 2022


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


More information about the Cygwin mailing list