-
Notifications
You must be signed in to change notification settings - Fork 466
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
Extend travis build matrix to include bundled #781
Conversation
Script is shellcheck-clean. Adding the static linkage feature flag introduces the failure from 777, we can toss that back in once that issue is fixed. Version upgrades for the "system-installed SDL" scenario should be pretty much just tweaking the shellscript. If you'd like it moved to a variable or somesuch I'm happy to do that too. |
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.
Could you rebase on master? (the only change you should have to do is to update from 2.0.5 to 2.0.8)
.travis.yml
Outdated
- TRAVIS_CARGO_NIGHTLY_FEATURE="" | ||
- LD_LIBRARY_PATH: "/usr/local/lib" | ||
- secure: MJhmVnQ2IM7+sVmc3vU4ndKOcQgLLeHUPW3qaQBQHKQmvoswCwQK60N17uSgWn1Ln8teqvSRHq4KclIjdMHI+VuQXJHQKHDgjcYbHxwmc3AM1Whnp0XB44ksKUmD109BGWSfZQxzF+6dA+YNOQ+mti+bpydMu8n2FMVjA/SXwQ8= | ||
- travis-cargo --only stable doc-upload |
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.
Why did you remove the features "gfx image ttf mixer" from the doc upload?
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.
Typo, sorry! Fixing.
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.
Ah, looks like that's how that one was before:
after_success:
-- travis-cargo --only stable doc-upload
-env:
- global:
- - RUST_TEST_THREADS=1
- - TRAVIS_CARGO_NIGHTLY_FEATURE=""
- - LD_LIBRARY_PATH: "/usr/local/lib"
- - secure: MJhmVnQ2IM7+sVmc3vU4ndKOcQgLLeHUPW3qaQBQHKQmvoswCwQK60N17uSgWn1Ln8teqvSRHq4KclIjdMHI+VuQXJHQKHDgjcYbHxwmc3AM1Whnp0XB44ksKUmD109BGWSfZQxzF+6dA+YNOQ+mti+bpydMu8n2FMVjA/SXwQ8=
+ - travis-cargo --only stable doc-upload
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.
Right, my mistake. doc-upload
takes no parameter, but doc
takes -- --features "gfx image ttf mixer"
and you properly did that.
Rebased on master -- apologies for the autoformatter changes on the travis spec making it harder to review than it has to be. |
It looks like it's failing on mac with the bundled feature. That may have been the rebase that caused this though: https://travis-ci.org/Rust-SDL2/rust-sdl2/jobs/401554923 (not your actual rebase but the huge code/build.rs change that were made in between) |
Can someone help with this one? Testing with travis is just a hassle and I don't have a mac handy... |
Hey, I'll take it, if half a dozen lines of yaml can catch a regression, so much the better ;-). I'll try to take a look at that failure this evening |
Ok, remaining trouble spots on macos, as far as I've found: Test FailureOn my first build of upstream master I got a failure on the events test, but I couldn't repro it on subsequent runs with Failure log: https://gist.github.com/reynisdrangar/37053162c50df9bd80c8764d70331825 Build FailureIt looks like the linkage issue here comes from a change in dylib naming — upstream seems to have changed something about the symlink/dylib naming such that what we're putting in Getting in the directory and building it myself seems to correctly yield the dylib, so next up I need to sort out exactly what cmake invocation the build.rs cmake object constructs. |
Need any help from other OSX contributors? |
I won't turn it down (I'm on the road visiting family this week, hence the slow replies, my apologies). I patched build.rs from sdl2-sys with
Rebuilding directly with cmake in this tree gets a dylib in the build path:
I'm guessing the upstream cmake script needs a tweak. |
Applying this change to upstream (SDL) seems to fix the problem:
|
@reynisdrangar Can you test your PR on macos with SDL2 2.0.5 instead of 2.0.8? You basically just have to change those lines: https://github.com/Rust-SDL2/rust-sdl2/blob/master/sdl2-sys/build.rs#L23-L26 Obviously I'd prefer if upstream was to be fixed, but I'd like this PR to be merged ASAP so we can't wait that long. There's that, plus the fact that since 2.0.5 I feel like SDL2 has been kinda unstable, so I wouldn't mind if we kept the default of using 2.0.5 for "bundled" feature. |
OSX user here. Who might have an idea of what's going on, actually. SDL2 2.0.6 introduced a bug in their CMake build system for OSX. The tl;dr is that I did a local build of this branch with the changes recommended by @Cobrand, and I'm getting a failure in the |
@pyrrho Thanks for the explanation. If he doesn't answer in a few days, you could always rebase the branch locally and then create another PR that would replace this one. We would then merge yours and close this one, but reynisdrangar would still be referenced in the commits pushed so I don't think he will mind. |
Doubles the number of builds, unfortunately, but it should cover all the common linkage scenarios, except for macos frameworks, which I'm not sure I know enough about to handle. Also autoformats travis.yml and splits the SDL archive extraction and installation out to a shell script
I never did get directly in touch, but he added me as a contributor to his fork 😄 so I'm going to guess he won't mind me making some changes there. Thanks @reynisdrangar! |
Assert that stereo buffers are *at least* twice the original size, rather than more than twice the size.
So I've rebased, switch back to SDL2 2.0.5, and (potentially) fixed that audio failure, but I'm not sure this should be merged in. I switched over to my windows system, and I'm seeing a linker failure on windows in this branch;
This makes some sense to me; the Vulkan symbols were added in SDL2 2.0.8, so those symbols won't exist if we build 2.0.5. I went ahead and tried the windows build on master and the build succeeds. Running the tests fails, though. It looks like the SDL libs aren't being found at runtime. Might be an install path issue? I'm going to dig into this some more to make sure I understand what's going on, but I'd recommend not merging this PR. |
With what kind of code did you try this? If you don't use the Vulkan features, the Vulkan functions shouldn't be used (I think?), so you shouldn't have this problem. Does this happen for the "simple" example for instance? If it does, we'll have to make sure vulkan-related functions are feature gated somehow. |
This was just a simple I'm not entirely familiar with how this code was generated, but my understanding is that as of #785, SDL2 2.0.8 C/++ code was passed through bindgen to generate the sdl[_*]_bindings.rs files. If that's the case, it's no surprise there are some symbol discrepancies when trying to link code that's expecting SDL 2.0.8 symbols to a SDL 2.0.5 library. I'm not sure if it's feasible to feature-gate code that's inside of machine-generated code, but I could take a look at doing that. I think my first attempt will be to pull down the SDL2 CMakeLists.txt patch I linked to previously and apply that as part of the 2.0.8 build process. |
I think bindgen-generated code (the |
@pyrrho Are you willing to work on this soon (the feature gate of Vulkan)? If you don't have time or anything else, please tell me, I'll open a similar PR based on all your commits and fix this whenever I can. |
@Cobrand I doubt that I'll have time to start work on feature-gating Vulkan for at least a week. I would like to try and implement that gate as a way to get more familiar with this repository (and bindgen in general), but I'd recommend not waiting on me for that addition if it's blocking someone/something else. That said, I'm fairly certain PR #797 removes the immediate need for that gate. It builds, links, and tests cleanly on both Mac OS and Windows, and there are no longer any missing Vulkan symbols because it gets SDL2 2.0.8 to work. It might be sufficient to close this PR without merging, merge in #797, and open an issue to make sure the feature gate added in a new PR? Assuming the new logic in #797 is an acceptable, that is. |
Extend travis build matrix to include bundled
Doubles the number of builds, unfortunately, but it should
cover all the common linkage scenarios, except for macos
frameworks, which I'm not sure I know enough about to handle.
Also autoformats travis.yml and splits the SDL archive extraction
and installation out to a shell script.
Travis build result: https://travis-ci.org/reynisdrangar/rust-sdl2/builds/401276819