stepper
stepper

Reputation: 1157

otool -L: Not a Mach-O filetype

I'm trying to use Magick.Net on OS X, and I've been following this guide to do so. It's a guide for Linux, but OS X is Unix so I assume that it should work the same.

I think I'm close to making it work but I've got a problem with the dependencies, and I want to see the dependencies of a .so file.
So I Googled how to look a the dependencies of a .so file on Linux, and stumbled upon otool -L.
This tool looks at the depdencies and also sees if it can find the dependencies it needs, which is what I want because it makes everything easier.

But when I run otool -L Magick.NET-Q8-x64.dll.so, I get the error message Not a Mach-O filetype

So what do I do now? Is there an alternative I can use or am I using the program wrong?

Upvotes: 1

Views: 9798

Answers (1)

TheDarkKnight
TheDarkKnight

Reputation: 27621

OS X is Unix so I assume that it should work the same

Here lies the issue. macOS is Unix based, but its executable file format (Mach-O) is unique to macOS / OS X and its predecessor NeXT. Otool on macOS expects a Mach-O file, not a linux .so file as they're not binary compatible.

As the guide you linked to states it is required to have a Linux build machine running; however, Linux Is Not Unix.

Is there an alternative I can use

Follow the instructions in the guide, which states a requirement is a Linux machine and run otool under Linux.

Upvotes: 1

Related Questions