NetBSD Problem Report #42047

From kre@munnari.OZ.AU  Fri Sep 11 10:19:25 2009
Return-Path: <kre@munnari.OZ.AU>
Received: from ( [])
	by (Postfix) with ESMTP id 58F8663B877
	for <>; Fri, 11 Sep 2009 10:19:25 +0000 (UTC)
Message-Id: <>
Date: Fri, 11 Sep 2009 17:19:16 +0700 (ICT)
From: kre@munnari.OZ.AU
Subject: lang/swi-prolog-packages demands X server to install
X-Send-Pr-Version: 3.95

>Number:         42047
>Category:       pkg
>Synopsis:       lang/swi-prolog-packages demands X server to install
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    leot
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 11 10:20:01 +0000 2009
>Closed-Date:    Tue Mar 05 06:48:39 +0000 2019
>Last-Modified:  Tue Mar 05 06:48:39 +0000 2019
>Originator:     Robert Elz
>Release:        NetBSD 4.0 / i386    pkgsrc current 2009-09-10
	Prince of Songkla University
System: NetBSD 4.0_STABLE NetBSD 4.0_STABLE (JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 i386
Architecture: i386
Machine: i386
	To install lang/swi-prolog-packages apparently requires
	an existing running and usable X server.   That's absurd,
	any information from any X server cannot possibly be relevant
	or useful after the package is installed, nothing (including
	what resolutions, fonts, extensions, ...) that any X server
	might be able to convey at install time is to be expected to
	be even similar to the X server that would be used by any
	of the (possibly many different) users who use the installed

	Create an environment without DISPLAY set, I use pkg_comp
	to achieve that (even if it had a DISPLAY setting, it would
	not have access to the auth files needed to allow access).

	Attempt to install (after successfully building)
	lang/swi-prolog-packages (swi-prolog-packages-5.6.17nb3)
	with DISPLAY unset.

	Expect to see ...

===> Installing for swi-prolog-packages-5.6.17nb3
=> Generating pre-install file lists
Error: Environment variable DISPLAY must be set
       and point to a connectible X server.
*** Error code 1

make: stopped in /usr/pkgsrc/lang/swi-prolog-packages



From: Robert Elz <kre@munnari.OZ.AU>
Subject: Re: pkg/42047: lang/swi-prolog-packages demands X server to install 
Date: Fri, 18 Sep 2009 02:19:25 +0700

     Date:        Fri, 11 Sep 2009 10:20:01 +0000 (UTC)
     Message-ID:  <>

   | 	To install lang/swi-prolog-packages apparently requires
   | 	an existing running and usable X server.

 I have been looking more at this, and it seems as if it is
 purely pkgsrc that cares about that, it doesn't seem that
 an X server is really needed at all (though I'll need to do
 some more experimentation to be certain -- someone who actually
 knows how to use prolog might be needed to test things).

 Now to more idiocy in this package.

 First, the Makefile (pkgsrc/lang/swi-prolog-packages/Makefile)
 contains this gem:

 .if ${X11_TYPE} == "xorg"
 BUILD_DEPENDS+=         xorg-server-[0-9]*:../../x11/xorg-server

 As best I can determine, the only (current) known values for
 X11_TYPE are "native" and "modular" - "xorg" is never going to
 be true.

 Now that's a good thing, as there also isn't anythng called
 xorg-server-* (any more) and nor is there a x11/xorg-server
 pkgsrc directory to build it from.

 But this gave me a hint for later...

 We also find:

 pre-install: checkforx

 This is what is insisting on there being an X server
 in order to install of course.

 And next ...

 # Based on misc/openoffice:
 DISPLAY?=       #empty, if unset
 .if ${DISPLAY} == "" || ${DISPLAY_OK:!${X11BASE}/bin/xdpyinfo >/dev/null 2>&1 &&
  echo YES || echo NO!} == "NO"
 .  if exists(${X11BASE}/bin/Xvfb)
 	-${X11BASE}/bin/Xvfb :2 & \
 	${ECHO} $$! >${WRKDIR}/
 	${ECHO} checkforx: Xvfb-PID: `${CAT} ${WRKDIR}/`
 	sleep 5
 .  else
 	/* and here is the error message in the original PR */

 So, it seems as if the package just needs an X server, any random
 X server - if Xvfb works, anything would do, that's clearly never
 going to emulate any real environment, its whole purpose is to
 be able to pretend to be all kinds of fake environments, and see
 how applications perform.

 Why the package doesn't simply unconditionally use it, instead of
 trying to use a real X server if there is one, I have no idea.
 Nor do I know how it manages to assume that DISPLAY=:2 is going
 to work, and isn't already occupied by some other server, but I
 guess that's a bit of a difficult problem.

 To attempt to solve this, I thought I know what it really wants
 here, so I just installed modular-xorg-server (which includes Xvfb)
 and let it run at that.

 That worked  (well the file-check test failed abismally, but that's
 because of when in the sequence of things I installed modular-xorg-server,
 swi-prolog-packages file-check test decided that all modular-xorg-server's
 file should have been in it's PLIST ...).

 At this point you might conclude that we now know a solution, but you're
 probably mistaken there, as there's one more salient fact that I
 haven't explicitly mentioned.

 That is, all I installed was modular-xorg-server - and an X server
 by itself, barren and alone, left to fend for itself without any
 parental guidance, and no safe nurturing environment, just won't
 survive very long.

 And this one didn't - one of the requirements for an X server to
 run (for reasons I never understood, but that's beside the point)
 is that it be able to find a font "fixed".   Notice that nowhere
 above did I say anything about installing an X fonts.   That's
 because I didn't.   Xvfb bitched a lot about all of the entries
 in its font path being invalid, then suicided when unable to find
 anything it could use as font "fixed".

 What's more all that happened while the Makefile fragment above was
 still in its "sleep 5".

 Before the package install actually started, the X server that
 the pkgsrc makefile claims is required (I could see no mention
 of that requirement anywhere in the package itself, but then again,
 I didn't look very hard) was gone, never to be seen again.

 Yet the package install actally seemed to work - there were a lot
 of file-check errors, but they all seemed to be extra files installed,
 and those all looked as if they would have been from the
 modular-xorg-server installation (I did not investigate thoroughly).

 I'm going to play a little more with this, if needed, next time I
 find a free hour or so, but anyone, please feel free to take
 a hatchet to this package and move it from its current state of
 total absurdity, somewhere closer to being real world functional.

 It is entirely possible that with X11_TYPE=native none of these
 errors would be observed, as it would have an Xvfb installed
 already, and almost certainly fonts to use, so the server would
 probably run, and then be killed when finished, and seemingly,
 all for no useful purpose at all.   But quietly...


 pe: thanks to David Holland for educating me, privately, on some
 plausible (sounding) reasons why an X server might be needed during
 a package build (probably during its configure).   I'm confident
 however that none of those reasons can possibly apply here.

Responsible-Changed-From-To: pkg-manager->leot
Responsible-Changed-When: Mon, 25 Feb 2019 14:57:57 +0000
Take (and sorry Robert for a ~decade of silence!)

(This was changed recently upstream (after 8.0.0) and should
not be no longer needed.)

From: "Leonardo Taccari" <>
Subject: PR/42047 CVS commit: pkgsrc/lang
Date: Mon, 25 Feb 2019 15:20:45 +0000

 Module Name:	pkgsrc
 Committed By:	leot
 Date:		Mon Feb 25 15:20:45 UTC 2019

 Modified Files:
 	pkgsrc/lang/swi-prolog: Makefile
 	pkgsrc/lang/swi-prolog-jpl: Makefile PLIST
 	pkgsrc/lang/swi-prolog-lite: DESCR Makefile Makefile.common PLIST distinfo
 	pkgsrc/lang/swi-prolog-packages: DESCR Makefile PLIST
 Removed Files:
 	pkgsrc/lang/swi-prolog-lite: PLIST.Darwin PLIST.Linux-x86_64
 	pkgsrc/lang/swi-prolog-lite/patches: patch-ad patch-src_configure
 	    patch-src_os_pl-files.c patch-src_pl-funcs.h patch-src_pl-rsort.c

 Log Message:
 swi-prolog*: Update to 8.0.1

 pkgsrc changes:
  - Rename swi-prolog to swipl to follow upstream nomenclature
  - Add all main packages (except X11) to swi-prolog-lite.
    After CMake migration in order to generate the documentation and being able
    to use it (e.g. via help/2) it is needed to add basic, archive, ssl and term
    All X11 packages are provided by swi-prolog-packages.
  - Adjust pkgsrc Makefile-s logic to upstream CMake migration:
     o Uncoditionally disable not wanted packages in Makefile.common (to avoid
       possible PLIST mismatches; please note that this will probably disable
       tipc package on Linux!).
       All other installed packages are enabled/disabled via
       swi-prolog-{lite,packages,jpl} Makefile.
     o Add libarchive, ossp-uuid and openssl build dependency to
       swi-prolog-packages.  Despite these are provided by swi-prolog-lite
       they are needed as part of the build of swi-prolog-packages too.
     o Remove no more needed logic to check and eventually start X server to
       build documentation.  Should address PR pkg/42047.
  - Remove an unconditional CHECK_WRKREF_SKIP, this was needed on FreeBSD
    but unfortunately it is not clear why.  If this is still needed please let
    me know in order to try to investigate further and address that.
  - Bump API requirements to 8.0.1 in to be on the safe side
    now that shared libraries are provided on all platforms.

 Indexing on multiple arguments together, indexing inside compounds,
 Mode-directed tabling, saved states using ZIP files, many deployment
 enhancements. Moved build environment to CMake and removed most of
 the build tool dependencies. Builds documentation along with the

 Please note that this is just a short summary. Unfortunately the
 complete changelog is very long, full changelog can be found at:


 To generate a diff of this commit:
 cvs rdiff -u -r1.41 -r1.42 pkgsrc/lang/swi-prolog/Makefile
 cvs rdiff -u -r1.5 -r1.6 pkgsrc/lang/swi-prolog-jpl/Makefile
 cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/swi-prolog-jpl/PLIST
 cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/swi-prolog-lite/DESCR
 cvs rdiff -u -r1.28 -r1.29 pkgsrc/lang/swi-prolog-lite/Makefile
 cvs rdiff -u -r1.15 -r1.16 pkgsrc/lang/swi-prolog-lite/Makefile.common
 cvs rdiff -u -r1.13 -r1.14 pkgsrc/lang/swi-prolog-lite/PLIST \
 cvs rdiff -u -r1.1 -r0 pkgsrc/lang/swi-prolog-lite/PLIST.Darwin
 cvs rdiff -u -r1.2 -r0 pkgsrc/lang/swi-prolog-lite/PLIST.Linux-x86_64
 cvs rdiff -u -r1.23 -r1.24 pkgsrc/lang/swi-prolog-lite/distinfo
 cvs rdiff -u -r1.6 -r0 pkgsrc/lang/swi-prolog-lite/patches/patch-ad
 cvs rdiff -u -r1.2 -r0 \
     pkgsrc/lang/swi-prolog-lite/patches/ \
 cvs rdiff -u -r1.1 -r0 \
     pkgsrc/lang/swi-prolog-lite/patches/patch-src_configure \
     pkgsrc/lang/swi-prolog-lite/patches/patch-src_os_pl-files.c \
     pkgsrc/lang/swi-prolog-lite/patches/patch-src_pl-rsort.c \
 cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/lang/swi-prolog-packages/DESCR
 cvs rdiff -u -r1.51 -r1.52 pkgsrc/lang/swi-prolog-packages/Makefile
 cvs rdiff -u -r1.11 -r1.12 pkgsrc/lang/swi-prolog-packages/PLIST

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

State-Changed-From-To: open->feedback
State-Changed-When: Wed, 27 Feb 2019 11:27:41 +0000
A running X11 server should not be no more needed since
8.0.0 (the way documentation is handled was changed recently
by upstream).  I have built both swi-prolog-lite and swi-prolog-packages
without a running X11 server and I have not noticed any problems.

Robert, can you please let us known if with 8.0.1 the problem
is fixed?

Thank you!

State-Changed-From-To: feedback->closed
State-Changed-When: Tue, 05 Mar 2019 06:48:39 +0000
Sorry, at thye minute I have no easy way to test this - but anyone
could, simply by building and installing without DISPLAY set.
If you believe it is OK, then I believe that too.

This PR came from the days when I had plenty of space machine time,
but almost zero available human time, so I was attempting to make
a small contribution to the project overall by using the machine time
to do pkgsrc builds, and report on any problems.   I had no interest
at all in most of the packages I was building ...  (this is certainly
one of those.)


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.