pkgsrc-Users archive

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

Re: general problem with pkgsrc on 64bit linux



Min Sik Kim <minskim%NetBSD.org@localhost> writes:

> I reported this problem in 2006 (PR 34108).
> 
> See mk/buildlink3/buildlink3.mk:
> 
> BUILDLINK_LIBDIRS.${_pkg_}?=    lib${LIBABISUFFIX}
> .  if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
> BUILDLINK_RPATHDIRS.${_pkg_}?=  ${BUILDLINK_LIBDIRS.${_pkg_}}
> .  else
> BUILDLINK_RPATHDIRS.${_pkg_}?=  # empty
> .  endif
> .endfor
> 
> 
> LIBABISUFFIX is set to 64 in mk/platform/Linux.mk.  So
> BUILDLINK_RPATHDIRS.${_pkg_} has lib64, and later ${BUILDLINK_PREFIX.$
> {_pkg_}}/BUILDLINK_RPATHDIRS.${_pkg_} is added to BUILDLINK_LDFLAGS.
> 
> So the problem occurs when one of the dependencies is a native library
> and it is buildlinked (e.g., zlib on Linux).
> 
> 
> > and how to make it stop happening.
> 
> 
> Sorry, no idea.

You _rule_.  Thanks for the toe-hold.

Here is a patch against 2007Q4 that no doubt will break other things,
but seems to be working for me in light testing (at least it lets
devel/py-gobject-shared build cleanly):

cvs diff -u mk/buildlink3/bsd.buildlink3.mk
Index: mk/buildlink3/bsd.buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink3/bsd.buildlink3.mk,v
retrieving revision 1.198
diff -u -u -r1.198 bsd.buildlink3.mk
--- mk/buildlink3/bsd.buildlink3.mk     1 Oct 2007 06:46:37 -0000       1.198
+++ mk/buildlink3/bsd.buildlink3.mk     22 Jan 2008 19:06:31 -0000
@@ -353,6 +353,13 @@
 BUILDLINK_LIBS=                # empty
 BUILDLINK_CFLAGS=      # empty
 
+#
+# rdm hack: Ensure that ${LOCALBASE}/lib is at the front of BUILDLINK_LDFLAGS
+#
+BUILDLINK_LDFLAGS+=    ${COMPILER_RPATH_FLAG}${LOCALBASE}/lib
+BUILDLINK_LDFLAGS+=    -L${LOCALBASE}/lib
+
+
 .for _pkg_ in ${_BLNK_PACKAGES}
 .  if !empty(BUILDLINK_AUTO_VARS.${_pkg_}:M[yY][eE][sS])
 .    for _flag_ in ${BUILDLINK_CPPFLAGS.${_pkg_}}


I don't do bulk builds, so I can't do a proper survey to figure out
what this breaks, if anything.  Right now I'm trying to build
x11/py-gtk2, which had numerous issues previously, so that might be a
more extensive test.

Anyway thanks for the help everyone!

-russ




Home | Main Index | Thread Index | Old Index