Patchwork QA issue with staging (workdir) for .la files in xmlrpc-c package

login
register
mail settings
Submitter Martin Panter
Date Dec. 24, 2010, 11:59 a.m.
Message ID <AANLkTinVRRFpVYfTQHaBDn1qT3BMgekQ4GLbNvPDu9Qt@mail.gmail.com>
Download mbox | patch
Permalink /patch/119/
State Accepted
Headers show

Comments

Martin Panter - Dec. 24, 2010, 11:59 a.m.
On 23 December 2010 07:26, Martin Panter <vadmium+floss@gmail.com> wrote:
> I'm having trouble building "xmlrpc-c", which I think is required for
> rtorrent. It's failing at the "do_qa_staging" stage with the messages
> such as "QA Issue with staging: libxmlrpc.la failed sanity test
> (workdir)".

I think I've solved this problem. Half of my solution is to modify the
xmlrpc-c package's Make file to pass the library file names directly
instead of using the "-L<directory> -l<name>" method. The other half
is to force it to use the newer Libtool version instead of its own.
See patch #1 attached, though I'm not really an expert on Libtool or
Open embedded, so I can't say if it might break something else, and I
haven't even tested out the packages I built yet.

> Previously I thought I had another "QA issue" with this xmlrpc-c
> package, something about a "hash style", which I thought I solved by
> passing LADD='${LDFLAGS}' to the Make command. But recently when I
> removed this change I am not getting the earlier "hash style QA
> issue"; only this newer "workdir" one. But I may be confused.

Still confused why this other failure temporarily went away but when I
fixed the "workdir" issue above, this "GNU_HASH" one came back.
Solution I originally tried worked and is in patch #2 attached.

-Martin
From 52867ad00845a4f67ac9ae4cf8335ff1f4c3daaa Mon Sep 17 00:00:00 2001
From: Martin Panter <vadmium à gmail.com>
Date: Fri, 24 Dec 2010 02:00:44 +0000
Subject: [PATCH 1/2] XML-RPC: Avoid "QA issue" where build directory is hard-coded into .la files

Adds a patch to avoid using -L link flags, and forces the Make files to use a
newer external Libtool.
---
 recipes/xmlrpc-c/xmlrpc-c-1.06.41/lib-path.patch |   58 ++++++++++++++++++++++
 recipes/xmlrpc-c/xmlrpc-c_1.06.41.bb             |    9 +++-
 2 files changed, 66 insertions(+), 1 deletions(-)
 create mode 100644 recipes/xmlrpc-c/xmlrpc-c-1.06.41/lib-path.patch

Patch

