pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/42047: lang/swi-prolog-packages demands X server to install
The following reply was made to PR pkg/42047; it has been noted by GNATS.
From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc:
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)
From: kre%munnari.oz.au@localhost
Message-ID: <20090911102001.558A763BC1D%www.NetBSD.org@localhost>
| 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
.endif
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
checkforx:
.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}/.Xvfb.pid
${ECHO} checkforx: Xvfb-PID: `${CAT} ${WRKDIR}/.Xvfb.pid`
sleep 5
DISPLAY= :2
. 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...
kre
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.
Home |
Main Index |
Thread Index |
Old Index