You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

zsh exec format error

I am trying to run a Linux executable from terminal via zsh. I continue to get the exec format error, even though the executable is in the correct working directory and is 1.1 MB (not empty due to truncation). Any suggestions?


The software can be downloaded at: http://csg.sph.umich.edu/abecasis/metal/download/


PATH TO EXECUTABLE ~ % ./metal

zsh: exec format error: ./metal

Posted on Nov 5, 2020 3:17 PM

Reply
Question marked as Top-ranking reply

Posted on Nov 6, 2020 4:59 AM

As the last entry in the change log is for 2011, you may find dependencies in the source code that will be hard to find or now compatible. They also expect builds using GNU C++ (as it was in 2011), so could be a bumpy ride with either the current version of that compiler, or even Apple's clang compiler.


Unless you are actually running this on a Linux distribution, you likely want the Darwin build specifically for Mac.

Similar questions

4 replies
Question marked as Top-ranking reply

Nov 6, 2020 4:59 AM in response to cusackse2

As the last entry in the change log is for 2011, you may find dependencies in the source code that will be hard to find or now compatible. They also expect builds using GNU C++ (as it was in 2011), so could be a bumpy ride with either the current version of that compiler, or even Apple's clang compiler.


Unless you are actually running this on a Linux distribution, you likely want the Darwin build specifically for Mac.

Nov 6, 2020 8:25 AM in response to VikingOSX

That’s not the problem with this code. It’s just really ancient. But it is kind of nice just having a plain-ole makefile for a change. I’m trying to update my big program to use a more recent build of pdfium. It uses Google’s crazy build systems. It's just insane.


But this project is simple. All I had to do is remove the “-static” from the Makefile and it compiles with no problem. I don’t know if it works or not because I have no idea what it does.


But build systems these days have really gone off the deep end. Here is what I have to do in order to update the pdfium project.

1) Install the one specific build that works, with custom 3rd party build scripts, on a Linux computer.

2) Keep trying to build it, installing necessary dependencies when it fails. Note that I can’t just rebuild after installing a dependency. I have to blow away the project and start a new build from scratch. It’s not fast either.

3) Zip up the result and copy it to my Mac. I have to prune it a bit to remove all of Google’s “depot tools”. Otherwise the zip file is 3.4 GB.

4) Do a recursive diff to look for changes to the source code. Most of the changes are to the testing suite and “fuzzers”, which I don’t need.

5) I’ve already built a custom Xcode project to do the actual build. I just had to update some #defines that have changed, double-check my hacks, remove files that no longer build and apparently were part of the XFA module that I never needed anyway.


This is state of the art stuff!

Nov 6, 2020 10:32 AM in response to etresoft

I did not bother to download the source code, as I had other demands on my time. Yes, I remember when the software development process, and makefiles (even those with custom SCCS rules), were still simple. I also remember being at a customer site where a contractor made a SunOS makefile that had other makefile calls in it to 19 levels… and a source pool that was 50 directories deep.

zsh exec format error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.