Setting up syncthing-inotify on a mac

Hello,

I’m trying to set up syncthing-inotify on my mac. I downloaded the darwin_amd64 verison and followed the instructions to “Run and hide on unix in a screen”

screen -S inotify -dm ./syncthing-inotify

Later checking with screen -ls the previous command didn’t create a new screen. I also checked that after running the command the sync only happen on a rescan. Running ./syncthing-inotify -help gives a “Illegal instruction: 4” Error.

Should the binary be copied to a specific folder? I would be grateful for more detailed install instructions as the documentation is scarce.

Thank you all for developing this wonderful software

Could we have more details about your OSX system?

It’s a 15 inch Macbook Pro from 2011 running OS X 10.7.5.

I have also tested it on a mac running 10.8.5 and the issue isn’t present (The screen command creates a new screen as expected). Is there now a nice way to start at login and put the binary in a nicer folder?

This is somewhat off-topic, but I’m wondering how “inotify” works on non-Linux platforms. I thought that inotify was a Linux kernel feature. Does golang provide a cross-platform filesystem watcher that just happens to be called inotify?

Uses inotify, kqueue, FSEvents or ReadDirectoryChangesW.

No, see https://godoc.org/github.com/rjeczalik/notify

This seems to be a thing with binaries built for OS X 10.8+ being run on 10.7. That OS is fairly old at this point… I’m guessing syncthing-inotify is linked against too new system libraries.

I don’t know off hand how to do the right thing in the Go build process - does the regular Syncthing binary work for you?

I’m guessing I’ll have to update the system, as I know nothing of building with go. What is the best practice for making syncthing-inotify start on login? Should I put it in /etc and add the screen command to bash_profile?

On Mac I’d recommend using launchd. You can adapt https://github.com/syncthing/syncthing/tree/master/etc/macosx-launchd by basically replacing syncthing with syncthing-inotify and it should work the same.