Bug 911540

Summary: ncurses C++ dynamic library missing
Product: [Fedora] Fedora Reporter: Tim Niemueller <tim>
Component: ncursesAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 18CC: dickey, mlichvar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-18 13:52:49 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Attachments:
Description Flags
Patch to build using libtool for C++ shared library none

Description Tim Niemueller 2013-02-15 04:58:41 EST
Description of problem:
The ncurses-devel package comes with the C++ development header files. For the C++ wrapper, no dynamic library is built. Therefore, installing only ncurses-devel makes C++ wrapper builds fail, as the required library is missing. It is only available if ncurses-static is installed (which contains the static versions of the C++ wrapper libraries).


Version-Release number of selected component (if applicable):
ncurses-5.9-7.20121017.fc18.x86_64
ncurses-devel-5.9-7.20121017.fc18.x86_64


Additional info:
There are two ways to fix this. The preferred solution would be to patch the configure scripts to also build the dynamic libraries, properly package them, and remove the ncurses++ pkg-config file deletion from the spec file. Then the C++ wrapper would be a first-class citizen. Another option would be to make the -devel subpkg depend on the -static subpkg. And yet another option would be to bring back the c++-devel subpkg containing both, the static library and the C++ headers. Dropping the C++ support would be bad, as software can depend on it.
Comment 1 Tim Niemueller 2013-03-05 16:34:09 EST
Created attachment 705670 [details]
Patch to build using libtool for C++ shared library

This patch applies with git am.
Comment 2 Miroslav Lichvar 2013-03-06 03:36:30 EST
Thanks for the patch.

We can also ask the upstream maintainer if there are plans to build shared ncurses++ also in the non-libtool build.
Comment 3 Thomas E. Dickey 2013-03-06 06:59:25 EST
It's been neglected (a) since rules for building C++ shared libraries differ for various compilers and (b) there aren't a lot of users of the C++ binding.  (It's likely that libtool only works reliablyfor g++, which in this context isn't an argument about (a) - and making g++ work with shared libraries in the normal build is doable - will add it to my to-do list.
Comment 4 Tim Niemueller 2013-03-06 11:15:29 EST
What's the problem about just using the libtool-based build in Fedora? It works just fine, I'm using it...
Comment 5 Miroslav Lichvar 2013-03-06 11:34:06 EST
I'm not against using it, but I think it would be nice if the default build created shared ncurses++ too, perhaps more applications will be written for it if it's included in more distributions.

I'd like to keep the flags for parallel build though.
Comment 6 Tim Niemueller 2013-03-06 11:42:49 EST
Ok, I see and I agree. On Ubuntu they also only build the static library, but at least it's in the -dev package and comes with the pkg-config file (that this file is missing and deleted in the spec actually bothers me the most).

Plan B could be to re-introduce the ncurses-cpp-devel package that brings the required files and pulls in the static libraries. Though I'd still prefer a dynamic lib it would at least bring back the pkg-config file without always pulling in the static lib.
Comment 7 Miroslav Lichvar 2013-03-06 11:50:12 EST
Static libraries are strongly discouraged in Fedora and I'd like to eventually see the -static subpackage dropped.
http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries_2

I think building and including the shared library is the correct approach.
Comment 8 Thomas E. Dickey 2013-03-14 17:24:48 EDT
I added a configure option last weekend to address this; there's
some followup changes which will be in this week's patch.
Comment 9 Miroslav Lichvar 2013-03-18 13:52:49 EDT
Thanks. The shared C++ libs are now packaged in ncurses-5.9-9.20130316.fc19.

There was a small problem with RPATH being set in the C++ libs. Thomas, should LDFLAGS in the c++ Makefile.in include LOCAL_LDFLAGS?
Comment 10 Thomas E. Dickey 2013-03-19 06:41:51 EDT
no - I overlooked it.  That is needed for the demo program,
but should not be used for the library.  I'll work on this,
to separate the two uses.
Comment 11 Fedora Update System 2013-04-15 08:46:28 EDT
ncurses-5.9-10.20130413.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/ncurses-5.9-10.20130413.fc18
Comment 12 Fedora Update System 2013-04-15 09:03:53 EDT
ncurses-5.9-10.20130413.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/ncurses-5.9-10.20130413.fc17
Comment 13 Fedora Update System 2013-04-30 23:27:23 EDT
ncurses-5.9-10.20130413.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2013-04-30 23:34:04 EDT
ncurses-5.9-10.20130413.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.