Summary: | dev-lang/ocaml with sys-libs/ncurses[tinfo] - .../work/ocaml-4.00.1/byterun/terminfo.c:54: undefined reference to `tgetent' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Reinis Danne <rei4dan> |
Component: | [OLD] Development | Assignee: | Mark Wright <gienah> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | esigra, hyedad, jfostiguy, kentnl, kilian.sprotte, ralf, remexre, tv |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 457530 | ||
Attachments: |
ocaml-build.log.gz
ocaml-4.01.0-pkg-config-ncurses.patch files/ocaml-4.01.0-pkg-config-ncurses.patch |
Description
Reinis Danne
2013-02-27 13:20:36 UTC
Created attachment 340326 [details]
ocaml-build.log.gz
ocaml-4.01.0 also fails with ncurses use flag on amd64, a workaround is to add this sed in src_prepare(): sed -e 's@"-lcurses"@"-lncurses -ltinfo"@' -e 's@hasgot $libs@hasgot "$libs"@' -i "${S}/configure" || die "sed to fix ncurses failed" The 2nd chunk of the previous sed is unnecessary, this works: sed -e 's@"-lcurses"@"-lncurses -ltinfo"@' -i "${S}/configure" || die "sed to fix ncurses failed" *** Bug 486614 has been marked as a duplicate of this bug. *** For anyone trying to use this for the 3.12.1 version: the sed needs to go into src_unpack() since src_prepare() isn't used in that ebuild. Created attachment 368088 [details, diff]
ocaml-4.01.0-pkg-config-ncurses.patch
Patch (by me) to configure to call:
pkg-config --libs ncurses
to link to the correct libraries, which is -lncurse -ltinfo when ncurses is
built with the tinfo use flag and ocaml is built with the ncurses use flag.
I am applying the same patch to all versions currently in portage:
ocaml-3.11.2.ebuild
ocaml-3.12.1.ebuild
ocaml-4.00.1-r1.ebuild
ocaml-4.01.0.ebuild
(In reply to Mark Wright from comment #6) > Created attachment 368088 [details, diff] [details, diff] > ocaml-4.01.0-pkg-config-ncurses.patch i hope you plan to submit it upstream first The build system wants a termcap library. With sys-libs/ncurses[-tinfo] that's libncurses but with sys-libs/ncurses[tinfo] it's libtinfo, so the configure check should try to find a termcap library and rely on `pkg-config --libs ncurses'. Additionally, pkg-config should be called canonically (i.e. inherit toolchain-funcs.eclass and call `tc-export PKG_CONFIG' or a similar solution. Created attachment 387868 [details, diff]
files/ocaml-4.01.0-pkg-config-ncurses.patch
(In reply to Jeroen Roovers from comment #8) > configure check should try to find a termcap library and rely on `pkg-config > --libs ncurses'. /not/ rely on* Also, why is that patch called *-config-ncurses.patch when it's about tinfo? :) *** Bug 564762 has been marked as a duplicate of this bug. *** The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45d7b4d6d7c5e9f2ca1d742a53072f3a92cb5a91 commit 45d7b4d6d7c5e9f2ca1d742a53072f3a92cb5a91 Author: Lars Wendler <polynomial-c@gentoo.org> AuthorDate: 2019-03-22 09:46:07 +0000 Commit: Lars Wendler <polynomial-c@gentoo.org> CommitDate: 2019-03-22 10:05:26 +0000 dev-lang/ocaml: Fixed build with sys-libs/ncurses[tinfo] Closes: https://bugs.gentoo.org/459512 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> dev-lang/ocaml/files/ocaml-4.04.2-tinfo.patch | 13 +++++++++++++ dev-lang/ocaml/ocaml-4.04.2-r1.ebuild | 3 ++- dev-lang/ocaml/ocaml-4.05.0-r1.ebuild | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-) |