[MacPorts] #69245: p5.34-xml-parser: Expat must be installed prior to building XML::Parser and I can't find it
MacPorts
noreply at macports.org
Tue Nov 26 07:09:44 UTC 2024
#69245: p5.34-xml-parser: Expat must be installed prior to building XML::Parser and
I can't find it
-------------------------------+--------------------
Reporter: ballapete | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.9.0
Resolution: | Keywords: tiger
Port: p5.34-xml-parser |
-------------------------------+--------------------
Changes (by ryandesign):
* keywords: tiger ppc => tiger
Comment:
I am able to reproduce this problem on PowerPC Mac OS X 10.4.
Replying to [comment:13 ballapete]:
> Obviously the problem is that Perl does not read the passed arguments
bur relies on environment variables. See here: https://github.com/cpan-
authors/XML-Parser/issues/83.
I have added enough debugging information to the build system to convince
myself that the internal variables are set correctly regardless whether
they are supplied as environment variables or as arguments.
The GitHub issue you refer to is unrelated to your problem.
Replying to [comment:16 ballapete]:
> But then the question arises why this Homebrew guy also failed to
install via configure arguments!
There was no mention in that GitHub issue of a failure when using
arguments, only a mention of success when using environment variables. I
believe it would also have succeeded for them if they had used arguments.
The problem appears to be that although the right paths are being given to
the makefile, `check_lib` is failing to find the expat library. After
adding further debugging commands (in inc/Devel/CheckLib.pm, I added the
line `print join(" ", @sys_cmd) . "\n";` before the line `@sys_cmd;` in
the `_compile_cmd` subroutine) I saw that the command it ran to try to
find the expat library was:
{{{
/opt/local/bin/gcc-apple-4.2 -fno-common -DPERL_DARWIN -pipe -fno-strict-
aliasing -I/opt/local/include -D_FORTIFY_SOURCE=2 -DPERL_USE_SAFE_PUTENV
-I/opt/local/include assertlibjPIfroOE.c -L/opt/local/lib
-Wl,-rpath,/opt/local/lib -lexpat -L/opt/local/lib -o assertlibDD5sItTr
}}}
Note the use of `-rpath`. Running this command manually (after changing
`assertlibjPIfroOE.c` to a non-temporary valid C file) gave the
unsurprising message:
{{{
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
collect2: ld returned 1 exit status
}}}
While this looks related to #71142, it's not; that issue doesn't affect
perl5.34.
Instead, this issue is caused by XML::Parser's bundled copy of
Devel::CheckLib which uses `-rpath` on macOS. I've filed
https://github.com/mattn/p5-Devel-CheckLib/issues/40 to ask them not to do
that on Mac OS X 10.4 and earlier. Once that's fixed, we'd need to patch
the bundled copy of Devel::CheckLib in XML::Parser until they can update
their bundled copy.
--
Ticket URL: <https://trac.macports.org/ticket/69245#comment:17>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list