diff --git a/recipes/xmlrpc-c/xmlrpc-c-1.06.41/lib-path.patch b/recipes/xmlrpc-c/xmlrpc-c-1.06.41/lib-path.patch
new file mode 100644
index 0000000..1ec148b
--- /dev/null
+++ b/recipes/xmlrpc-c/xmlrpc-c-1.06.41/lib-path.patch
@@ -0,0 +1,58 @@ 
+Don't use build directories in the library search path because it apparently
+causes Libtool to hard-code the build directories inside installed .la files,
+triggering "QA issues". Use with newer Libtool.
+--- xmlrpc-c-1.06.41/src/Makefile
++++ xmlrpc-c-1.06.41/src/Makefile
+@@ -7,8 +7,8 @@ VPATH = .:$(SRCDIR)
+ 
+ include $(BUILDDIR)/Makefile.config
+ 
+-ABYSS_LIBDIR = $(BUILDDIR)/lib/abyss/src/.libs
+-LIBUTIL_LIBDIR = $(BUILDDIR)/lib/libutil/.libs
++ABYSS_LIB = $(BUILDDIR)/lib/abyss/src/libxmlrpc_abyss.la
++LIBUTIL_LIB = $(BUILDDIR)/lib/libutil/libxmlrpc_util.la
+ 
+ default: all
+ 
+@@ -70,17 +70,17 @@ endif
+ # may require the necessary -L options in addition.
+ 
+ LIBXMLRPC_CLIENT_OBJS = xmlrpc_client.lo xmlrpc_client_global.lo
+-LIBXMLRPC_CLIENT_LIBDEP = -lxmlrpc_util -lxmlrpc
++LIBXMLRPC_CLIENT_LIBDEP = $(LIBUTIL_LIB) libxmlrpc.la
+ 
+ LIBXMLRPC_SERVER_OBJS = registry.lo system_method.lo
+-LIBXMLRPC_SERVER_LIBDEP = -lxmlrpc_util -lxmlrpc
++LIBXMLRPC_SERVER_LIBDEP = $(LIBUTIL_LIB) libxmlrpc.la
+ 
+ LIBXMLRPC_SERVER_ABYSS_OBJS = xmlrpc_server_abyss.lo
+ LIBXMLRPC_SERVER_ABYSS_LIBDEP = \
+-  -lxmlrpc_util -lxmlrpc_server -L$(ABYSS_LIBDIR) -lxmlrpc_abyss -lxmlrpc
++  $(LIBUTIL_LIB) libxmlrpc_server.la $(ABYSS_LIB) libxmlrpc.la
+ 
+ LIBXMLRPC_SERVER_CGI_OBJS = xmlrpc_server_cgi.lo
+-LIBXMLRPC_SERVER_CGI_LIBDEP = -lxmlrpc_util -lxmlrpc_server -lxmlrpc
++LIBXMLRPC_SERVER_CGI_LIBDEP = $(LIBUTIL_LIB) libxmlrpc_server.la libxmlrpc.la
+ 
+ LIBXMLRPC_OBJS = \
+ 	trace.lo \
+@@ -96,7 +96,7 @@ LIBXMLRPC_OBJS = \
+ 	xmlrpc_utf8.lo \
+ 	xmlrpc_authcookie.lo \
+ 
+-LIBXMLRPC_LIBDEP = -lxmlrpc_util $(LIBXML_LIBS)
++LIBXMLRPC_LIBDEP = $(LIBUTIL_LIB) $(LIBXML_LIBS)
+ 
+ LIB_OBJS = $(LIBXMLRPC_CLIENT_OBJS) $(LIBXMLRPC_SERVER_OBJS)
+ 
+@@ -133,9 +133,7 @@ all: $(TARGET_LTLIBRARIES) $(SUBDIRS:%=%
+ 
+ LDFLAGS = $(LADD)
+ 
+-LIBPATHS = -L.libs -L$(LIBUTIL_LIBDIR)
+-
+-LIBLDFLAGS = $(LDFLAGS_VERSINFO) -rpath $(LIBINST_DIR) $(LIBPATHS) $(LADD)
++LIBLDFLAGS = $(LDFLAGS_VERSINFO) -rpath $(LIBINST_DIR) $(LADD)
+ 
+ 
+ libxmlrpc.la: $(LIBXMLRPC_OBJS)
diff --git a/recipes/xmlrpc-c/xmlrpc-c_1.06.41.bb b/recipes/xmlrpc-c/xmlrpc-c_1.06.41.bb
index e9bbc31..46d3a8d 100644
--- a/recipes/xmlrpc-c/xmlrpc-c_1.06.41.bb
+++ b/recipes/xmlrpc-c/xmlrpc-c_1.06.41.bb
@@ -14,12 +14,19 @@  PARALLEL_MAKE = ""
 
 inherit autotools binconfig
 
+# EXTRA_OEMAKE only works if after inherit line above
+
+# Older internal Libtool doesn't work with lib-path.patch (below)
+EXTRA_OEMAKE += "LIBTOOL='${HOST_SYS}-libtool'"
+
 do_configure () {
 	gnu-configize
         oe_runconf
 }
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tgz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tgz \
+        file://lib-path.patch \
+"
 SRC_URI[md5sum] = "02c6b89b8ff911341b6b6d4a6c621ea9"
 SRC_URI[sha256sum] = "a13f5ef40ed75d89543b9cd086185121dead9fc7de850ca4d2edd9a0cec12205"