Bug 257143 - textproc/py-libxml2: Fails to run: libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks" (breaking textproc/itstool -> textproc/gtk-doc / textproc/yelp-xsl
Summary: textproc/py-libxml2: Fails to run: libxml2mod.so: Undefined symbol "xmlPopOut...
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords: needs-qa
: 257142 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-07-12 20:15 UTC by Chris Hutchinson
Modified: 2021-07-13 07:51 UTC (History)
5 users (show)

See Also:


Attachments
build log from textproc/yelp-xsl (46.72 KB, text/plain)
2021-07-12 20:15 UTC, Chris Hutchinson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Hutchinson 2021-07-12 20:15:59 UTC
Created attachment 226408 [details]
build log from textproc/yelp-xsl

On a stable 12/amd64 system using Python 3.7 as default.
Attempting to build another port that ultimately uses
textproc/yelp-xsl fails with:

--- stderr ---
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/itstool", line 27, in <module>
    import libxml2
  File "/usr/local/lib/python3.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: /usr/local/lib/python3.7/site-packages/libxml2mod.so: Undefined symbol "xmlPopOutputCallbacks"
Traceback (most recent call last):
  File "/usr/local/bin/meson", line 33, in <module>
    sys.exit(load_entry_point('meson==0.58.1', 'console_scripts', 'meson')())
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/mesonmain.py", line 231, in main
    return run(sys.argv[1:], launcher)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/mesonmain.py", line 220, in run
    return run_script_command(args[1], args[2:])
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/mesonmain.py", line 168, in run_script_command
    return module.run(script_args)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/scripts/yelphelper.py", line 132, in run
    destdir, options.project_id, options.symlinks)
  File "/usr/local/lib/python3.7/site-packages/mesonbuild/scripts/yelphelper.py", line 72, in install_help
    shutil.copy2(infile, outfile)
  File "/usr/local/lib/python3.7/shutil.py", line 266, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/lib/python3.7/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/ports/textproc/gtk-doc/work/gtk-doc-1.33.2/_build/help/manual/bn_IN/index.docbook'

FAILED: install script '/usr/local/bin/meson --internal yelphelper install --subdir=help/manual --id=gtk-doc-manual --installdir=share/help --sources=index.docbook@@fdl-appendix.xml --symlinks=true' exit code 1, stopped
FAILED: meson-install 
/usr/local/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/textproc/gtk-doc
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/security/p11-kit
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/security/gnutls
*** Error code 1

Stop.

Build log attached.

Thank you.

--Chris
Comment 1 Chris Hutchinson 2021-07-12 20:24:23 UTC
UPDATE this problem is caused by textproc/gtk-doc
which does not build with lang/python37 on a
12-stable amd64 system.

Thanks!

--Chris
Comment 2 Chris Hutchinson 2021-07-12 21:09:00 UTC
OK this was caused by Python37 and associated modules
(py-libxml2) *not* recognizing they needed
updating/installing *before* building this.
I don't know for sure where/who to blame.
Comment 3 Chris Hutchinson 2021-07-12 21:14:32 UTC
The required version and module to correct this
failure is py-libxml2-2.9.10_3.
This should probably be declared in the Makefile.

