> 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

Reply via email to