NetBSD Problem Report #50039

From www@NetBSD.org  Wed Jul  8 07:10:41 2015
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D51F4A5B2E
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  8 Jul 2015 07:10:40 +0000 (UTC)
Message-Id: <20150708071039.7617AA6554@mollari.NetBSD.org>
Date: Wed,  8 Jul 2015 07:10:39 +0000 (UTC)
From: joern.clausen@uni-bielefeld.de
Reply-To: joern.clausen@uni-bielefeld.de
To: gnats-bugs@NetBSD.org
Subject: erroneous dependency of print/xpdf on libXp
X-Send-Pr-Version: www-1.0

>Number:         50039
>Category:       pkg
>Synopsis:       erroneous dependency of print/xpdf on libXp
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 08 07:15:00 +0000 2015
>Closed-Date:    
>Last-Modified:  Thu Aug 17 08:57:03 +0000 2017
>Originator:     Joern Clausen
>Release:        
>Organization:
University of Bielefeld
>Environment:
Solaris 11.2/i86
>Description:
Compiling print/xpdf on Solaris 11.2 fails with

===> Creating toolchain wrappers for xpdf-3.04nb1
ERROR: libXp>=1.0.0 is not installed; can't buildlink files.
*** Error code 1

I can't see any dependency on libXp in Makefile, but there is one on libXpm.

After commenting out

MAKE_ENV+=             SED=${SED:Q} ECHO=${ECHO:Q}

from the Makefile, the package is built without requiring libXp.

NB: Without this change, and after installing libXp manually, xpdf builds, but no dependency on libXp is shown, neither during build nor afterwards (pkg_info -n xpdf).
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/50039: erroneous dependency of print/xpdf on libXp
Date: Wed, 8 Jul 2015 10:21:23 +0200

 On Wed, Jul 08, 2015 at 07:15:00AM +0000, joern.clausen@uni-bielefeld.de wrote:
 > ===> Creating toolchain wrappers for xpdf-3.04nb1
 > ERROR: libXp>=1.0.0 is not installed; can't buildlink files.
 > *** Error code 1

 This usually happens when the buildlink3.mk for a package contains
 libXp/buildlink3.mk, but the package doesn't actually depend on it.

 Can you check, e.g. with 'make show-buildlink3', where libXp is pulled in?

 I just tried on NetBSD with modular x.org, but couldn't reproduce the problem.


 > I can't see any dependency on libXp in Makefile, but there is one on libXpm.
 > 
 > After commenting out
 > 
 > MAKE_ENV+=             SED=${SED:Q} ECHO=${ECHO:Q}
 > 
 > from the Makefile, the package is built without requiring libXp.

 It doesn't make sense to me that this change should change anything.

  Thomas

From: =?ISO-8859-15?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: Thomas Klausner <wiz@NetBSD.org>, pkg-manager@NetBSD.org,
 gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/50039: erroneous dependency of print/xpdf on libXp
