ranlib: malformed objects on 10.6

Ken Cunningham ken.cunningham.webuse at gmail.com
Mon Sep 3 22:42:42 UTC 2018


> After upgrading ports on 10.6 (I probably didn't touch the machine since about May this year) I ran into issue compiling software with clang-5.0 against libc++:
/usr/bin/ranlib: object: .libs/libfoo.a(libfoo_la-bar-file.o)
malformed object (unknown load command 2)
ar: internal ranlib command failed


Starting with clang-3.9, I found the objects could no longer be handled by the default /usr/bin/* tools, and you had to force them to use the cctools versions in /opt/local/bin/*

sometimes that was as easy as having cctools installed.

sometimes you had to send in the correct AR or RANLIB in the environment.

clang-3.7 generates objects that the default /usr/bin/* tools can handle, as did clang-3.8 I recall.

Best,

Ken
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20180903/a3182569/attachment.html>


More information about the macports-dev mailing list