gllmflndn / gifti

MATLAB/Octave GIfTI Library
https://www.gllmflndn.com/software/matlab/gifti/
MIT License
25 stars 12 forks source link

invalid mex-file #6

Closed oareii closed 3 years ago

oareii commented 3 years ago

Hi there, I am using gifti toolbox in matlab in my PC-macOS (10.15.7) with Matlab2019b & server-centOS with matlab2017b, I suddenly can't use gifti function with an invalid mex-file error...

`a=gifti('sub-01_ses-1_task-rest_run-1_space-fsaverage5_hemi-L_bold.func.gii'); Invalid MEX-file '/Users/gifti-master/@gifti/private/xml_parser.mexmaci64': dlopen(/Users/gifti-master/@gifti/private/xml_parser.mexmaci64, 6): no suitable image found. Did find: /Users/gifti-master/@gifti/private/xml_parser.mexmaci64: code signature in (/Users/gifti-master/@gifti/private/xml_parser.mexmaci64) not valid for use in process using Library Validation: library load disallowed by system policy

Error in gifti_read (line 14) t = xml_parser(filename);

Error in gifti (line 105) this = gifti_read(varargin{1},giftistruct);`

I googled a lot but nothing helps, (including delete all .mexmaci64 scripts...) I really looking forward to your reply.

Any helps would be appreciated.

Thanks!

oareii commented 3 years ago

And I looked through this page(https://www.artefact.tk/software/matlab/xml/) downloaded xmltree-2.0 and addpath as instructed, after I enter: >> mex -O xml_findstr.c Building with 'gcc'. MEX completed successfully.

But I still cannot use gifti comman to load gifti-file.

gllmflndn commented 3 years ago

Hello @oareii,

For the error with macOS, this is because you have to do something similar to the instructions given here: https://en.wikibooks.org/wiki/SPM/Installation_on_64bit_Mac_OS_(Intel)#macOS_Catalina From a Terminal in the @gifti/private directory, run the following command: xattr -d com.apple.quarantine xml_parser.mexmaci64

You also report an error with Linux, can you share the error message you get there?

Many thanks!