Date: Wed, 08 Jul 2015 11:08:35 +0200

 >   Can you check, e.g. with 'make show-buildlink3', where libXp is pulled in?

 $ bmake show-buildlink3
 freetype2
      bzip2
      zlib
 libXpm
      x11-links
      xproto
 x11-links

 (with unmodified Makefile!)

 >   >  After commenting out
 >   >
 >   >  MAKE_ENV+=             SED=${SED:Q} ECHO=${ECHO:Q}
 >   >
 >   >  from the Makefile, the package is built without requiring libXp.
 >
 >   It doesn't make sense to me that this change should change anything.

 Something mangling the dependencies hits a bug/feature in Solaris sed 
 (or is it pkgsrc's gsed? or echo/gecho?) that shortens libXpm to libXp? 
 And this piece of code seems to be used only in the toolchain wrapper 
 phase, but not when the actual dependencies are resolved or recorded 
 while installing the package. Here is more context from the build:

 => Tool dependency nbpatch-[0-9]*: found nbpatch-20100124
 => Build dependency kbproto>=1.0.2: found kbproto-1.0.7
 => Build dependency xproto>=7.0.9: found xproto-7.0.28
 => Build dependency xcb-proto>=1.4: found xcb-proto-1.11
 => Build dependency xextproto>=7.0: found xextproto-7.3.0
 => Build dependency inputproto>=1.4: found inputproto-2.3.1
 => Build dependency printproto>=1.0.3: found printproto-1.0.5
 => Build dependency renderproto>=0.9.3nb1: found renderproto-0.11.1
 => Full dependency urw-fonts-[0-9]*: found urw-fonts-1.0.7pre44
 => Full dependency poppler-utils-[0-9]*: found poppler-utils-0.32.0
 => Full dependency freetype2>=2.4.11: found freetype2-2.5.5
 => Full dependency libXpm>=3.5.4.2: found libXpm-3.5.11
 => Full dependency lesstif>=0.95.2nb4: found lesstif-0.95.2nb5
 ===> Overriding tools for xpdf-3.04nb1
 ===> Extracting for xpdf-3.04nb1
 ===> Patching for xpdf-3.04nb1
 => Applying pkgsrc patches for xpdf-3.04nb1
 => Substituting "paths" in doc/sample-xpdfrc doc/xpdf.1 doc/xpdfrc.5
 ===> Creating toolchain wrappers for xpdf-3.04nb1
 ERROR: libXp>=1.0.0 is not installed; can't buildlink files.
 *** Error code 1

 OTOH: trussing the build process shows, that in both cases (i.e. with 
 the line in Makefile intact and commented out) only /usr/gnu/bin/sed is 
 ever executed, no other sed is used. And this happens way before the 
 build process fails. And "echo" is never executed before the build 
 breaks. Okay, now I am puzzled...

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 Hochschulrechenzentrum

 Universität Bielefeld
 Universitätsstraße 25
 33615 Bielefeld
 Telefon: +49 521 106-12601
 E-Mail: joern.clausen@uni-bielefeld.de

 http://www.uni-bielefeld.de/hrz

From: =?ISO-8859-15?Q?J=F6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: Thomas Klausner <wiz@NetBSD.org>, pkg-manager@NetBSD.org,
 gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/50039: erroneous dependency of print/xpdf on libXp
Date: Wed, 08 Jul 2015 12:01:06 +0200

 Maybe pkgsrc isn't so wrong after all:

 $ ldd /usr/pkg/bin/xpdf
 [...]
          -lXp.6 => /usr/pkg/lib/libXp.so.6
 [...]
          -lXpm.4 => /usr/pkg/lib/libXpm.so.4
 [...]

 And this is on NetBSD. The same is true on Solaris, i.e. the xpdf there 
 is now showing an unresolved dependency:

 $ ldd /opt/pkg-hrz/head/bin/xpdf
 [...]
          libXp.so.6 =>    (file not found)
 [...]

 So the fix is probably to make x11/libXp an explicit requirement in 
 print/xpdf.

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 Hochschulrechenzentrum

 Universität Bielefeld
 Universitätsstraße 25
 33615 Bielefeld
 Telefon: +49 521 106-12601
 E-Mail: joern.clausen@uni-bielefeld.de

 http://www.uni-bielefeld.de/hrz

From: Patrick Welche <prlw1@cam.ac.uk>
To: =?iso-8859-1?Q?J=F6rn?= Clausen <joern.clausen@uni-bielefeld.de>
Cc: gnats-bugs@NetBSD.org, Thomas Klausner <wiz@NetBSD.org>,
	pkg-manager@NetBSD.org, gnats-admin@NetBSD.org,
	pkgsrc-bugs@NetBSD.org
Subject: Re: pkg/50039: erroneous dependency of print/xpdf on libXp
Date: Wed, 8 Jul 2015 14:22:04 +0100

 On Wed, Jul 08, 2015 at 12:01:06PM +0200, Jrn Clausen wrote:
 > Maybe pkgsrc isn't so wrong after all:
 > 
 > $ ldd /usr/pkg/bin/xpdf
 > [...]
 >         -lXp.6 => /usr/pkg/lib/libXp.so.6
 > [...]
 >         -lXpm.4 => /usr/pkg/lib/libXpm.so.4
 > [...]
 > 
 > And this is on NetBSD. The same is true on Solaris, i.e. the xpdf there is
 > now showing an unresolved dependency:
 > 
 > $ ldd /opt/pkg-hrz/head/bin/xpdf
 > [...]
 >         libXp.so.6 =>    (file not found)
 > [...]
 > 
 > So the fix is probably to make x11/libXp an explicit requirement in
 > print/xpdf.

 and just to confuse even more, on my -current/amd64 laptop:

 # ldd /usr/pkg/bin/xpdf | grep libXp
         -lXpm.5 => /usr/X11R7/lib/libXpm.so.5
 #

 (native xsrc rather than modular)

From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50039: erroneous dependency of print/xpdf on libXp
Date: Thu, 9 Jul 2015 16:56:10 +0000

 On Wed, Jul 08, 2015 at 10:05:00AM +0000, J?rn Clausen wrote:
  >  $ ldd /opt/pkg-hrz/head/bin/xpdf
  >  [...]
  >           libXp.so.6 =>    (file not found)
  >  [...]
  >  
  >  So the fix is probably to make x11/libXp an explicit requirement in 
  >  print/xpdf.

 libXp is deprecated, so it's probably better to patch it out of xpdf.

 (it doesn't appear in my xpdf on netbsd with native X either, fwiw)

 -- 
 David A. Holland
 dholland@netbsd.org

From: =?UTF-8?Q?J=c3=b6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50039: erroneous dependency of print/xpdf on libXp
Date: Tue, 15 Aug 2017 11:02:03 +0200

 So, finally (three years later), I took one more look...

 I use "x11/lesstif", and its buildlink3.mk contains

 .include "../../x11/libXp/buildlink3.mk"

 MOTIFLIB=       ${COMPILER_RPATH_FLAG}${_MOTIFBASE}/lib \
                  -L${_MOTIFBASE}/lib -lXm -lXp

 but Xp is not mentioned in its Makefile, so does not get installed.

 Although the configure script checks for libXp, lesstif will build 
 without this library.

 With this change in x11/lesstif

 --- buildlink3.mk       2017/08/15 08:50:21     1.1
 +++ buildlink3.mk       2017/08/15 08:50:33
 @@ -11,11 +11,10 @@

   _MOTIFBASE=    ${BUILDLINK_PREFIX.lesstif}
   MOTIFLIB=      ${COMPILER_RPATH_FLAG}${_MOTIFBASE}/lib \
 -               -L${_MOTIFBASE}/lib -lXm -lXp
 +               -L${_MOTIFBASE}/lib -lXm

   .include "../../fonts/fontconfig/buildlink3.mk"
   .include "../../x11/libXext/buildlink3.mk"
 -.include "../../x11/libXp/buildlink3.mk"
   .include "../../x11/libXrender/buildlink3.mk"
   .include "../../x11/libXt/buildlink3.mk"
   .endif # LESSTIF_BUILDLINK3_MK

 print/xpdf finally builds out of the box for me.

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 BITS - Bielefelder IT-Servicezentrum

 Universität Bielefeld
 Universitätsstraße 25
 33615 Bielefeld
 Telefon: +49 521 106-12601
 E-Mail: joern.clausen@uni-bielefeld.de

 http://www.uni-bielefeld.de/bits

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 15 Aug 2017 17:24:24 +0000
State-Changed-Why:
Committed the patch, thanks!


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/50039 CVS commit: pkgsrc/x11/lesstif
Date: Tue, 15 Aug 2017 17:24:03 +0000

 Module Name:	pkgsrc
 Committed By:	wiz
 Date:		Tue Aug 15 17:24:03 UTC 2017

 Modified Files:
 	pkgsrc/x11/lesstif: buildlink3.mk

 Log Message:
 Remove bogus libXp reference from buildlink3.mk.

 From Jörn Clausen in PR 50039.


 To generate a diff of this commit:
 cvs rdiff -u -r1.25 -r1.26 pkgsrc/x11/lesstif/buildlink3.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: =?UTF-8?Q?J=c3=b6rn_Clausen?= <joern.clausen@uni-bielefeld.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/50039: erroneous dependency of print/xpdf on libXp
Date: Thu, 17 Aug 2017 10:15:47 +0200

 It seems we are not done yet...

 Now building print/xpdf on NetBSD 7.0.1 fails with

 configure: WARNING: Couldn't find Motif
 configure: WARNING: -- You will be able to compile pdftops, pdftotext,
          pdfinfo, pdffonts, pdfdetach, and pdfimages, but not xpdf
          or pdftoppm


 If I understand the configure script correctly, there is actually a test 
 for Motif involving libXp ($Xp_LIBS something something), which now 
 probably fails.

 The configure script is provided by xpdf. I removed it and recreated it 
 using pkgsrc's autoconf, but the problem remains.

 So the correct fix is to change the test for Motif in autoconf? Or is 
 libXp simply a necessity when using Motif/LessTif, and the fix to 
 lesstif should have been the other way round?

 -- 
 Jörn Clausen
 Plattformen & Serverdienste
 BITS - Bielefelder IT-Servicezentrum

State-Changed-From-To: closed->open
State-Changed-By: leot@NetBSD.org
State-Changed-When: Thu, 17 Aug 2017 08:57:03 +0000
State-Changed-Why:
Feedback provided, now build seems to fail in a different way.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.