Bug 259190

Summary: multimedia/libmedianfo: aborts with linking error on xml files
Product: Ports & Packages Reporter: will
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: New ---    
Severity: Affects Some People    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
patch for libmediainfo none

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.