Error Building Postgres 17.0 from Source

Поиск
Список
Период
Сортировка
Искать

Error Building Postgres 17.0 from Source

От:
Corbin Cavolt <ccavolt@pm.me>
Дата:
Hi,

I'm having a problem building Postgres 17.0 from source. I'm able to build all the 16.x versions just fine; I'm running into an error specifically with version 17.0. I use a devcontainer for development with my own postgres feature here: https://github.com/ccavolt/devcontainer-features/tree/main/src/postgres. As you can see I'm using Debian Bookworm for testing. If you open up the repo in a Codespace or a devcontainer and run the following command, you should be able to see the same errors that I'll post below:

Here's the command: 

devcontainer features test --features postgres --filter postgres-default --skip-autogenerated --skip-duplicated --preserve-test-containers

Here's the relevant logs:

make[1]: Entering directory '/root/downloads/postgresql-17.0/doc'
make -C src all
make[2]: Entering directory '/root/downloads/postgresql-17.0/doc/src'
make -C sgml all
make[3]: Entering directory '/root/downloads/postgresql-17.0/doc/src/sgml'#20 31.08 { \
  echo "<!ENTITY version \"17.0\">"; \
  echo "<!ENTITY majorversion \"17\">"; \
} > version.sgml
'/usr/bin/perl' ./mk_feature_tables.pl YES ../../../src/backend/catalog/sql_feature_packages.txt ../../../src/backend/catalog/sql_features.txt > features-supported.sgml
'/usr/bin/perl' ./mk_feature_tables.pl NO ../../../src/backend/catalog/sql_feature_packages.txt ../../../src/backend/catalog/sql_features.txt > features-unsupported.sgml
'/usr/bin/perl' ./generate-errcodes-table.pl ../../../src/backend/utils/errcodes.txt > errcodes-table.sgml
'/usr/bin/perl' ./generate-keywords-table.pl . > keywords-table.sgml
'/usr/bin/perl' ./generate-targets-meson.pl targets-meson.txt generate-targets-meson.pl > targets-meson.sgml#20 31.11 '/usr/bin/perl' ../../../src/backend/utils/activity/generate-wait_event_types.pl --docs ../../../src/backend/utils/activity/wait_event_names.txt
/usr/bin/xmllint --nonet --path . --path . --output postgres-full.xml --noent --valid postgres.sgml#20 31.70 /usr/bin/xsltproc --nonet --path . --path . --stringparam pg.version '17.0'  stylesheet.xsl postgres-full.xml
compilation error: file stylesheet.xsl line 6 element import
stylesheet-html-common.xsl:4: warning: failed to load external entity "http://docbook.sourceforge.net/release/xsl/current/common/entities.ent"
%common.entities;
                 ^
stylesheet-html-common.xsl:124: parser error : Entity 'primary' not defined
                          translate(substring(&primary;, 1, 1),
                                                       ^
stylesheet-html-common.xsl:125: parser error : Entity 'lowercase' not defined
                             &lowercase;,
                                        ^
stylesheet-html-common.xsl:126: parser error : Entity 'uppercase' not defined
                             &uppercase;))
                                        ^
stylesheet-html-common.xsl:127: parser error : Entity 'scope' not defined
                          [&scope;][1]) = 1
                                  ^
stylesheet-html-common.xsl:131: parser error : Entity 'lowercase' not defined
                select="$terms[contains(concat(&lowercase;, &uppercase;),
                                                          ^
stylesheet-html-common.xsl:131: parser error : Entity 'uppercase' not defined
                select="$terms[contains(concat(&lowercase;, &uppercase;),
                                                                       ^
stylesheet-html-common.xsl:132: parser error : Entity 'primary' not defined
                                        substring(&primary;, 1, 1))]"/>
                                                           ^
stylesheet-html-common.xsl:134: parser error : Entity 'lowercase' not defined
  <xsl:variable name="others" select="$terms[not(contains(concat(&lowercase;,
                                                                            ^
stylesheet-html-common.xsl:135: parser error : Entity 'uppercase' not defined
                                                 &uppercase;),
                                                            ^
stylesheet-html-common.xsl:136: parser error : Entity 'primary' not defined
                                             substring(&primary;, 1, 1)))]"/>
                                                                ^
