Tag Archives: yosys

The MAC installation yosys encountered an ‘dyld: malformed mach-o image’ error

Instead of brew install yosys, I build from source because I don’t know how to use brew.

I didn’t have any problems with readme, make and make install (which surprised me. You know, it seems difficult for me to compile c code on MAC)

Running yosys, an error was encountered:

dyld: malformed mach-o image: dylib load command #13 string extends beyond end of load command
Abort trap: 6

I’m glad that a powerful person encountered the same problem. Thank you for seeing this issue. I think it’s difficult for others to meet it. It’s a strip problem. Make install executed the strip command. It doesn’t matter. The problem is that the strip on this machine is not a strip provided by Xcode, but a GNU strip installed by brew. It probably doesn’t consider the MAC format, resulting in a strip error.

Solution: remove the place where the strip is executed in the makefile. Or delete the symlink of the strip in the path, so that the strip points to/usr/bin/strip again. This is dedicated to the Mac platform, so there will be no error