DIPlib / diplib

Quantitative Image Analysis in C++, MATLAB and Python
https://diplib.org
Apache License 2.0
211 stars 48 forks source link

DIPImage on MATLAB crashes (Mac OS) #111

Closed ronligt closed 2 years ago

ronligt commented 2 years ago

[created for Oscar D. Herrera, reported via info@diplib.org]

Component DIPimage 3.2

Describe the bug I was hoping if someone can help me address an installation issue I’ve been having with my DIPimage install on MacOS. I followed the procedures and managed to install the software as recommended. I can open DIPImage and load an image. When I try to perform a morphology option, MATLAB crashes and no report is written.

I load DIPImage as:

addpath(‘/usr/local/share/DIPimage/’)

Any suggestions to troubleshoot this issues would be appreciated and thank you,

System information:

crisluengo commented 2 years ago

There's not a lot of information here. Do other functions work? Is this similar to the FFTW issue that @ronligt found?

ronligt commented 2 years ago

This message is from Oscar:

I think we can close this issue - I believe I found a work around (technically it is in the installation procedures). Sorry for all the back and forward.

I essentially recompile with CMake but using gcc instead of the native compiler. So: Instead of

cmake ..

I did

cmake .. -DCMAKE_CXX_FLAGS="-march=native" -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11

Afterward, ran MATLAB and called the path as recommended. DIPimage worked and no crash so far.

I am new to these steps so I may not be explaining it well but the procedures does provide this alternative path instead of using Clang. Plus the 'native' option.