Checked all that. It seems what is happening is that the bundle is failing to find the packed libxml2, which seems to be in:
<cachedir>/inc/shlib/darwin-thread-multi-2level/opt/local/lib and is falling back to the old one in /usr/local/lib which is version 10.0.0 I didn’t notice initially because it was incorrectly finding the correct version in /opt/local/lib/libxml2.2.dylib. When I rename this, I get the error. I have no idea why it’s not finding the packed lib any more. I had similar issues on linux due to RPATHs in the .so but I haven’t had that issue on OSX before. The XML::LibXML bundle gives: > otool -L > /opt/local/lib/perl5/site_perl/5.26/darwin-thread-multi-2level/auto/XML/LibXML/LibXML.bundle /opt/local/lib/perl5/site_perl/5.26/darwin-thread-multi-2level/auto/XML/LibXML/LibXML.bundle: /opt/local/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.7.0) /opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11) /opt/local/lib/liblzma.5.dylib (compatibility version 8.0.0, current version 8.3.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0) /opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.0.0) If I use install_name_tool to set a non-absolute path for libxml2.2.dylib in this bundle, it makes no difference and gives the same error. So, it seems to be that the packed LibXML.bundle can’t find the packed library? Many thanks for your support. PK > On 6 Nov 2017, at 7:12 pm, Roderich Schupp <roderich.sch...@gmail.com> wrote: > > > On Mon, Nov 6, 2017 at 12:09 AM, Kime Philip <philk...@kime.org.uk> wrote: > Reason: Incompatible library version: 79628e8f.bundle requires version > 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0 at > /loader/HASH(0x10188cc08)/DynaLoader.pm line 197. > > > These version numbers presumably are MacOS versions? > > > I am explicitly linking the libxml2 library in which exists and which passes > all tests with XML::LibXML. A bit confused since the error message says it > can’t load /opt/local/lib/libxml2.2.dylib which isn’t where it should be > getting it from (should be in the packed tree). If I have libxml2 at > /opt/local/lib, the packed exe works as expected. > > From that I guess that your installed libxml2 library is *not* in > /opt/local/lib? And you passed its full pathname as "--lib path" to pp? > Are you sure that > /var/folders/xk/81hr0f0n4hz_n1kwjp6lt70r0000gn/T/par-64626d7271/cache-82ce96a9b579ca7d831ec5498c59bb9c4087cc21/79628e8f.bundle > is actually "your" .../XML/LibXML/LibXML.bundle (check MD5s or similar) and > not from somewhere else? > Have you checked that the packed executable contains libxml2.2.dylib? > > Cheers, Roderich > -- Dr Philip Kime