stylesheet-html-common.xsl:150: parser error : Entity 'primary' not defined
                                   translate(substring(&primary;, 1, 1),
                                                                ^
stylesheet-html-common.xsl:151: parser error : Entity 'lowercase' not defined
                                   &lowercase;,&uppercase;))[&scope;][1]) = 1]"
                                              ^
stylesheet-html-common.xsl:151: parser error : Entity 'uppercase' not defined
                                   &lowercase;,&uppercase;))[&scope;][1]) = 1]"
                                                          ^
stylesheet-html-common.xsl:151: parser error : Entity 'scope' not defined
                                   &lowercase;,&uppercase;))[&scope;][1]) = 1]"
                                                                    ^
stylesheet-html-common.xsl:157: parser error : Entity 'primary' not defined
        <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
                                             ^
stylesheet-html-common.xsl:157: parser error : Entity 'lowercase' not defined
        <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
                                                          ^
stylesheet-html-common.xsl:157: parser error : Entity 'uppercase' not defined
        <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
                                                                       ^
stylesheet-html-common.xsl:165: parser error : Entity 'primary' not defined
                        $others[@type = $type][count(.|key('primary', &primary;)
                                                                               ^
stylesheet-html-common.xsl:165: parser error : Entity 'scope' not defined
                $others[@type = $type][count(.|key('primary', &primary;)[&scope;
                                                                               ^
stylesheet-html-common.xsl:174: parser error : Entity 'primary' not defined
           <xsl:apply-templates select="$others[count(.|key('primary', &primary;
                                                                               ^
stylesheet-html-common.xsl:174: parser error : Entity 'scope' not defined
  <xsl:apply-templates select="$others[count(.|key('primary', &primary;)[&scope;
                                                                               ^
stylesheet-html-common.xsl:180: parser error : Entity 'primary' not defined
                <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)
                                                     ^
stylesheet-html-common.xsl:180: parser error : Entity 'lowercase' not defined
                <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)
                                                                  ^
stylesheet-html-common.xsl:180: parser error : Entity 'uppercase' not defined
                <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)
                                                                               ^
stylesheet-html-common.xsl:198: parser error : Entity 'primary' not defined
                                          &primary;)[&scope;][1]) = 1]"
                                                   ^
stylesheet-html-common.xsl:198: parser error : Entity 'scope' not defined
                                          &primary;)[&scope;][1]) = 1]"
                                                            ^
stylesheet-html-common.xsl:204: parser error : Entity 'primary' not defined
                <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)
                                                     ^
stylesheet-html-common.xsl:204: parser error : Entity 'lowercase' not defined
                <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)
                                                                  ^
stylesheet-html-common.xsl:204: parser error : Entity 'uppercase' not defined
                <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)
                                                                               ^
stylesheet-html-common.xsl:213: parser error : Entity 'primary' not defined
                                 translate(substring(&primary;, 1, 1),
                                                              ^
stylesheet-html-common.xsl:214: parser error : Entity 'lowercase' not defined
                                           &lowercase;,&uppercase;))[&scope;][1]
                                                      ^
stylesheet-html-common.xsl:214: parser error : Entity 'uppercase' not defined
                                           &lowercase;,&uppercase;))[&scope;][1]
                                                                  ^
stylesheet-html-common.xsl:214: parser error : Entity 'scope' not defined
                                           &lowercase;,&uppercase;))[&scope;][1]
                                                                            ^
stylesheet-html-common.xsl:220: parser error : Entity 'primary' not defined
      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
                                           ^
stylesheet-html-common.xsl:220: parser error : Entity 'lowercase' not defined
      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
                                                        ^
stylesheet-html-common.xsl:220: parser error : Entity 'uppercase' not defined
      <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
                                                                     ^
stylesheet-html-common.xsl:231: parser error : Entity 'primary' not defined
                select="translate(substring(&primary;, 1, 1),
                                                     ^
stylesheet-html-common.xsl:232: parser error : Entity 'lowercase' not defined
                         &lowercase;,&uppercase;)"/>
                                    ^
stylesheet-html-common.xsl:232: parser error : Entity 'uppercase' not defined
                         &lowercase;,&uppercase;)"/>
                                                ^