--Chris
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-13 04:00:51 UTC
(In reply to Chris Hutchinson from comment #3)

Hi Chris, its not entirely clear what the failing mode/causes are here. Can you provide steps to reproduce?

Going with the underlying apparently issue here for summary (yelp-xsl calls itstool, which uses py-libxml2, which fails to import (run))

Request feedback from relevent maintainers
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-13 04:02:39 UTC
*** Bug 257142 has been marked as a duplicate of this bug. ***
Comment 6 Chris Hutchinson 2021-07-13 04:40:30 UTC
(In reply to Kubilay Kocak from comment #4)
Thanks for the reply, and all your time here.
Sure. Already having lang/Python37 installed.
I upped my ports tree to work on mail/claws-mail
which I maintain. It has requirements (depends)
that ultimately drag in (py-)libxml2.
The ports that dragged *libxml2 failed to build,
dumping errors similar to that included in this
pr.
The root cause for the failure(s) were not
apparent. So after some time chasing possibilities
I landed at textproc/py-libxml2. Which, of course
depended upon the availability of textproc/libxml2.
The ultimate cure was to make clean && make deinstall
within both of textproc/py-libxml2, and textproc/libxml2.
Followed by a make (re)install in the same.

I _think_ that ports requiring (depending) upon these
two libs should require the newer version (2.9.10_3)
to avoid this problem. This would have signaled my
build to either fail; indicating an older (unsupported)
version was installed. Or up(date|grade) to the required
version.

Does that sound about right? In the end, that was ultimately
what was required.

Thanks again, for all your time, and attention to this.

--Chris
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-13 05:53:48 UTC
(In reply to Chris Hutchinson from comment #6)

Unless the symbols in question are only provided in 2.9.10_3, and the ports require those symbols, then yes. 

However, this appears to be the likely result of a libxml2 shared library ABI change, without a subsequent py-libxml2 (consumer) shared library update.

That can be caused by shared library version changes, without consumer ports having their PORTREVISION bumped, or by modifying port options that change the shared (libxml2) library ABI, without rebuilding consumer ports (py-libxml2) 

The last update to libxml2 was 21 Jun 2021 21:19:10, cc'ing maintainer in case they're aware of possible consumer ports impacts for additional comment, but this appears to be 'not a bug'.

Accordingly, closing as resolved given comment 6.

Don't hesitate to re-open the issue with additional detail and reproduction steps if that is not the case, or additional changes are required
Comment 8 Chris Hutchinson 2021-07-13 06:40:58 UTC
(In reply to Kubilay Kocak from comment #7)
Well it clearly added a new symbol for xmlPopOutputCallbacks.
I discovered this when looking at gnome's web page on this.
Which is what finally led me to understanding the need to
update py-libxml2, which also requires libxml2.
I'll see if I can find the Gnome page with the Changelog
again, and post a link to it here.
But IMHO if not a PORTREVISION bump, at least an honorable
mention in UPDATING should be included.

Thanks again for taking the time to look at this.

--Chris
Comment 9 Chris Hutchinson 2021-07-13 06:43:20 UTC
The Gnome Changelog I mentioned ([xml] Release of libxml2 2.9.11):

https://mail.gnome.org/archives/xml/2021-May/msg00000.html

--Chris
Comment 10 Charlie Li freebsd_committer 2021-07-13 06:48:56 UTC
Both textproc/libxml2 and textproc/py-libxml2 (one is a slave port, guess which) are at 2.9.12 in the tree.

This appears more and more as a giant operator error that keeps on giving.
Comment 11 Chris Hutchinson 2021-07-13 06:50:50 UTC
Sorry to keep spamming this. But forgot to note
that the changelog mentioned in the link I just
posted lists:

- Add xmlPopOutputCallbacks (Nick Wellnhofer)

So re-opening. As it appears to qualify for having
added (at least) one symbol that would require
a PORTREVISION bump.

Feel free to re-close this if you think I'm wrong. :-)

--Chris
Comment 12 Chris Hutchinson 2021-07-13 06:51:49 UTC
There was a collision when I tried to re-open this. :(
Comment 13 Chris Hutchinson 2021-07-13 06:55:28 UTC
(In reply to Charlie Li from comment #10)
> This appears more and more as a giant operator error that keeps on giving.
Given it's (apparently) so common. Your solution would be?
Comment 14 Charlie Li freebsd_committer 2021-07-13 06:58:26 UTC
If there was any fallout at least in the package builders, we would have known about it by now.

That symbol was an addition, not a modification or removal. The latter two would have caused a fallout even during the initial testing.

By operator error, it appears that your copy of the tree is messed up one way or another. You should not be building 2.9.10 at all, since the latest version 2.9.12 is in both latest and quarterly.
Comment 15 Chris Hutchinson 2021-07-13 07:02:20 UTC
(In reply to Charlie Li from comment #14)
Thanks for the reply, Charlie.
Puzzling, as I sucked it down only this morning,
and I'm chasing HEAD.
If you feel it's operator error on my part, feel free
to close this, and I won't torture anyone about this
again. :-)

--Chris
Comment 16 Chris Hutchinson 2021-07-13 07:51:22 UTC
OK last comment before I close this.
It appears that the common consensus is Operator Error (me).
But just for the record, in case someone else comes across
this. I (mistakenly) posted the (py-)libxml2 version listed
on FreshPorts.

The version(s) reported on my system are libxml2-2.9.12
as Charlie indicated they _should_ be.

That's it for me. If I run into this again; I'm now well
versed into how to resolve this.

A big thanks to everyone whom took the time to listen,
and advise! :-)

Sorry for the (apparent) noise.

--Chris out...