NetBSD Problem Report #56000

From www@netbsd.org  Sun Feb 21 00:32:15 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2F57E1A921F
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 21 Feb 2021 00:32:15 +0000 (UTC)
Message-Id: <20210221003213.9C9B61A923B@mollari.NetBSD.org>
Date: Sun, 21 Feb 2021 00:32:13 +0000 (UTC)
From: bapabooiee@gmail.com
Reply-To: bapabooiee@gmail.com
To: gnats-bugs@NetBSD.org
Subject: textproc/p5-XML-Parser: [macOS Big Sur] scripts fail with missing symbol `_XML_ParserCreate_MM` due to Expat.bundle not being linked against libexpat
X-Send-Pr-Version: www-1.0

>Number:         56000
>Category:       pkg
>Synopsis:       textproc/p5-XML-Parser: [macOS Big Sur] scripts fail with missing symbol `_XML_ParserCreate_MM` due to Expat.bundle not being linked against libexpat
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 21 00:35:00 +0000 2021
>Originator:     Dean Matzkov
>Release:        pkgsrc-2020Q4
>Organization:
>Environment:
Darwin MBP.local 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64 x86_64
>Description:
On my macOS Big Sur installation, Perl scripts using XML::Parser fail due to unresolved symbols in Expat.bundle, due to not being linked against libexpat.dylib:


---SNIP---
dyld: lazy symbol binding failed: Symbol not found: _XML_ParserCreate_MM
  Referenced from: /opt/pkg/lib/perl5/vendor_perl/5.32.0/darwin-thread-multi-2level/auto/XML/Parser/Expat/Expat.bundle
  Expected in: flat namespace
---/SNIP---


This problem only seems to occur on macOS Big Sur, as I have not encountered this on any previous release of macOS, and there's a few other people out there that have reported similar issues for XML::Parser.
>How-To-Repeat:
1. Run macOS Big Sur.
2. Install textproc/p5-XML-Parser
3. Run a perl script like the following:


---SNIP---
#!/usr/bin/env perl

use XML::Parser;

$p = XML::Parser->new(Style => 'Debug');
$p->parse('<foo id="me">Hello World</foo>');
---/SNIP---
>Fix:
I was able to work around this problem by editing the Makefile/Makefile.PL files in the Expat/ subdirectory and manually appending "-lexpat" to LDFLAGS for Expat.bundle. However, I'm not sure what an elegant solution for Pkgsrc could be, or if this should just be directed to upstream instead.

Thanks.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.