pdftotext Incompatible library version

Robin robince at gmail.com
Sun Nov 21 02:09:38 PST 2010


On Fri, Nov 19, 2010 at 10:45 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
> On Nov 19, 2010, at 00:12, Robin wrote:
>
>> I am trying to use pdftotext. I have updated my ports, uninstalled and
>> reinstalled poppler, but get the following message:
>> robin-mbp:~ robince$ pdftotext
>> dyld: Library not loaded: /opt/local/lib/libpng12.0.dylib
>>  Referenced from: /opt/local/bin/pdftotext
>>  Reason: Incompatible library version: pdftotext requires version
>> 45.0.0 or later, but libpng12.0.dylib provides version 40.0.0
>> Trace/BPT trap
>>
>> I thought this usually means the dependency package (libpng) has been
>> rebuilt since poppler was built - but I have uninstalled and
>> reinstalled poppler to perform a rebuild and the problem persists.
>>
>> Is there anything else I can try?
>
> What is the result of
>
> otool -L /opt/local/lib/libpng.dylib
>
> On my system, it shows that this library has the compatibility version 45.0.0 which is exactly what your pdftotext seems to be looking for. If you have some older version of libpng, upgrade libpng to the current version.
>
> If that's not it, is there perhaps a libpng.dylib somewhere else on your system, perhaps in /usr/local/lib or /sw/lib (which might be interfering with the one provided by MacPorts in /opt/local/lib)?
>
> Do you perhaps have the LIBRARY_PATH, DYLD_LIBRARY_PATH or DYLD_FALLBACK_LIBRARY_PATH environment variables set (which would be a good explanation for this problem)?

Thanks very much - that was it! Matlab intefering again... I had
DYLD_LIBRARY_PATH=:/Applications/MATLAB_R2010b.app/bin/maci64/
Unsetting it seems to solve the problem.

I was thrown by the explicit path in the error message:
>> dyld: Library not loaded: /opt/local/lib/libpng12.0.dylib
>>  Referenced from: /opt/local/bin/pdftotext
which made me think it was trying to load the right library (I had
already upgraded + reinstalled libpng).

Thanks again,

Robin


More information about the macports-users mailing list