mphowardlab / gsd-vmd

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

Installing - i386 architecture is deprecated for macOS #2

Closed jsbtic closed 5 years ago

jsbtic commented 5 years ago

Hi and apologies, this issue isn't really due to gsd-vmd, but due to the fact Xcode does no longer support i386. Upon using make install one gets

$ make install
Scanning dependencies of target gsdplugin
[  9%] Building C object CMakeFiles/gsdplugin.dir/gsdplugin.c.o
[ 18%] Building C object CMakeFiles/gsdplugin.dir/gsd.c.o
[ 27%] Linking C shared library gsdplugin.so
ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, missing required architecture i386 in file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd

Unfortunately VMD binary is only available as 32-bit version for macOS (as noted in README.md), so the problem cannot simply be avoided by removing the i386 option from CMakeLists.txt. Do you have any workarounds suggestions?

br

mphoward commented 5 years ago

Thanks for reporting this issue. Unfortunately, I am not aware of many viable workarounds for this problem. VMD currently only ships as a 32-bit application for Mac. The next release of macOS will fully deprecate 32-bit applications, and so any fixes to this plugin would only delay the inevitable... You might try the VMD mailing lists for 32-bit VMD on macOS High Sierra or Mojave.

One thing you might be able to try for now is to install an older version of XCode (<= 9.4 from the release notes) alongside the current version and compile with the older one. You will need to be careful to force CMake to find the right C compiler, linker, etc.

I may eventually try to get gsd-vmd bundled with VMD, and then it would work out of the box with whatever binaries they have supplied. There is no planned timeline to do this though.

mphoward commented 5 years ago
jsbtic commented 5 years ago

Hi, thanks for the quick reply. The bundle option sounds nice - meanwhile I'll try to compile with older XCode version.

jsbtic commented 5 years ago

Much obliged, Michael - your suggestions worked well.

Indeed one has to download the Xcode v9.4 from Apple Developer site: Xcode_9.4.xip (> 4Gb!). Opening the Xcode_9.4.xip will create Xcode.app folder in Downloads

Then one can install the gsd-vmd plugin by

cd /path/to/gsd-vmd
sudo xcode-select -s /Users/$USER/Downloads/Xcode.app/Contents/Developer
mkdir build && cd build
cmake ..
sudo make install

Afterwards, one should probably reset the Xcode version to the latest

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/
mphoward commented 5 years ago

Great, I'm glad that worked and thanks for reporting back on this workaround.