Opened 12 years ago
Closed 12 years ago
#37420 closed defect (fixed)
ncurses: snow leopard binary missing pkgconfig files
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | jmroot (Joshua Root) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | haspatch | Cc: | Christoph.Ender@…, cooljeanius (Eric Gallager) |
Port: | ncurses |
Description
fizmo doesn't build on the Snow Leopard buildbot. Here's the log from 0.7.6 but it's been happening for several versions:
During the configure phase it says:
checking for ncursesw... no checking for /usr/include/ncurses.h... yes checking for libncuresw in /usr/lib... no checking for libncuresw in /usr/local/lib... no checking for libncuresw in /opt/local/lib... no Could not find libncursesw. Try setting the location using --with-ncursesw-libdir.
For one thing, there is a typo in the message ("libncuresw" should be "libncursesw").
But even ignoring that, this is peculiar since libncursesw should be there; there should be no difference in ncursesw in MacPorts between versions of OS X, and it builds fine on the Lion and Mountain Lion buildbots, which simply say:
checking for ncursesw... yes
It also builds fine for me on my Snow Leopard, Lion and Mountain Lion test machines.
The suggestion the configure script gives—to set --with-ncursesw-libdir (and presumably --with-ncursesw-includedir)—shouldn't be necessary because my understanding is that "checking for ncursesw" means "checking for ncursesw using pkgconfig" and pkgconfig should be giving the correct answer. But for some reason on the Snow Leopard buildbot it's not. It makes me think there's a problem with the pre-built pkgconfig or ncurses binary for Snow Leopard. (I build from source on my test machine instead of using the binaries.) I wish we had access to the work directory on the buildbot so that we could read the config.log; unfortunately we don't.
Oddly neither of those ncursesw configure options are listed in ./configure --help
; if they are valid options they should be listed there.
Another problem is that the fizmo configure script still exits with the code 0 even though this problem occurred, so MacPorts tries to proceed to the build phase, which fails with:
make: *** No rule to make target `all'. Stop.
I'm also not sure why the code in config-libs.m4 that checks for ncursesw is trying to include jpeglib.h; that seems like a copy-pasto.
for dir in $with_ncursesw_libdir /usr/lib /usr/local/lib /opt/local/lib ; do AC_MSG_CHECKING(for libncuresw in $dir) LDFLAGS="-L$dir" AC_TRY_LINK( [#include <stdio.h> #include <ncurses.h> #include "$ncursesw_h_dir/jpeglib.h"], [initscr();], [AC_MSG_RESULT(yes) ncursesw_l_dir=$dir break], [AC_MSG_RESULT(no)]) done
Attachments (1)
Change History (12)
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 follow-up: 3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | Christoph.Ender@… added |
---|---|
Owner: | changed from Christoph.Ender@… to jmr@… |
Port: | ncurses added; fizmo removed |
Summary: | fizmo: Could not find libncursesw → ncurses: snow leopard binary missing pkgconfig files |
Yes, that's it. The ncurses package ncurses-5.9_1.darwin_10.x86_64.tbz2 is missing all the pkgconfig .pc files. All the "w" symlinks are there, but the real files they're supposed to point to are missing. This is all that's in that package's opt/local/lib/pkgconfig directory:
lrwxr-xr-x@ 1 rschmidt rschmidt 7 Aug 1 2011 formw.pc -> form.pc lrwxr-xr-x@ 1 rschmidt rschmidt 7 Aug 1 2011 menuw.pc -> menu.pc lrwxr-xr-x@ 1 rschmidt rschmidt 12 Aug 1 2011 ncurses++w.pc -> ncurses++.pc lrwxr-xr-x@ 1 rschmidt rschmidt 10 Aug 1 2011 ncursesw.pc -> ncurses.pc lrwxr-xr-x@ 1 rschmidt rschmidt 8 Aug 1 2011 panelw.pc -> panel.pc
The package ncurses-5.9_0+universal.darwin_10.i386-x86_64.tbz2 is also affected.
This problem is not present in the other packages; I checked all of these which were fine:
- ncurses-5.9_0.darwin_10.x86_64.tbz2
- ncurses-5.9_1+universal.darwin_10.i386-x86_64.tbz2
- ncurses-5.9_1+universal.darwin_11.i386-x86_64.tbz2
- ncurses-5.9_1+universal.darwin_12.i386-x86_64.tbz2
- ncurses-5.9_1.darwin_11.x86_64.tbz2
- ncurses-5.9_1.darwin_12.x86_64.tbz2
comment:3 Changed 12 years ago by angelo.graziosi@…
Ciao Ryan,
Replying to ryandesign@…:
Yes, that's it. The ncurses package ncurses-5.9_1.darwin_10.x86_64.tbz2 is missing all the pkgconfig .pc files. All the "w" symlinks are there, but the real files they're supposed to point to are missing. This is all that's in that package's opt/local/lib/pkgconfig directory:
lrwxr-xr-x@ 1 rschmidt rschmidt 7 Aug 1 2011 formw.pc -> form.pc lrwxr-xr-x@ 1 rschmidt rschmidt 7 Aug 1 2011 menuw.pc -> menu.pc lrwxr-xr-x@ 1 rschmidt rschmidt 12 Aug 1 2011 ncurses++w.pc -> ncurses++.pc lrwxr-xr-x@ 1 rschmidt rschmidt 10 Aug 1 2011 ncursesw.pc -> ncurses.pc lrwxr-xr-x@ 1 rschmidt rschmidt 8 Aug 1 2011 panelw.pc -> panel.pcThe package ncurses-5.9_0+universal.darwin_10.i386-x86_64.tbz2 is also affected.
This problem is not present in the other packages; I checked all of these which were fine:
hmm...
I have Lion
$ uname -a Darwin MacBookPro 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
with
$ port installed | grep curs ncurses @5.9_1 (active) ncursesw @5.8_0 (active) xorg-libXcursor @1.1.13_0 (active)
but
$ ls -lrt /opt/local/lib/pkgconfig/form* lrwxr-xr-x 1 root admin 7 28 Dic 2011 /opt/local/lib/pkgconfig/formw.pc -> form.pc $ ls -lrt /opt/local/lib/pkgconfig/men* lrwxr-xr-x 1 root admin 7 28 Dic 2011 /opt/local/lib/pkgconfig/menuw.pc -> menu.pc $ ls -lrt /opt/local/lib/pkgconfig/ncurs* lrwxr-xr-x 1 root admin 10 28 Dic 2011 /opt/local/lib/pkgconfig/ncursesw.pc -> ncurses.pc lrwxr-xr-x 1 root admin 12 28 Dic 2011 /opt/local/lib/pkgconfig/ncurses++w.pc -> ncurses++.pc $ ls -lrt /opt/local/lib/pkgconfig/pane* lrwxr-xr-x 1 root admin 8 28 Dic 2011 /opt/local/lib/pkgconfig/panelw.pc -> panel.pc
It seems that on Lion (10.7.5+Xcode 4.5.2) I have only the links installed not the true files...
Is this right?
How to fix this?
BTW, is this problem related to this ticket : #36684?
If you remember, in my case building emacs-app from source failed because problems in configuring with ncurses...
Ciao, Angelo.
- ncurses-5.9_0.darwin_10.x86_64.tbz2
- ncurses-5.9_1+universal.darwin_10.i386-x86_64.tbz2
- ncurses-5.9_1+universal.darwin_11.i386-x86_64.tbz2
- ncurses-5.9_1+universal.darwin_12.i386-x86_64.tbz2
- ncurses-5.9_1.darwin_11.x86_64.tbz2
- ncurses-5.9_1.darwin_12.x86_64.tbz2
comment:4 follow-up: 5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
ncurses' configure.in says:
# if we find pkg-config, check if we should install the ".pc" files. CF_PKG_CONFIG if test "$PKG_CONFIG" != no ; then AC_MSG_CHECKING(if we should install .pc files for $PKG_CONFIG) # Leave this as something that can be overridden in the environment. if test -z "$PKG_CONFIG_LIBDIR" ; then PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig fi PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'` if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then AC_ARG_ENABLE(pc-files, [ --enable-pc-files generate and install .pc files for pkg-config], [enable_pc_files=$enableval], [enable_pc_files=no]) AC_MSG_RESULT($enable_pc_files) else AC_MSG_RESULT(no) AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR) enable_pc_files=no fi fi AC_SUBST(PKG_CONFIG_LIBDIR)
Based on the comment, it appears the intention is to not install the .pc files unless the pkg-config program is present. And ncurses doesn't declare a dependency on pkgconfig.
In fact, the check for "$PKG_CONFIG" != no
is not the problem, because when pkgconfig is not installed, $PKG_CONFIG appears to be "none", not "no".
However next it checks for the existence of ${prefix}/lib/pkgconfig. And that won't exist if there aren't any .pc files installed by other ports. And the buildbot builds ports in a clean environment so there wouldn't be any other ports installed.
I imagine the reason why most of the existing binary packages have the .pc files is because the buildbot built ncurses not explicitly but as a dependency of some other port which had other dependencies which did install .pc files. I think if the version or revision of ncurses were increased today, then all newly built ncurses packages would be missing the .pc files.
I think the solution is 1) to have the pkgconfig port always install ${prefix}/lib/pkgconfig (using destroot.keepdirs
), and 2) to have the ncurses port declare a build dependency on the pkgconfig port.
comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to angelo.graziosi@…:
It seems that on Lion (10.7.5+Xcode 4.5.2) I have only the links installed not the true files...
Is this right?
Yes I agree you are experiencing this problem on your machine.
BTW, is this problem related to this ticket : #36684?
That doesn't appear to me to be the same problem.
Replying to ryandesign@…:
have the pkgconfig port always install ${prefix}/lib/pkgconfig (using
destroot.keepdirs
)
comment:6 Changed 12 years ago by jmroot (Joshua Root)
I'll fix the .pc files in the next version. They were only added in the current version and hardly anything uses them. You can just set ncursesw_CFLAGS and ncursesw_LIBS for fizmo.
comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | haspatch added |
---|
Why not just fix ncurses now since we know how to do it? It would fix fizmo and any other ports using those files; might fix bugs that haven't been reported to us yet, or bugs that we weren't able to reproduce because of the specific set of circumstances required to make ncurses have this problem. It's been over a year and a half since ncurses 5.9 was released; who knows how many more years it'll be before they get around to releasing a new version.
Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | ncurses.diff added |
---|
proposed patch
comment:8 Changed 12 years ago by jmroot (Joshua Root)
I'm not adding a pkgconfig dep. It isn't needed by the ncurses build.
comment:9 follow-up: 11 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
The intention, if not the current functioning, of the configure script seems to be to only install the .pc files if pkgconfig is detected. Adding the pkgconfig dependency would satisfy that, even if the pkgconfig program itself is not actually needed to build ncurses. While we should of course avoid unnecessary dependencies, I wouldn't feel too bad about adding a pkgconfig dependency, since pkgconfig is needed by so many other ports anyway.
Alternately, you could write and maintain forever a patch against the configure script to always install the .pc files, if you prefer to take on that burden.
comment:11 Changed 12 years ago by jmroot (Joshua Root)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Replying to ryandesign@…:
Alternately, you could write and maintain forever a patch against the configure script to always install the .pc files, if you prefer to take on that burden.
Or, it could be already fixed upstream.
Replying to ryandesign@…:
Mountain Lion build: https://build.macports.org/builders/buildports-mtln-x86_64/builds/590/steps/compile/logs/stdio
Lion build: https://build.macports.org/builders/buildports-lion-x86_64/builds/6762/steps/compile/logs/stdio
Before it fails on locating ncursesw, it seems to successfully find libxml2, libsdl, libsndfile, libx11 and libpng, which I think means pkgconfig is fine. I'll investigate the Snow Leopard ncurses binary.