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):
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.
Created attachment 705670 [details]
Patch to build using libtool for C++ shared library
This patch applies with git am.
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.
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.
What's the problem about just using the libtool-based build in Fedora? It works just fine, I'm using it...
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.
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.
Static libraries are strongly discouraged in Fedora and I'd like to eventually see the -static subpackage dropped.
I think building and including the shared library is the correct approach.
I added a configure option last weekend to address this; there's
some followup changes which will be in this week's patch.
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?
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.
ncurses-5.9-10.20130413.fc18 has been submitted as an update for Fedora 18.
ncurses-5.9-10.20130413.fc17 has been submitted as an update for Fedora 17.
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.
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.