jeanluct / braidlab

Matlab package for analyzing data using braids
GNU General Public License v3.0
23 stars 9 forks source link

Problem with MEX on MaciOS #153

Open OdedYacobi opened 1 year ago

OdedYacobi commented 1 year ago

Hi, I can't seem to compile Mex properly, as in the following error message:

train ( braid ([1 2 -3]) ) Error using braidlab.braid/train Missing MEX: train_helper Compile braidlab to access full functionality.

I have tried to figure this out using the documentation with no luck. Perhaps if I knew where to run the "make" command this would help. I am on a Mac OS (version 12.6) and some braid commands do work, e.g. I can compute the entropy albeit with a warning sign:

entropy ( braid ([1 2 -3] )) Warning: Missing MEX: entropy_helper Compile braidlab to access full functionality. Reverting to Matlab entropy In braidlab.braid/entropy (line 231)

ans =

0.8314

Thanks for your help! - Oded

mbudisic commented 1 year ago

Oded, could you clarify what MATLAB version you're using, and if you're working on Intel or Mx (silicon) chips?

OdedYacobi commented 1 year ago

Thanks for getting back to me Marko. I am using Matlab R2022b on 2 GHz Quad-Core Intel Core i5.

jeanluct commented 1 year ago

Hi Oded, could you describe the steps you take to install braidlab? In particular, are you downloading the binaries?

OdedYacobi commented 1 year ago

Hi Jean-Luc, I downloaded the binary braidlab-3.2.5, and ran it in Matlab R2022b. Is that the information you were looking for? Thanks!

mbudisic commented 1 year ago

Oded,

Yes, I think this is what Jean-Luc was asking for. This is strange - it appears that not all libraries were packaged into the release. I'll look into it this week. I'm now on Apple M1, but MATLAB is still compiled for x86 architecture. If I manage to set-up the toolchain I will see what is missing.

Thanks for letting us know how things look on your end!

danlester000 commented 6 months ago

I've experienced a similar issue compiling braid lab for MATLAB 2023b (for Apple Silicon) on an Apple M1, and it seems that adding the following lines to the Makefile seems to make the install successful:

ifeq ($(SYS), Darwin) ifeq ($(ARCH), arm64) MEXSUFFIX = mexmaca64 endif endif

jeanluct commented 6 months ago

Good, thanks Dan. I don't use a Mac so I have no way of testing this. Perhaps I can push this to the develop branch first to see if it works.

jeanluct commented 6 months ago

Hi Dan, I basically added your code to the Makefile in the latest develop branch.