bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build error (lib not found) when configured with "debug" and "extra-


From: Thomas Dickey
Subject: Re: Build error (lib not found) when configured with "debug" and "extra-suffix"
Date: Sun, 3 Nov 2024 05:07:05 -0500

On Sun, Nov 03, 2024 at 04:27:51PM +0800, Kang-Che Sung wrote:
> Greetings ncurses developers.
> 
> I found out a build error can happen when I configure ncurses with
> --with-debug, --with-extra-suffix and --with-progs.
> 
> Script to reproduce:
> 
> (Tested in Ubuntu 22.04 Jammy in a GitHub Actions CI)
> 
> ```shell
> wget 
> 'https://invisible-island.net/archives/ncurses/current/ncurses-6.5-20241102.tgz'
> tar -x -f ncurses-6.5-20241102.tgz
> cd ncurses-6.5-20241102
> ./configure \
>   --prefix=/usr/local \
>   \
>   --with-progs \
>   --with-termlib \
>   \
>   --with-debug \
>   --without-profile \
>   --without-normal \
>   --without-shared \
>   --without-libtool \
>   \
>   --enable-widec \
>   --disable-reentrant \
>   --enable-lib-suffixes \
>   --with-extra-suffix=suffix
> make -k
> ```
> 
> Actual result:
> 
> Programs such as `tic`, `infocmp`, `clear`, `tabs`, `tput`, `tset` and
> `toe` will fail with the following error message.
> 
> ```text
> /usr/bin/ld: cannot find -lncursesw_gsuffix: No such file or directory
> /usr/bin/ld: cannot find -ltinfow_gsuffix: No such file or directory
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:277: tic] Error 1
> ```
> 
> Expected result: No link error, of course.
> 
> Actually I was trying to figure out the naming pattern of ncurses
> library files, when I tried configuring and building ncurses.
> With the configuration above, I did notice the files
> "libncurseswsuffix_g.a" and "libtinfowsuffix_g.a" were built.
> 
> But I was confused which naming pattern was intended by the
> developers: Was it "-lncurseswsuffix_g" or "-lncursesw_gsuffix" ?
> 
> (While I don't expect the developers would fix this weird build
> configuration, I do wish to know which naming was intended from
> the start.)

The "_g" has been kind of neglected, because (as far as I recall)
packagers don't use the debug option, but offhand, I'd expect the
"_g" on the end (matching the way the library files are built now).

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]