-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/FreeImage.NET/MacOS/libfreeimage.dylib contains Intel AVX instructions, causing SIGILL signal #61
Comments
Also, I don't know if any other binaries in this project contain AVX instructions, this is the first time I've ever used this software and I was following a tutorial on how to load an image. |
@dellis1972 @KonajuGames - Did we just build FreeImage with the wrong build settings for Mac? |
Yeah, it's not a bug in the FreeImage source code. The compiler must have been set to target a CPU that supports those instructions, and my Core 2 Duo doesn't support those instructions. |
I think the original libfreeimage.dylib was sourced from home-brew.. first the 64 bit version was downloaded.. then the 32 bit then they were Looks like @KonajuGames https://github.com/KonajuGames modified it On 26 September 2015 at 19:55, wjlandryiii [email protected] wrote:
|
My Mac is from 2010, and there was nothing special with building it. The makefile provided with FreeImage specifies i386 and x86_64 as the CPU targets. I'll have a closer look. |
I think I figured it out. It looks like when you compile from source, homebrew will check the hardware you are compiling on and set compiler flags to optimize for that specific hardware. To disable the automatic hardware optimizations, you can use the homebrew command line option I bet your 2010 mac supports AVX, and that's why it was compiled that way. You can check if your system supports AVX by running the command I tried this on a mac I have access to that supports AVX. Here is the proof that it works:
|
@dellis1972 - Is this still a thing we need to fix or can we close this? |
We should probably update free image net with this stuff. That said our min MacOS is 10.7 now for the Pipeline tool, not sure that will even run on a machine that old? |
When I try building my content using Pipeline.app, I receive this error:
When debugging with lldb, I found that the illegal instruction was located in libfreeimage.dylib:
The
vxorps
instruction is an Intel AVX instruction that is not supported on older chips. According to wikipedia, the AVX extension was introduced in 2011, so any chip older than that doesn't support the extension.To work around this problem, I used homebrew to compile libfreeimage.dylib from source and replaced the dylib in the .app with the freshly compiled homebrew version:
The text was updated successfully, but these errors were encountered: