[MacPorts] #66211: gv @3.7.4 does not launch because symbol _yylex is not found in flat namespace
MacPorts
noreply at macports.org
Fri Jan 20 11:59:43 UTC 2023
#66211: gv @3.7.4 does not launch because symbol _yylex is not found in flat
namespace
------------------------+------------------------
Reporter: ballapete | Owner: ryandesign
Type: defect | Status: accepted
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords: monterey
Port: gv |
------------------------+------------------------
Comment (by andrewathome):
I see the same error with gv 3.7.4 and Ventura 13.1 on arm64.
So I did a bit of digging and came up with the below hack that seems to
work around the issue.
I've added this update in case someone else finds it useful.
----
Looks like the undefined symbol _yylex is not in gv itself, but in a
dynamic library:
/opt/local/lib/libfl.2.dylib
It's not clear why this library is included, since it only provides two
symbols:
_main (already provided in gv itself), and _yywrap (not used in gv or in
any of the other dynamic libraries).
So I created an (almost) empty dynamic library and installed it as
/opt/local/lib/fake.dylib,
and replaced the reference to the offending libfl.2 by using this command:
install_name_tool -change /opt/local/lib/libfl.2.dylib
/opt/local/lib/fake.dylib /opt/local/bin/gv
Now my gv no longer aborts with the unresolved symbol error,
and I am able to view postscript docs.
Of course the usual caveats apply: it's a hack/workaround, not a solution;
it's unlikely to be futureproof; I haven't tested the patched gv
exhausatively, so there could well be gotyas that I haven't yet stumbled
upon.
--
Ticket URL: <https://trac.macports.org/ticket/66211#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list