Opened 12 months ago

Closed 12 months ago

Last modified 8 months ago

#22172 closed defect (wontfix)

libxml2 python bindings don't build by default

Reported by: Joe Locash Owned by: blfs-book
Priority: normal Milestone: 13.0
Component: BOOK Version: git
Severity: medium Keywords:
Cc:

Description

Starting with v2.15.0 building the python bindings is set to off by default. Passing --with-python to configure is now needed.

Change History (14)

comment:1 by zeckma, 12 months ago

​https://archlinux.org/packages/extra/x86_64/python-lxml/ covers packages that need the Python3 bindings for libxml2. A number of them are in BLFS. We should add --with-python to libxml2.

in reply to:  1 comment:2 by Xi Ruoyao, 12 months ago

Replying to zeckma:

​https://archlinux.org/packages/extra/x86_64/python-lxml/ covers packages that need the Python3 bindings for libxml2. A number of them are in BLFS. We should add --with-python to libxml2.

lxml is a separate package (it's already in BLFS Python modules page) and it has nothing to do with libxml2 Python bindings.

comment:3 by Xi Ruoyao, 12 months ago

The Python bindings are supposed to be removed in libxml2-2.16 thus we shouldn't rely on it, or we'll hit errors when libxml2-2.16 is released anyway. We should just remove it.

comment:4 by Xi Ruoyao, 12 months ago

IIRC the only thing requiring libxml2 Python binding is itstool. The libxml2 author proposed to use lxml instead: ​https://github.com/itstool/itstool/pull/57 and it's already used by some other distros.

comment:5 by Xi Ruoyao, 12 months ago

lxml FTBFS with libxml2-2.15.0 but still it has nothing to do with the Python binding removal. See #22174.

comment:6 by Xi Ruoyao, 12 months ago

itstool ported to lxml at r12.4-119-ge69c70cc94.

On Ubuntu the packages depending on itstool python3-libxml2 are:

    Depends: xgridfit 
    Depends: virtinst 
    Depends: daps 
    Depends: xgridfit 
    Depends: virtinst 
    Depends: python3-dmidecode 
    Depends: munin-libvirt-plugins 
    Depends: itstool 

All packages other than itstool are not in BLFS (only daps and dmidecode are listed as external dependencies and we've no guarantee the external dependencies will ever build).

Last edited 12 months ago by Xi Ruoyao (previous) (diff)

comment:7 by Joe Locash, 12 months ago

I'm seeing 1 issue (so far) with the change when doing a 'make install-docs' for postgres:

make[1]: Entering directory '/tmp/build/postgresql-17.6/doc/src'
make -C sgml install
make[2]: Entering directory '/tmp/build/postgresql-17.6/doc/src/sgml'
/usr/bin/xmllint --nonet --path . --path . --output postgres-full.xml --noent --valid postgres.sgml
ref/pg_combinebackup.sgml:287: validity error : standalone: normalization of attribute linkend on xref by external subset declaration
   state of the cluster using <xref linkend="app-pgchecksums "/> is
                                                              ^
make[2]: *** [Makefile:72: postgres-full.xml] Error 3
make[2]: *** Deleting file 'postgres-full.xml'
make[2]: Leaving directory '/tmp/build/postgresql-17.6/doc/src/sgml'
make[1]: *** [Makefile:8: install] Error 2

in reply to:  7 comment:8 by Xi Ruoyao, 12 months ago

Replying to Joe Locash:

I'm seeing 1 issue (so far) with the change when doing a 'make install-docs' for postgres:

make[1]: Entering directory '/tmp/build/postgresql-17.6/doc/src'
make -C sgml install
make[2]: Entering directory '/tmp/build/postgresql-17.6/doc/src/sgml'
/usr/bin/xmllint --nonet --path . --path . --output postgres-full.xml --noent --valid postgres.sgml
ref/pg_combinebackup.sgml:287: validity error : standalone: normalization of attribute linkend on xref by external subset declaration
   state of the cluster using <xref linkend="app-pgchecksums "/> is
                                                              ^
make[2]: *** [Makefile:72: postgres-full.xml] Error 3
make[2]: *** Deleting file 'postgres-full.xml'
make[2]: Leaving directory '/tmp/build/postgresql-17.6/doc/src/sgml'
make[1]: *** [Makefile:8: install] Error 2

Still I cannot see how it's related to Python module or not. I guess it's libxml2-2.15.0 does not like the extra whitespace before "...

in reply to:  7 ; comment:9 by Xi Ruoyao, 12 months ago

Replying to Joe Locash:

I'm seeing 1 issue (so far) with the change when doing a 'make install-docs' for postgres:

Try ​https://gitlab.gnome.org/GNOME/libxml2/-/commit/da45a190f718e8e2f0e3d2a6325ffa23abc8b90c?

in reply to:  9 ; comment:10 by Joe Locash, 12 months ago

Replying to Xi Ruoyao:

Replying to Joe Locash:

I'm seeing 1 issue (so far) with the change when doing a 'make install-docs' for postgres:

Try ​https://gitlab.gnome.org/GNOME/libxml2/-/commit/da45a190f718e8e2f0e3d2a6325ffa23abc8b90c?

That fixes it.

in reply to:  10 comment:11 by Xi Ruoyao, 12 months ago

Replying to Joe Locash:

Replying to Xi Ruoyao:

Replying to Joe Locash:

I'm seeing 1 issue (so far) with the change when doing a 'make install-docs' for postgres:

Try ​https://gitlab.gnome.org/GNOME/libxml2/-/commit/da45a190f718e8e2f0e3d2a6325ffa23abc8b90c?

That fixes it.

Applied at r12.4-132-g917db9bb3a.

comment:12 by Xi Ruoyao, 12 months ago

BTW the fix above is also needed to render BLFS itself correctly: without it the empty "Download (FTP)" entries are not removed.

Last edited 12 months ago by Xi Ruoyao (previous) (diff)

comment:13 by Xi Ruoyao, 12 months ago

Resolution: → wontfix
Status: new → closed

comment:14 by Bruce Dubbs, 8 months ago

Milestone: 12.5 → 13.0

Milestone renamed

Note: See TracTickets for help on using tickets.