From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 16722 invoked from network); 25 Apr 2020 10:25:12 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with UTF8ESMTPZ; 25 Apr 2020 10:25:12 -0000 Received: (qmail 10959 invoked by alias); 25 Apr 2020 10:25:06 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45720 Received: (qmail 6795 invoked by uid 1010); 25 Apr 2020 10:25:06 -0000 X-Qmail-Scanner-Diagnostics: from out5-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25786. spamassassin: 3.4.4. Clear:RC:0(66.111.4.29):SA:0(-2.6/5.0):. Processed in 0.740824 secs); 25 Apr 2020 10:25:06 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrheeggddtfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkjghfofggtgfgsehtqhdttdertdejnecuhfhrohhmpeffrghnihgv lhcuufhhrghhrghfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenuc fkphepjeelrddukedtrddufedtrddugeejnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepugdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmh gv X-ME-Proxy: Date: Sat, 25 Apr 2020 10:24:28 +0000 From: Daniel Shahaf To: Lars Wendler Cc: zsh-workers@zsh.org, Tetja Rediske Subject: Re: [PATCH] configure.ac: check for has_colors symbol in curses lib Message-ID: <20200425102428.5dd463d4@tarpaulin.shahaf.local2> In-Reply-To: <20200425094951.72c54088@tarpaulin.shahaf.local2> References: <20191211155507.22181-1-polynomial-c@gentoo.org> <20200425094951.72c54088@tarpaulin.shahaf.local2> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Daniel Shahaf wrote on Sat, 25 Apr 2020 09:49 +0000: > Lars Wendler wrote on Wed, 11 Dec 2019 16:55 +0100: > > Otherwise zsh/curses module won't get built if ncurses was built with > > separate tinfo lib. > > One could still force-build the module but loading it later yields the > > following error message: > >=20 > > failed to load module `zsh/curses': /usr/lib64/zsh/5.7.1/zsh/curses.s= o: > > undefined symbol: COLORS > >=20 > > That is because the final linker call requires -lncurses(w) but it only > > contains -ltinfo(w). > > =20 >=20 > I can't reproduce the problem. >=20 > I'm on Debian buster. The ncurses package is built with =C2=AB--with-ter= mlib=3Dtinfo=C2=BB. > On my system libncursesw.so.6 and libtinfo.so.6 are both installed, and > the function =C2=ABhas_colors=C2=BB is provided by libncursesw.so.6. How= ever, on > my machine the zsh/curses module is built successfully and the > tetriscurses function (in the zsh distribution) works =E2=80=94 in plain > master, without your patch. >=20 > I build with: >=20 > CONFIG_SHELL=3D/bin/dash /path/to/zsh/configure -q --enable-zsh-debug= --with-term-lib=3D"tinfo" --prefix=3D=E2=80=A6 > perl -pi -e 's/link=3Ddynamic/link=3Dstatic/g; if (/link=3Dstatic/) {= s/auto=3Dyes/auto=3Dno/ }' config.modules Relevant config.log excerpt: [[[ configure:6182: checking for clock_gettime in -lrt configure:6207: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -lrt -lm -lc >&5 configure:6207: $? =3D 0 configure:6216: result: yes configure:6241: checking for library containing tigetstr configure:6272: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -lrt -lm -lc >&5 /usr/bin/ld: /tmp/conftest-e1b3ec.o: in function `main': /tmp/zsh/conftest.c:91: undefined reference to `tigetstr' clang: error: linker command failed with exit code 1 (use -v to see invocat= ion) configure:6272: $? =3D 1 configure: failed program was: configure:6272: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -ltinfo -lrt -lm -lc >&5 configure:6272: $? =3D 0 configure:6289: result: -ltinfo configure:6313: checking if _XOPEN_SOURCE_EXTENDED should not be defined configure:6327: result: no configure:6335: checking for library containing tigetstr configure:6383: result: -ltinfo configure:6391: checking for library containing tigetflag configure:6422: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -ltinfo -ltinfo -lrt -lm -lc >&5 configure:6422: $? =3D 0 configure:6439: result: none required configure:6447: checking for library containing tgetent configure:6478: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -ltinfo -ltinfo -lrt -lm -lc >&5 configure:6478: $? =3D 0 configure:6495: result: none required configure:6513: checking curses.h usability configure:6513: cc -c -Wall -Wmissing-prototypes -ggdb conftest.c >&5 configure:6513: $? =3D 0 configure:6513: result: yes configure:6513: checking curses.h presence configure:6513: cc -E conftest.c configure:6513: $? =3D 0 configure:6513: result: yes configure:6513: checking for curses.h configure:6513: result: yes configure:6556: checking if we need to ignore ncurses configure:6574: checking for library containing tigetstr configure:6605: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -ltinfo -lrt -lm -lc >&5 configure:6605: $? =3D 0 configure:6622: result: none required configure:6630: checking for library containing tigetnum configure:6661: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -ltinfo -lrt -lm -lc >&5 configure:6661: $? =3D 0 configure:6678: result: none required configure:6686: checking for library containing tigetflag configure:6717: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -ltinfo -lrt -lm -lc >&5 configure:6717: $? =3D 0 configure:6734: result: none required configure:6742: checking for library containing tgetent configure:6773: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -ltinfo -lrt -lm -lc >&5 configure:6773: $? =3D 0 configure:6790: result: none required configure:6811: checking for library containing initscr configure:6842: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -ltinfo -ltinfo -lrt -lm -lc >&5 /usr/bin/ld: /tmp/conftest-b582c6.o: in function `main': /tmp/zsh/conftest.c:92: undefined reference to `initscr' clang: error: linker command failed with exit code 1 (use -v to see invocat= ion) configure:6842: $? =3D 1 configure:6842: cc -o conftest -Wall -Wmissing-prototypes -ggdb -g confte= st.c -lncursesw -ltinfo -ltinfo -lrt -lm -lc >&5 configure:6842: $? =3D 0 configure:6859: result: -lncursesw configure:6879: result: no configure:6882: checking for library containing getpwnam ]]]