-
Notifications
You must be signed in to change notification settings - Fork 193
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
Added vendored build support #267
Conversation
Hi there, I get this error when trying to compile on Windows, using
What is the instructions for compiling on Windows? |
I have no experience with compiling on windows and I don't have acces to a windows build but i'll try to help. The error means that this line is not linking to the library properly, which means that After building for cmake, the binaires will be located in a The easiest way to test would be to clone Here is an example from my end:
In my case, the lib directory would be |
I'll cook try to cook up a |
Yep running on appveyor I get the same error:
|
Seems like the compiled static lib is called |
Jean, Yes, I could also replicate the same behavior on my local system with the
Running
|
I meant running I'm not sure I understand what you meant by accessible via PATH. I assume that outputting this to cargo should be enought. On unix this would add the directory to the rustc search path. edit: Added -vv flag so we see the build script in action. |
Yes, I did that from your branch. The |
Tested cross-compilation for ARM Linux and works. |
I'll bump the version. |
I'll add CI testing for the feature for both release and debug since it changes how libzmq is compiled. |
9737c2e
to
9270f3e
Compare
19eed59
to
6f42a4e
Compare
Note that until #268 is merged, the CI will fail. edit: Or not... |
81764ba
to
053acc3
Compare
I ran these tests in Windows on this latest branch in my own environment (not Appveyer style) using pre-built release version libzmq libraries for the dynamic linking: This pass:
This pass:
This fails (do not know if the sequence is valid though):
Rust environment:
These instructions apply for the dynamic linking case as per PR #249: Note for Windows users (re. dynamic linking of ZeroMQ):
|
From my understanding the failing tests are due to #268. |
Specifically:
should fail even on the master branch currently because some tests assume that |
After applying patch code from PR #268 to this branch these also work:
|
I also ran these tests in Windows on this latest branch Appveyer style on my own system, but with patches applied from PR #268, with an updated
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the one, not substantial, Windows issue, this looks really good. I look forward to release 0.9.1 with this added feature in the release notes! @jean-airoldie, if you feel inclined, I'd be happy for you to add a NEWS entry regarding this feature, otherwise I'll cook something up before releasing 0.9.1.
.appveyor/appveyor.bat
Outdated
cargo test --all-features %CARGO_MODE% | ||
if %ERRORLEVEL% NEQ 0 exit 1 | ||
|
||
cargo test --release --all-features %CARGO_MODE% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line doesn't match up with how the Windows build is structured, as %CARGO_MODE%
is either empty or already set to --release
. I guess the correct thing to do instead is to comment in the Release
configuration line in .appveyor.yml
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll uncomment the Release in appveyor.yml, if thats what you meant.
* Enables building statically from source by specifying the `vendored` flag. * Adds an optional `zeromq-src` dependency.
I'll add a NEWS entry. |
* Test both debug and release profile
Thanks a lot! |
This is the reopening of #262 since github does not allow the reopening of PRs after you force push.
The vendored crate now compiles statically, adding dynamic compilation down the line would be trivial.