stylesheet-html-common.xsl:234: parser error : Entity 'scope' not defined
  <xsl:if test="key('letter', $key)[&scope;]
                                           ^
stylesheet-html-common.xsl:235: parser error : Entity 'primary' not defined
                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
                                                 ^
stylesheet-html-common.xsl:235: parser error : Entity 'scope' not defined
                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
                                                          ^
stylesheet-html-common.xsl:242: parser error : Entity 'lowercase' not defined
      <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
                                               ^
stylesheet-html-common.xsl:242: parser error : Entity 'uppercase' not defined
      <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
                                                            ^
stylesheet-html-common.xsl:244: parser error : Entity 'lowercase' not defined
          <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
                                                           ^
stylesheet-html-common.xsl:244: parser error : Entity 'uppercase' not defined
          <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
                                                                        ^
stylesheet-html-common.xsl:248: parser error : Entity 'scope' not defined
        <xsl:apply-templates select="key('letter', $key)[&scope;]
                                                                ^
stylesheet-html-common.xsl:249: parser error : Entity 'primary' not defined
                                     [count(.|key('primary', &primary;)
                                                                      ^
stylesheet-html-common.xsl:250: parser error : Entity 'scope' not defined
                                     [&scope;][1])=1]"
                                             ^
stylesheet-html-common.xsl:256: parser error : Entity 'primary' not defined
          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
                                               ^
stylesheet-html-common.xsl:256: parser error : Entity 'lowercase' not defined
          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
                                                            ^
stylesheet-html-common.xsl:256: parser error : Entity 'uppercase' not defined
          <xsl:sort select="translate(&primary;, &lowercase;, &uppercase;)"/>
                                                                         ^
stylesheet-html-common.xsl:270: parser error : Entity 'primary' not defined
                select="translate(substring(&primary;, 1, 1),
                                                     ^
stylesheet-html-common.xsl:271: parser error : Entity 'lowercase' not defined
                        &lowercase;,&uppercase;)"/>
                                   ^
stylesheet-html-common.xsl:271: parser error : Entity 'uppercase' not defined
                        &lowercase;,&uppercase;)"/>
                                               ^
stylesheet-html-common.xsl:273: parser error : Entity 'scope' not defined
  <xsl:if test="key('letter', $key)[&scope;]
                                           ^
stylesheet-html-common.xsl:274: parser error : Entity 'primary' not defined
                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
                                                 ^
stylesheet-html-common.xsl:274: parser error : Entity 'scope' not defined
                [count(.|key('primary', &primary;)[&scope;][1]) = 1]">
                                                          ^
stylesheet-html-common.xsl:275: parser error : Entity 'lowercase' not defined
    <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
                                             ^
stylesheet-html-common.xsl:275: parser error : Entity 'uppercase' not defined
    <xsl:if test="contains(concat(&lowercase;, &uppercase;), $key)">
                                                          ^
stylesheet-html-common.xsl:281: parser error : Entity 'lowercase' not defined
        <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
                                                         ^
stylesheet-html-common.xsl:281: parser error : Entity 'uppercase' not defined
        <xsl:value-of select="translate($key, &lowercase;, &uppercase;)"/>
                                                                      ^
stylesheet-html-common.xsl:294: parser error : Entity 'lowercase' not defined
      <xsl:value-of select="translate($object/@id, &lowercase;, &uppercase;)"/>
                                                              ^
stylesheet-html-common.xsl:294: parser error : Entity 'uppercase' not defined
      <xsl:value-of select="translate($object/@id, &lowercase;, &uppercase;)"/>
                                                                           ^
stylesheet-html-common.xsl:453: parser error : Entity 'primary' not defined
  <xsl:variable name="key" select="&primary;"/>
                                            ^
stylesheet-html-common.xsl:454: parser error : Entity 'scope' not defined
  <xsl:variable name="refs" select="key('primary', $key)[&scope;]"/>
                                                                ^
stylesheet-html-common.xsl:482: parser error : Entity 'sep' not defined
e != '' or generate-id() = generate-id(key('primary-section', concat($key, &sep;
                                                                               ^
stylesheet-html-common.xsl:482: parser error : Entity 'section.id' not defined
erate-id() = generate-id(key('primary-section', concat($key, &sep;, &section.id;
                                                                               ^
stylesheet-html-common.xsl:482: parser error : Entity 'scope' not defined
 = generate-id(key('primary-section', concat($key, &sep;, &section.id;))[&scope;
                                                                               ^
stylesheet-html-common.xsl:493: parser error : Entity 'scope' not defined
                              and not(secondary)][&scope;]">
                                                         ^
stylesheet-html-common.xsl:505: parser error : Entity 'primary' not defined
-templates select="$refs[generate-id() = generate-id(key('see', concat(&primary;
                                                                               ^
stylesheet-html-common.xsl:505: parser error : Entity 'sep' not defined
tes select="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;
                                                                               ^
stylesheet-html-common.xsl:505: parser error : Entity 'sep' not defined
ect="$refs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;
                                                                               ^
stylesheet-html-common.xsl:505: parser error : Entity 'sep' not defined
efs[generate-id() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;
                                                                               ^
stylesheet-html-common.xsl:505: parser error : Entity 'scope' not defined
() = generate-id(key('see', concat(&primary;, &sep;, &sep;, &sep;, see))[&scope;
                                                                               ^
stylesheet-html-common.xsl:511: parser error : Entity 'lowercase' not defined
        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
                                                    ^
stylesheet-html-common.xsl:511: parser error : Entity 'uppercase' not defined
        <xsl:sort select="translate(see, &lowercase;, &uppercase;)"/>
                                                                 ^
stylesheet-html-common.xsl:519: parser error : Entity 'primary' not defined
lates select="$refs[generate-id() = generate-id(key('see-also', concat(&primary;
                                                                               ^
stylesheet-html-common.xsl:519: parser error : Entity 'sep' not defined
elect="$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;
                                                                               ^
stylesheet-html-common.xsl:519: parser error : Entity 'sep' not defined
$refs[generate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;
                                                                               ^
stylesheet-html-common.xsl:519: parser error : Entity 'sep' not defined
enerate-id() = generate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;
                                                                               ^
stylesheet-html-common.xsl:519: parser error : Entity 'scope' not defined
rate-id(key('see-also', concat(&primary;, &sep;, &sep;, &sep;, seealso))[&scope;
                                                                               ^
stylesheet-html-common.xsl:525: parser error : Entity 'lowercase' not defined
            <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
                                                            ^
stylesheet-html-common.xsl:525: parser error : Entity 'uppercase' not defined
            <xsl:sort select="translate(seealso, &lowercase;, &uppercase;)"/>
                                                                         ^
stylesheet-html-common.xsl:527: parser error : Entity 'sep' not defined
emplates select="$refs[secondary and count(.|key('secondary', concat($key, &sep;
                                                                               ^
stylesheet-html-common.xsl:527: parser error : Entity 'secondary' not defined
ct="$refs[secondary and count(.|key('secondary', concat($key, &sep;, &secondary;
                                                                               ^
stylesheet-html-common.xsl:527: parser error : Entity 'scope' not defined
secondary and count(.|key('secondary', concat($key, &sep;, &secondary;))[&scope;
                                                                               ^
stylesheet-html-common.xsl:533: parser error : Entity 'secondary' not defined
            <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/
                                                   ^
stylesheet-html-common.xsl:533: parser error : Entity 'lowercase' not defined
            <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/
                                                                ^
stylesheet-html-common.xsl:533: parser error : Entity 'uppercase' not defined
            <xsl:sort select="translate(&secondary;, &lowercase;, &uppercase;)"/
                                                                             ^
stylesheet-html-common.xsl:612: parser error : Entity 'lowercase' not defined
    <xsl:sort select="translate(., &lowercase;, &uppercase;)"/>
                                              ^
stylesheet-html-common.xsl:612: parser error : Entity 'uppercase' not defined
    <xsl:sort select="translate(., &lowercase;, &uppercase;)"/>
                                                           ^
compilation error: file stylesheet.xsl line 8 element include
xsl:include : unable to load stylesheet-html-common.xsl
make[3]: *** [Makefile:130: html-stamp] Error 5
make[3]: Leaving directory '/root/downloads/postgresql-17.0/doc/src/sgml'
make[2]: Leaving directory '/root/downloads/postgresql-17.0/doc/src'
make[2]: *** [Makefile:8: all] Error 2
make[1]: *** [Makefile:16: all] Error 2
make[1]: Leaving directory '/root/downloads/postgresql-17.0/doc'
make: *** [GNUmakefile:16: world-doc-recurse] Error 2


Re: Error Building Postgres 17.0 from Source

От:
Christophe Pettus <xof@thebuild.com>
Дата:


> On Oct 4, 2024, at 09:35, Corbin Cavolt  wrote:
> 
> Hi,
> 
> I'm having a problem building Postgres 17.0 from source. I'm able to build all the 16.x versions just fine; I'm running into an error specifically with version 17.0. I use a devcontainer for development with my own postgres feature here: https://github.com/ccavolt/devcontainer-features/tree/main/src/postgres. As you can see I'm using Debian Bookworm for testing. If you open up the repo in a Codespace or a devcontainer and run the following command, you should be able to see the same errors that I'll post below:

You might try installing the Debian packages for the documentation tools; the lack of them is the usual reason for errors of that sort:

	https://www.postgresql.org/docs/devel/docguide-toolsets.html#DOCGUIDE-TOOLSETS-INST-DEBIAN

Re: Error Building Postgres 17.0 from Source

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Christophe Pettus  writes:
> On Oct 4, 2024, at 09:35, Corbin Cavolt  wrote:
>> I'm having a problem building Postgres 17.0 from source. I'm able to build all the 16.x versions just fine; I'm running into an error specifically with version 17.0.

> You might try installing the Debian packages for the documentation tools; the lack of them is the usual reason for errors of that sort:
> 	https://www.postgresql.org/docs/devel/docguide-toolsets.html#DOCGUIDE-TOOLSETS-INST-DEBIAN

Yeah, that's what it looks like.  I'm a bit confused though because
16.x should have failed the same way: building our docs without local
DTDs has failed for well over a year now [1].  Perhaps you weren't
trying to build the docs before?

			regards, tom lane

[1] https://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=969509c3f


Re: Error Building Postgres 17.0 from Source

От:
Christophe Pettus <xof@thebuild.com>
Дата:


> On Oct 4, 2024, at 12:05, Tom Lane  wrote:
> 
> Yeah, that's what it looks like.  I'm a bit confused though because
> 16.x should have failed the same way: building our docs without local
> DTDs has failed for well over a year now [1]. 

To add confusion to the fire, I was successfully building pre-17 versions ("make world") locally on MacOS fine without having to install the documentation tools.  It wasn't until 17 that it failed (and installing the doc tools as recommended fixed it).

Re: Error Building Postgres 17.0 from Source

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Christophe Pettus  writes:
> On Oct 4, 2024, at 12:05, Tom Lane  wrote:
>> Yeah, that's what it looks like.  I'm a bit confused though because
>> 16.x should have failed the same way: building our docs without local
>> DTDs has failed for well over a year now [1]. 

> To add confusion to the fire, I was successfully building pre-17 versions ("make world") locally on MacOS fine without having to install the documentation tools.  It wasn't until 17 that it failed (and installing the doc tools as recommended fixed it).

If you had a locally installed copy of the required DTDs, it should've
worked, but otherwise I don't see how ... oh, wait.  Were you building
from a source tarball?  If so, the difference is that up to v16 we
included prebuilt HTML docs in the tarballs, but as of v17 we don't.
So "make world" now triggers a local docs build where before it
didn't.

You can restore things to the status quo ante if you also download
the now-separate docs tarball, eg

https://ftp.postgresql.org/pub/source/v17.0/postgresql-17.0-docs.tar.gz

and unpack that into the same place as the main source tarball.

			regards, tom lane


Re: Error Building Postgres 17.0 from Source

От:
Christophe Pettus <xof@thebuild.com>
Дата:


> On Oct 4, 2024, at 12:34, Tom Lane  wrote:
> 
> If so, the difference is that up to v16 we
> included prebuilt HTML docs in the tarballs, but as of v17 we don't.
> So "make world" now triggers a local docs build where before it
> didn't.

Ah!  That would be it.


FAQ