PDLPorters / SciPDL

This is a repository for creating SciPDL distributions (easy install of PDL on MacOS)
GNU General Public License v3.0
1 stars 0 forks source link

problem loading module PDL::GSL::INTEG due to system policy error #1

Open m-t-sargent opened 3 weeks ago

m-t-sargent commented 3 weeks ago

Using SciPDL v2.088, installed via the dmg installer https://github.com/PDLPorters/SciPDL/releases/download/v2.088/SciPDL-v2.088-arm64.dmg, I got the following error when loading the module PDL::GSL::INTEG for the first time (other GSL modules, e.g. PDL::GSL::INTERP, worked fine from the outset):

Can't load '/Applications/PDL/lib/perl5/site_perl/5.38.2/darwin-2level/auto/PDL/GSL/INTEG/INTEG.bundle' for module PDL::GSL::INTEG: dlopen(/Applications/PDL/lib/perl5/site_perl/5.38.2/darwin-2level/auto/PDL/GSL/INTEG/INTEG.bundle, 0x0001): tried: '/Applications/PDL/lib/perl5/site_perl/5.38.2/darwin-2level/auto/PDL/GSL/INTEG/INTEG.bundle' (code signature in '/Applications/PDL/lib/perl5/site_perl/5.38.2/darwin-2level/auto/PDL/GSL/INTEG/INTEG.bundle' not valid for use in process: library load disallowed by system policy), '/System/Volumes/Preboot/Cryptexes/OS/Applications/PDL/lib/perl5/site_perl/5.38.2/darwin-2level/auto/PDL/GSL/INTEG/INTEG.bundle' (no such file), '/Applications/PDL/lib/perl5/site_perl/5.38.2/darwin-2level/auto/PDL/GSL/INTEG/INTEG.bundle' (code signature in '/Applications/PDL/lib/perl5/site_perl/5.38.2/darwin-2level/auto/PDL/GSL/INTEG/INTEG.bundle' not valid for use in process: library load disallowed by system policy) at /Applications/PDL/lib/perl5/5.38.2/darwin-2level/DynaLoader.pm line 210. at (eval 66) line 4. Compilation failed in require at (eval 66) line 4. BEGIN failed--compilation aborted

My operating system is macOS Sonoma 14.5, on a MacBook Air (v2023, with an Apple M2 chip).

This issue was solved by doing 'xattr -d com.apple.quarantine /Applications/PDL/lib/perl5/site_perl/5.38.2/darwin-2level/auto/PDL/GSL/INTEG/INTEG.bundle'. (The output of 'xattr -l' on INTEG.bundle was: "com.apple.quarantine: 0181;669994fa;Vivaldi;" .)

karlglazebrook commented 3 weeks ago

This one beats me and I can not reproduce (tried two Sonoma machines) so any thoughts from the community would be greatly appreciated!

mohawk2 commented 3 weeks ago

Just thinking in terms of dumb bodges: is there any downside to blindly doing the xattr command in an install script for SciPDL (with the right path)?

mohawk2 commented 3 weeks ago

Also, is the whole of SciPDL including all its .bundle files definitely signed? https://stackoverflow.com/questions/66983242/security-issues-downloading-application-for-macos-library-load-disallowed-by

This shows how to check such signatures: https://forums.developer.apple.com/forums/thread/716918