mphowardlab / gsd-vmd

A VMD molfile plugin reader for HOOMD-blue GSD files.
BSD 3-Clause "New" or "Revised" License
14 stars 2 forks source link

new mac signing issue? #15

Open madilynpaul opened 4 months ago

madilynpaul commented 4 months ago

On my my new arm64 mac, I get this error when loading the GSD plugin:

Warning) Unable to open dynamic library '/Applications/VMD 1.9.4a57-arm64-Rev12.app/Contents/vmd/plugins/MACOSXARM64/molfile/gsdplugin.so'.
Warning) dlopen(/Applications/VMD 1.9.4a57-arm64-Rev12.app/Contents/vmd/plugins/MACOSXARM64/molfile/gsdplugin.so, 0x0002): tried: '/Applications/VMD 1.9.4a57-arm64-Rev12.app/Contents/vmd/plugins/MACOSXARM64/molfile/gsdplugin.so' (code signature in <54E6F370-DEEA-3B53-AF1B-D4414714853C> '/Applications/VMD 1.9.4a57-arm64-Rev12.app/Contents/vmd/plugins/MACOSXARM64/molfile/gsdplugin.so' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs), '/System/Volumes/Preboot/Cryptexes/OS/Applications/VMD 1.9.4a57-arm64-Rev12.app/Contents/vmd/plugins/MACOSXARM64/molfile/gsdplugin.so' (no such file), '/Applications/VMD 1.9.4a57-arm64-Rev12.app/Contents/vmd/plugins/MACOSXARM64/molfile/gsdplugin.so' (code signature in <54E6F370-DEEA-3B53-AF1B-D4414714853C> '/Applications/VMD 1.9.4a57-arm64-Rev12.app/Contents/vmd/plugins/MACOSXARM64/molfile/gsdplugin.so' not valid for use in process: mapping process and mapped file (non-platform) have different Team IDs)
Warning) Unable to dlopen '/Applications/VMD 1.9.4a57-arm64-Rev12.app/Contents/vmd/plugins/MACOSXARM64/molfile/gsdplugin.so':
  Unable to dlopen plugin file /Applications/VMD 1.9.4a57-arm64-Rev12.app/Contents/vmd/plugins/MACOSXARM64/molfile/gsdplugin.so

Is this something I need to fix on my end with signing the plugin somehow (this is new to me), or is this something to fix on the developer side? Thx!

mphoward commented 4 months ago

I haven't tried to compile this plugin on a Mac recently, but I would guess this is something that has to be done at compile-time, at the very end. It might be possible to do this with the XCode codesign utility, but I don't know what all goes into doing that. I would welcome a suggestion or fix if someone knows the solution.

erjank commented 4 months ago

I've been able to compile on an arm64 mac fine, but it seems the issue is that even if I generate and sign the shared object with a certificate locally, the "Team ID" that vmd is signed with differs from that of my signed gsdplugin.so. So maybe one solution is compiling vmd locally, or asking them to compile to permit third-party signed libraries?

erjank commented 4 months ago

(waiting to hear back from VMD email list)

mphoward commented 4 months ago

Thanks! Please let us know what you learn from them. If this requires a change in the VMD distribution, another option is to discuss adding this plugin internally. I never tried to do that because I wrote this a few years ago when GSD was new and it was always easy enough to build and install downstream, but it would be convenient to have GSD work out of the box in VMD now that it's been around for a while.