Re: Cannot build docs on Ubuntu 10.04?

Lists: pgsql-docs
From: John Lumby <johnlumby(at)hotmail(dot)com>
To: <pgsql-docs(at)postgresql(dot)org>
Subject: Re: Cannot build docs on Ubuntu 10.04?
Date: 2012-03-14 13:25:19
Message-ID: COL116-W9647A1E352CAF66550327A3590@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs


On 12-01-2012 17:28, Josh Berkus wrote:

> Can't open perl script "/bin/collateindex.pl": No such file or directory

On Thu, 12 Jan 2012 19:37:20 -0300 Alvaro Herrera wrote:
 >  dpkg -S collateindex.pl
docbook-dsssl:

 >  /usr/bin/collateindex.pl

I wonder if everyone noticed that the postgres sgml makefile is looking for the script in /bin
(see Josh's append)
but docbook-dssl puts it in /usr/bin
(see Alvaro's append).

I think this line in
postgresql-9.1.3/doc/src/sgml/Makefile

 COLLATEINDEX = $(DOCBOOKSTYLE)/bin/collateindex.pl

could be improved  -  maybe should read

COLLATEINDEX = `which collateindex.pl`

I fixed it by
 ln `which collateindex.pl` /bin/collateindex.pl

maybe this is what the "configure" that someone mentioned would have done?

Cheers,   John


From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: John Lumby <johnlumby(at)hotmail(dot)com>
Cc: Pg Docs <pgsql-docs(at)postgresql(dot)org>
Subject: Re: Cannot build docs on Ubuntu 10.04?
Date: 2012-03-14 14:13:39
Message-ID: 1331734254-sup-6864@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs


Excerpts from John Lumby's message of mié mar 14 10:25:19 -0300 2012:
>
> On 12-01-2012 17:28, Josh Berkus wrote:
>
> > Can't open perl script "/bin/collateindex.pl": No such file or directory
>
> On Thu, 12 Jan 2012 19:37:20 -0300 Alvaro Herrera wrote:
>  >  dpkg -S collateindex.pl
> docbook-dsssl:
>
>  >  /usr/bin/collateindex.pl
>
>
> I wonder if everyone noticed that the postgres sgml makefile is looking for the script in /bin
> (see Josh's append)
> but docbook-dssl puts it in /usr/bin
> (see Alvaro's append).
>
> I think this line in
> postgresql-9.1.3/doc/src/sgml/Makefile
>
>  COLLATEINDEX = $(DOCBOOKSTYLE)/bin/collateindex.pl
>
> could be improved  -  maybe should read
>
> COLLATEINDEX = `which collateindex.pl`
>
> I fixed it by
>  ln `which collateindex.pl` /bin/collateindex.pl
>
> maybe this is what the "configure" that someone mentioned would have done?

What configure would have done is put the correct value of the
DOCBOOKSTYLE variable in Makefile.global. In Josh's case,
collateindex.pl was not found so the variable is empty, with the results
you see.

I think there's nothing to change here, except maybe to warn something
if DOCBOOKSTYLE is defined to empty.

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Lumby <johnlumby(at)hotmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Cannot build docs on Ubuntu 10.04?
Date: 2012-03-14 14:21:55
Message-ID: 29895.1331734915@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

John Lumby <johnlumby(at)hotmail(dot)com> writes:
> On 12-01-2012 17:28, Josh Berkus wrote:
> I wonder if everyone noticed that the postgres sgml makefile is looking for the script in /bin
> (see Josh's append)

That means that configure failed to find it, and failed to determine
a setting for DOCBOOKSTYLE as well.

> I think this line in
> postgresql-9.1.3/doc/src/sgml/Makefile

> COLLATEINDEX = $(DOCBOOKSTYLE)/bin/collateindex.pl

> could be improved - maybe should read

> COLLATEINDEX = `which collateindex.pl`

No, that would not be an improvement. If collateindex.pl were in your
PATH, then configure would have found it (cf PGAC_PATH_COLLATEINDEX),
and so COLLATEINDEX would be set and we'd not be here at all.

Maybe the Makefile should just error out if COLLATEINDEX isn't set,
rather than trying a "fallback" value that configure has already
determined isn't going to work.

regards, tom lane


From: John Lumby <johnlumby(at)hotmail(dot)com>
To: postgresql docmaillist <pgsql-docs(at)postgresql(dot)org>
Subject: Re: Cannot build docs on Ubuntu 10.04?
Date: 2012-03-14 17:47:18
Message-ID: COL116-W65AD3198E5AD0B78B72154A3590@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs


Álvaro Herrera wrote :

> What configure would have done is put the correct value of the

> DOCBOOKSTYLE variable in Makefile.global.  In Josh's case,

> collateindex.pl was not found so the variable is empty, with the results
you see.

I see,  thanks.

Tom Lane wrote :

> No, that would not be an improvement.  If collateindex.pl were in your

> PATH, then configure would have found it (cf PGAC_PATH_COLLATEINDEX),

> and so COLLATEINDEX would be set and we'd not be here at all.

Ok

> Maybe the Makefile should just error out if COLLATEINDEX isn't set,

> rather than trying a "fallback" value that configure has already

> determined isn't going to work.

actually,  now I understand what happened,   I suggest adding an additional configure option
 --disable-docs

and configure should baulk if neither --disable-docs nor collateindex.pl in the PATH.
That makes it explicit.

Cheers    John


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-docs(at)postgresql(dot)org
Subject: Re: Cannot build docs on Ubuntu 10.04?
Date: 2012-03-22 04:12:51
Message-ID: 17355.1332389571@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-docs

I wrote:
> Maybe the Makefile should just error out if COLLATEINDEX isn't set,
> rather than trying a "fallback" value that configure has already
> determined isn't going to work.

I looked at this a bit closer, and figured out why the Makefile is
trying an apparently pointless case: the test implemented in configure
is wrong! In at least some installations of docbook, for instance the
ancient one I've got in captivity on my HPUX box, collateindex.pl is
provided in $(DOCBOOKSTYLE)/bin/, but *it is not marked executable*.
This causes AC_PATH_PROGS to not consider it valid. However, the docs
Makefile is coded to invoke the script via $(PERL) $(COLLATEINDEX),
which is presumably done precisely to be able to cope with
not-executable scripts.

So I think we should adjust the configure test to accept
$(DOCBOOKSTYLE)/bin/collateindex.pl if it is readable, whether or not it
is executable, and only use the Autoconf macro if we fall back to
searching PATH for collateindex.pl. Having done that, it should be safe
to simplify the Makefile to throw error if COLLATEINDEX isn't set.

regards, tom lane