Received: (at submit) by bugs.x2go.org; 14 Dec 2012 18:18:39 +0000
Received: from mail.cora.nwra.com (mercury.cora.nwra.com [4.28.99.165])
	by ymir (Postfix) with ESMTPS id 002C55DA6C
	for <submit@bugs.x2go.org>; Fri, 14 Dec 2012 19:18:38 +0100 (CET)
Received: from barry.cora.nwra.com (barry.cora.nwra.com [10.10.20.7])
	(authenticated bits=0)
	by mail.cora.nwra.com (8.14.4/8.14.4) with ESMTP id qBEIIbPJ011149
	(version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO)
	for <submit@bugs.x2go.org>; Fri, 14 Dec 2012 11:18:37 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cora.nwra.com;
	s=default; t=1355509117;
	bh=+D+eidaQzCkO9okd41qO+SAcYjCf3RggM4/pYTrtxwk=;
	h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type;
	b=JP3ovVRXkxWh4ZNo5mV37vA3/pQxjnPw5lHwT4pAm4aUQO3jC18qeF8tcZsiyUbrT
	 173QJqRaf+DjSVj4mL4A+KbpEoyzLTj7k9h2RgdxKCrG340tzzTHUspaLl9RqRWoOT
	 TzOyWjEv2ae/sk7zzgfYSzIvcHtYKzOZXiR8iCM8=
Message-ID: <50CB6D7D.9040001@cora.nwra.com>
Date: Fri, 14 Dec 2012 11:18:37 -0700
From: Orion Poplawski <orion@cora.nwra.com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0
MIME-Version: 1.0
To: submit@bugs.x2go.org
Subject: parallel build issues
Content-Type: multipart/mixed;
 boundary="------------050300040106000507020503"

This is a multi-part message in MIME format.
--------------050300040106000507020503
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Package: nx-libs
Version: 3.5.0.16
Tags: patch

I've been seeing the parallel build issues in nx-libs mentioned recently. 
Tracking the build closer, it looks like a lot is getting built during the 
"make depend" stage:

depending in lib/X11...
make[5]: Entering directory `/builddir/build/BUILD/nx-libs-HEAD/nx-X11/lib/X11'
cd ../../../nxcomp &&   /builddir/build/BUILD/nx-libs-HEAD/my_configure

(I've set CONFIGURE to point to my_configure following the opensuse 
buildserver rpm specfile)

Now, why is this happening?

In nx-X11/lib/X11/Makefile there are deps like:

depend:: $(NX_XCOMPLIBTARGET)

Which triggers a build of nxcomp.  These come from nx-X11/lib/X11/Imakefile 
and are complete nonsense - why are we building things during the depend 
stage?  Removing those exposes the lack of proper build dependencies between 
NX_X11, Xcomp, and Xcompext (and what the previous depend hack was trying to 
work around).

The attached patch I believe fixes both of these issues, and hopefully fixes 
the parallel make issue as well.  It's been building fine for me now.

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder Office                  FAX: 303-415-9702
3380 Mitchell Lane                       orion@nwra.com
Boulder, CO 80301                   http://www.nwra.com


--------------050300040106000507020503
Content-Type: text/x-patch;
 name="nx-libs-depend.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="nx-libs-depend.patch"

--- nx-libs-HEAD/nx-X11/lib/X11/Imakefile.depend	2012-12-13 08:43:53.000000000 -0700
+++ nx-libs-HEAD/nx-X11/lib/X11/Imakefile	2012-12-14 10:57:45.413053462 -0700
@@ -1159,32 +1159,18 @@
 	cd ../../../nxcompext && \
 	${CONFIGURE}
 
-#ifdef SunArchitecture
 $(NX_XCOMPLIBTARGET): $(NX_XCOMPCONFIGTARGET)
 	${MAKE} -C $(NX_XCOMPLIBDIR)
 
-$(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET)
+$(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET) $(NX_XCOMPLIBTARGET) lib$(LIBNAME).so.$(SOXLIBREV)
 	${MAKE} -C ../../../nxcompext
 
-#else
-$(NX_XCOMPLIBTARGET): $(NX_XCOMPCONFIGTARGET)
-	${MAKE} -C $(NX_XCOMPLIBDIR)
-
-$(NX_XCOMPEXTLIBTARGET): $(NX_XCOMPEXTCONFIGTARGET)
-	${MAKE} -C ../../../nxcompext
-
-#endif
-
-depend:: $(NX_XCOMPLIBTARGET)
-
-all:: $(NX_XCOMPLIBTARGET)
+lib$(LIBNAME).so.$(SOXLIBREV): $(NX_XCOMPLIBTARGET)
 
 $(NX_XCOMPDEPTARGET):
 	ln -s $(NX_XCOMPLIBDIR)/$(NX_XCOMPLIBNAME) $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME)
 	ln -s $(NX_XCOMPLIBDIR)/$(NX_XCOMPLIBNAME).1 $(BUILDLIBDIR)/$(NX_XCOMPLIBNAME).1
 
-depend:: $(NX_XCOMPLIBTARGET)
-
 all:: $(NX_XCOMPDEPTARGET) $(NX_XCOMPEXTLIBTARGET) 
 
 clean::


--------------050300040106000507020503--
