tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: math/R failing to install




On Jun 23, 2016, at 4:07 PM, Thomas Klausner <wiz%NetBSD.org@localhost> wrote:

On Thu, Jun 23, 2016 at 04:30:53PM +0000, David Holland wrote:
On Wed, Jun 22, 2016 at 11:29:27AM -0600, Brook Milligan wrote:
The math/R package is failing to install with a message about missing the cairo library.  This seems to be because the configure script is looking for both cairo and pango, not just cairo.

The following patch fixes it for me:

--- Makefile 13 Apr 2016 21:04:04 -0000 1.165
+++ Makefile 22 Jun 2016 17:25:12 -0000
@@ -151,6 +151,7 @@
.include "../../archivers/xz/buildlink3.mk"
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
+.include "../../devel/pango/buildlink3.mk"
.include "../../devel/pcre/buildlink3.mk"
# uses callback interface
.include "../../devel/readline/buildlink3.mk?

Is this ok to commit?

Yes (at least assuming the freeze rules this time allow bug fixes) but
you need to also bump PKGREVISION.

We're still trying to find out why this is necessary for him, so "no"
for now.

I think I better understand what the problem is now but not how to fix it.  First, the current status:

I marked every package with ‘unsafe_depends=YES’ and ‘unsafe_depends_strict=YES’ and reran pkg_rolling-replace.  My intent was to make sure that everything was consistently built.  When it finally came to the R package, the same problem occurred.  The relevant bit from config.log is:

configure:32600: checking whether pkg-config knows about cairo and pango
configure:32612: result: no
configure:32685: checking whether pkg-config knows about cairo
configure:32697: result: yes
configure:32742: checking whether cairo is >= 1.2 and works
configure:: gcc -std=gnu99 -o conftest -O2 -pthread -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include -I/usr/X11R7/include/libdrm -I/usr/X11R7/include/freetype2 -fpic  -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include -I/usr/X11R7/include/libdrm -I/usr/X11R7/include/freetype2  -I/usr/pkg/include/cairo -I/usr/X11R7/include/pixman-1 -I/usr/X11R7/include -I/usr/X11R7/include/freetype2 -I/usr/pkg/include/libpng16  -D_REENTRANT   -L/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -Wl,-R/usr/pkg/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -pthread conftest.c -lrt -lm  -liconv -L/usr/pkg/lib -lpng16 -Wl,-rpath,/usr/X11R7/lib -L/usr/X11R7/lib -lfreetype -lbz2 -lz -Wl,-R/usr/pkg/lib -lcairo   >&5
/usr/pkg/lib/libxcb-shm.so.0: undefined reference to `xcb_send_request_with_fds'
configure:: $? = 1

The information referring to /usr/pkg/lib/libxcb-shm.so.0 is misleading as the .buildlink/lib directory contains links via x11-links to libraries in /usr/X11/lib.  Thus, I expect that the X11 libraries are being linked against not the pkgsrc ones.

Here is some relevant information about both the /usr/pkg/lib and /usr/X11/lib libraries:  output of ldd and bits of output from nm that match the undefined symbol.

/usr/pkg/lib/libxcb-shm.so.0.0.0:
-lxcb.2 => /usr/X11R7/lib/libxcb.so.2
-lXau.7 => /usr/X11R7/lib/libXau.so.7
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lc.12 => /usr/lib/libc.so.12
-lXdmcp.7 => /usr/X11R7/lib/libXdmcp.so.7

/usr/pkg/lib/libxcb-shm.so.0.0.0:
                 U xcb_send_request_with_fds

/usr/pkg/lib/libxcb.so.1.1.0:
-lXau.7 => /usr/X11R7/lib/libXau.so.7
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lc.12 => /usr/lib/libc.so.12
-lXdmcp.7 => /usr/X11R7/lib/libXdmcp.so.7

/usr/pkg/lib/libxcb.so.1.1.0:
000000000000cb7f T xcb_send_request_with_fds

/usr/X11/lib/libxcb-shm.so.0.1:
-lxcb.2 => /usr/X11R7/lib/libxcb.so.2
-lXau.7 => /usr/X11R7/lib/libXau.so.7
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lc.12 => /usr/lib/libc.so.12
-lXdmcp.7 => /usr/X11R7/lib/libXdmcp.so.7

/usr/X11/lib/libxcb.so.2.0:
-lXau.7 => /usr/X11R7/lib/libXau.so.7
-lgcc_s.1 => /usr/lib/libgcc_s.so.1
-lc.12 => /usr/lib/libc.so.12
-lXdmcp.7 => /usr/X11R7/lib/libXdmcp.so.7

It seems that if the configure test program was actually linked against the pkgsrc libraries, it would properly resolve the symbol.  If instead it is linked against the X11 libraries (as the buildlink/x11-links links suggest) the program would fail with the missing symbol error as it does.

I am guessing that the correct solution involves forcing the use of the pkgsrc libraries, but I’m not sure how to do that.  I am also not sure why this works for anyone else.  Are there different X11 libraries?  

Any advice is welcome.  Thanks a lot.

Cheers,
Brook




Home | Main Index | Thread Index | Old Index