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

Segmentation Fault #38

Closed
esttorhe opened this issue Oct 17, 2015 · 8 comments
Closed

Segmentation Fault #38

esttorhe opened this issue Oct 17, 2015 · 8 comments

Comments

@esttorhe
Copy link
Contributor

Version swiftgen 0.5.0_1 installed with via brew doesn't work and throws the following error no matter what command I try :(

Tried with Xcode 7 and Xcode 7.1

swiftgen
[1]    72547 segmentation fault  swiftgen
@AliSoftware
Copy link
Collaborator

That's probably because it has detected your Twitter name and want to troll you 😉

But seriously, when installed via brew and especially if Homebrew did pour the "bottle" (= the precompiled version of swiftgen directly downloaded via a .tar.gz) instead of compiling it on your machine locally during installation, then swiftgen will have a @rpath set to some path inside /Applications/Xcode.app/… so that's where it's gonna look for the Swift dylibs to load. Even if that version installed at that path is in fact Xcode 6.

I added a protection in SwiftGen's formula to only use the bottle if the path /Applications/Xcode.app exist on your machine but didn't check that the version at that path was Xcode 7.0.1. I'll bet that's not the case for you and that's the cause of the SegFault because SwiftGen will then load Xcode 6's Swift libs instead of Xcode 7's ones, no matter what xcode-select -p you have.

@AliSoftware
Copy link
Collaborator

Could you rename your Xcode 7.0.1 to /Applications/Xcode.app and try again?

@esttorhe
Copy link
Contributor Author

Oh! The twitter handle irony 😂

I do have a symlink pointing to 7.1; don't know if that's the issue or if it should be pointing to 7.0.1 instead.

I'll try changing it anyways.

Xcode.app -> /Applications/Xcode-7.1.app

@esttorhe
Copy link
Contributor Author

Changing the symlink to 7.0.1 and «re-pouring» the bottle fixed it 🍻

Don't know if 7.1 doesn't work for this or what ¯_(ツ)_/¯

I'm closing it. Thanks 🙇

@AliSoftware
Copy link
Collaborator

I don't like it. One more restriction when installing via homebrew.

I'll make a 0.5.1 that copies Swift libs over so it's independent of your Xcode install path and will hopefully solve this once and for all.

@AliSoftware
Copy link
Collaborator

@esttorhe SwiftGen 0.5.1 just got merged into Homebrew; could you test it (with your symlink reset to 7.1 like when you had the issue) and tell if it fixed it?

Thx!

@esttorhe
Copy link
Contributor Author

@AliSoftware just tested with the symlink back at 7.1.

Uninstalled swiftgen and reinstalled via homebrew and is working now 👌

@AliSoftware
Copy link
Collaborator

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants