Bug 259190 - multimedia/libmediainfo: aborts with linking error on xml files
Summary: multimedia/libmediainfo: aborts with linking error on xml files
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-15 18:02 UTC by will
Modified: 2022-03-25 15:15 UTC (History)
1 user (show)

See Also:


Attachments
patch for libmediainfo (4.71 KB, patch)
2021-10-25 12:16 UTC, will
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description will 2021-10-15 18:02:13 UTC
libmediainfo will abort with the following linking error any time it's requested to scan an XML file:
ld-elf.so.1: /usr/local/lib/libmediainfo.so.0: Undefined symbol "tfsxml_init"

This appears to be a function that comes from a bundled xml library in libmediainfo: https://github.com/MediaArea/MediaInfoLib/blob/1fc644e9579d1362fafeb2add6b54993d6fc677a/Source/ThirdParty/tfsxml/tfsxml.h

It appears that the port enables tinyxml2 support in the default build: https://cgit.freebsd.org/ports/tree/multimedia/libmediainfo/Makefile#n21

Recently, a patch landed in upstream that compiles in tfsxml even when tinyxml2 is used to resolve this issue: https://github.com/MediaArea/MediaInfoLib/pull/1434/commits/038dff8433053aada3e8bf34655e2cec67305c5c

It does not appear that a new version with this patch has been cut. Is it possible to backport this patch to fix this breakage? It's not clear when they'll cut a new release.

Thanks a ton

multimedia/libmediainfo-21.09 on FreeBSD 13-RELEASE-p4.
Comment 1 will 2021-10-25 12:16:14 UTC
Created attachment 229021 [details]
patch for libmediainfo

I applied the upstream patch, reran autogen.sh, ran `make makepatch` and got the resulting patch to Makefile.in. Building with this unconditionally builds in tfsxml, which fixes the issue with libmediainfo.
Comment 2 commit-hook freebsd_committer freebsd_triage 2022-03-25 13:53:19 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=11d96fa01c90d0ebf49eb5a60e6a3e8c336d75ca

commit 11d96fa01c90d0ebf49eb5a60e6a3e8c336d75ca
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-03-25 12:46:10 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-03-25 13:36:42 +0000

    multimedia/libmediainfo: Fix aa49adc65a51fff6afe04b2e1b51dc86189af1d2

    - Bump PORTREVISION for package change

    Tested with TINYXML2 option disabled.

    PR:             259190, 259853

 multimedia/libmediainfo/Makefile                   |  4 +--
 .../libmediainfo/files/patch-Makefile.am (gone)    | 22 ------------
 .../libmediainfo/files/patch-Makefile.in (new)     | 42 ++++++++++++++++++++++
 3 files changed, 44 insertions(+), 24 deletions(-)
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2022-03-25 15:15:09 UTC
Committed. Thanks!