Comments (9)
Version 0.5.0 use some third-party frameworks (like Commander to parse the command-line, and in future versions I'll also use other frameworks like Stencil to add template support, etc).
That's probably why you have that "Library not loaded" error, because the dynamic linker (dyld
) can't find them.
How did you install the app in your CircleCI server?
- Using
homebrew
? - Using
rake install
?- If using
rake install
, did you specify a specific destination or did you let it use the default destinations (which are/usr/local/bin
for the binary and/usr/local/Frameworks
for the third-party frameworks)?
- If using
- Or did you simply compile it on Xcode.app (which would then explain it as this doesn't work due to some Xcode subtleties & bugs, that's why the installation instructions in the README explains you must use
rake
orhomebrew
)? - Or did you install in on your Mac and then copy the binary file from your machine over to CircleCI… but forgot to copy the frameworks too? (which then need to be in the same relative-path to the app than it was on your Mac installation then)
from swiftgen.
Thank you for your reply.
I am using Homebrew.
Would you like me to try other methods?
from swiftgen.
So you ran Homebrew directly on the CircleCI VM, right?
Does your CircleCI have Xcode 7, if so what's its path?
I'd be interested to see the output of otool -L /usr/local/bin/swiftgen
and otool -l /usr/local/bin/swiftgen | grep -A 2 LC_RPATH
Also useful would be the output of your homebrew install swiftgen --verbose --debug
on the CircleCI VM.
from swiftgen.
I created a test project.
You can see the results there: https://circleci.com/gh/utribo/test-swiftgen-circleci/, particularly there: https://circleci.com/gh/utribo/test-swiftgen-circleci/8
from swiftgen.
Hmmm so when SwiftGen was built by Homebrew, it built it with /Applications/Xcode.app
(or at least it used this path as the @rpath
to find the Swift core libraries), but when you try to run it, that path doesn't exist on the CircleCI VM.
That's probably because Homebrew built a bottle (pre-built binary that their CI build on its own and package in a tar.gz
to avoid the need for you to build it yourself on the machine you're installing it to).
So the swiftgen
version you have was build by Homebrew servers where their Xcode is at /Applications/Xcode.app
… but on your CircleCI VM this path probably doesn't exist.
One quick way to solve it yourself is to add the path to Xcode (the one path on CircleCI I mean) to swiftgen
's @rpath
so SwiftGen can find the Swift binaries before invoking it.
Something probably similar to this:
rpath=$(dirname "$(dirname "$(xcrun -find swiftc)")")/lib/swift/macosx
install_name_tool -add_rpath "$rpath" "$(which swiftgen)"
I'll try to find a way to some this in the homebrew Formula so that the homebrew installation would automatically fix it after installing the bottle, if it can be done, but in the meantime that could allow you to workaround the issue.
from swiftgen.
Thanks for the thorough answer.
I have a few days off now. I'll let you know when I get back and try it.
Thanks!
On Thu, Oct 15, 2015, 21:43 AliSoftware [email protected] wrote:
Hmmm so when SwiftGen was built by Homebrew, it built it with
/Applications/Xcode.app (or at least it used this path as the @rpath to
find the Swift core libraries), but when you try to run it, that path
doesn't exist on the CircleCI VM.That's probably because Homebrew built a bottle (pre-built binary that
their CI build on its own and package in a tar.gz to avoid the need for
you to build it yourself on the machine you're installing it to).
So the swiftgen version you have was build by Homebrew servers where
their Xcode is at /Applications/Xcode.app… but on your CircleCI VM this
path probably doesn't exist.One quick way to solve it yourself is to add the path to Xcode (the one
path on CircleCI I mean) to swiftgen's @rpath so SwiftGen can find the
Swift binaries before invoking it.
Something probably similar to this:rpath=$(dirname "$(dirname "$(xcrun -find swiftc)")")/lib/swift/macosx
install_name_tool -add_rpath "$rpath" "$(which swiftgen)"```�I'll try to find a way to some this in the homebrew Formula so that the homebrew installation would automatically fix it after installing the bottle, if it can be done, but in the meantime that could allow you to workaround the issue.—
Reply to this email directly or view it on GitHub
#35 (comment)
.
from swiftgen.
This should be fixed once Homebrew/legacy-homebrew#45008 is merged by the Homebrew team.
I'm gonna close this issue now that a fix is pending release — but feel free to reopen in case it still doesn't work on your CircleCI even after the fix is merged.
from swiftgen.
The build passes now. Thanks! 👍
from swiftgen.
Thx for the feedback 👍
from swiftgen.
Related Issues (20)
- Adding Extra parameter when running SwiftGen through Xcode HOT 1
- Error: `swiftgen.yml` is not a config file HOT 4
- String template is not able to generate a function with a string parameter and a plural int HOT 2
- Make `SwiftUI` types the default and not `UIKit` types. HOT 1
- Color Generated with SwiftUI HOT 2
- disable Font typealias? HOT 1
- Addition of .string file changes all previous strings usage HOT 1
- Ability to change Locale HOT 6
- Feature Request: Public access to either the fallback string or the ability to specify locale HOT 2
- Add ability to refer file name of JSON HOT 3
- Support for visionOS HOT 2
- Is this repo deprecated? HOT 4
- Add an XcodeBuiltToolPlugin for swiftgen HOT 5
- [Homebrew] Error: swiftgen has been disabled because it does not build! HOT 10
- Apple privacy manifest support HOT 2
- SwiftGen Errors on Swift 6 HOT 5
- Subsequent builds after first build always fail
- Fatal error: Unable to initialize font
- 'InitialSceneType' requires that 'StoryboardScene.UILoadingViewController' inherit from 'UIViewController'
- Warning: SwiftGen not installed, download it from https://github.com/SwiftGen/SwiftGen
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftgen.