Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syncthing binary is not executable on catalina #45616

Closed
1 of 6 tasks
kastork opened this issue Oct 20, 2019 · 7 comments
Closed
1 of 6 tasks

syncthing binary is not executable on catalina #45616

kastork opened this issue Oct 20, 2019 · 7 comments
Labels
10.15 Catalina is specifically affected outdated PR was locked due to age

Comments

@kastork
Copy link

kastork commented Oct 20, 2019

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • are reporting a bug others will be able to reproduce and not asking a question or requesting software. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh. To get software added or changed in Homebrew please file a Pull Request
  • have a problem with brew install (or upgrade, reinstall) a single, Homebrew/homebrew-core formula (not cask) on macOS? If it's a general brew problem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a Linux problem please file this issue at https://github.com/Homebrew/linuxbrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

  • What you were trying to do (and why)

Attempting to run syncthing via brew services after successful brew install

  • What happened (include command output)
› /usr/local/opt/syncthing/bin/syncthing -no-browser -no-restart
zsh: exec format error: /usr/local/opt/syncthing/bin/syncthing
  • What you expected to happen

Expected syncthing to start

  • Step-by-step reproduction instructions (by running brew install commands)

brew install syncthing
brew services start syncthing

But to see the resulting error, instead of running brew services start just run it directly. e.g. /usr/local/opt/syncthing/bin/syncthing

@fxcoudert fxcoudert added the 10.15 Catalina is specifically affected label Oct 20, 2019
@fxcoudert
Copy link
Member

fxcoudert commented Oct 20, 2019

It is possibly due to Homebrew/brew#6539

What happens if you do file /usr/local/opt/syncthing/bin/syncthing and xxd /usr/local/opt/syncthing/bin/syncthing | head -n 30?

@sihoang
Copy link

sihoang commented Oct 21, 2019

I use brew to install syncthing and ethereum which are written and built in golang. Both stop working after upgrading to Catalina.

I don't have access to my mac now. When I ran file, it said the file is data instead of an executable.

@fxcoudert
Copy link
Member

You can reinstall from source with brew reinstall -s.

@kastork
Copy link
Author

kastork commented Oct 21, 2019

Answering @fxcoudert ...
"
What happens if you do file /usr/local/opt/syncthing/bin/syncthing and xxd /usr/local/opt/syncthing/bin/syncthing | head -n 30?
"

sims: kirk/
› file /usr/local/opt/syncthing/bin/syncthing
/usr/local/opt/syncthing/bin/syncthing: data

sims: kirk/
› /opt/syncthing/bin/syncthing | head -n 30
zsh: no such file or directory: /opt/syncthing/bin/syncthing

sims: kirk/
› /usr/local/opt/syncthing/bin/syncthing | head -n 30
zsh: exec format error: /usr/local/opt/syncthing/bin/syncthing

@kastork
Copy link
Author

kastork commented Oct 21, 2019

After trying the above, I did

brew reinstall -s syncthing

Then just did

syncthing

And it started right up.

Killed it and did

brew services start syncthing

And again, it started right up.

The reinstall gave this output, I'm not sure what effect the detached head situation will have on the rest of my brew.

==> Reinstalling syncthing
==> Cloning https://github.com/syncthing/syncthing.git
Cloning into '/Users/kirk/Library/Caches/Homebrew/syncthing--git'...
Note: switching to '2c88e473cb089e377628cdd4ea086eb60ff2b195'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

==> Checking out tag v1.3.0
HEAD is now at 2c88e47 readme: Fix broken link to README-Docker.md (#6025)
==> ./build.sh noupgrade
==> Caveats
To have launchd start syncthing now and restart at login:
  brew services start syncthing
Or, if you don't want/need a background service you can just run:
  syncthing
==> Summary
🍺  /usr/local/Cellar/syncthing/1.3.0: 23 files, 20.6MB, built in 31 seconds

@fxcoudert
Copy link
Member

We've reported the tar bug to Apple, but it appears rather tricky.
Meanwhile, I have removed the Catalina bottles in cac9e66

@iwelch
Copy link

iwelch commented Oct 24, 2019

I think it is actually weirder than a specific program. I just download the binary from syncthing.net. I copy the executable syncthing to ls /usr/local/Cellar/syncthing/1.3.0/bin, overriding the prepared one. syncthing starts up with /usr/local/bin/syncthing. it is a proper binary and works. then reboot your computer. the syncthing binary is now corrupted (data). this does not happen with 1.2.1/synthing . this indeed requires Apple clarification.

@lock lock bot added the outdated PR was locked due to age label Jan 1, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
10.15 Catalina is specifically affected outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

4 participants