-
Notifications
You must be signed in to change notification settings - Fork 162
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
fix checkouts of standing data for tests on Windows, enable vcpkg on macOS and Linux #420
Conversation
By the way, setting RUST_TEST_THREADS=1 would hide the file locking issue on tests\0000000000000000000000000000000000000000000000000000000000000000-latex-28.fmt which is what is causing the test failure. |
This looks quite interesting; I tried to build a static version of tectonic on macOS but ran into some issues. Summarizing my experience below for future travelers and discussion. I'm familiar with the first two options and so will take one of those approaches to get a static build working. I do not have If we do end up using vcpkg we should make users aware that it collects telemetry data by default. |
I would be interested in how the static build on macOS works. For Linux, the problem is that the standard Tectonic build uses procedural macros in the compiler, which requires that the compiler support dynamic linking. A lot of people in the Rust community have had problems of this general nature. My solution, which I think is the best available, is to treat the compilation as a cross-compilation, from a dynamic Linux platform to a static Linux platform. I think there might be some hacky magic going on in the toolchain to make that work, but work it does. For macOS, there must be system libraries for font-finding that are guaranteed to be installed — does a static build miss out on those? |
Also, please note that CI has been stuck for a bit, and I recently merged some changes to fix things up. I highly recommend that you rebase on |
I think I might have over-sold the
|
Codecov Report
@@ Coverage Diff @@
## master #420 +/- ##
=========================================
+ Coverage 43.7% 44.21% +0.5%
=========================================
Files 136 136
Lines 59536 60053 +517
=========================================
+ Hits 26019 26550 +531
+ Misses 33517 33503 -14
Continue to review full report at Codecov.
|
I made a test PR (#426) that seems to show that indeed, setting The other thing is that I'd like to rearrange how the |
Looks like "allow edits from maintainers" is set on this PR, #420 so you should be good to go I think. |
@mcgoo Hmm, for some reason I'm still getting "permission denied" — oh, maybe it allows pushes but not force-pushes? I wouldn't be surprised if that was the case. #426 has my version rebased onto latest master, but still not including the different approach to the |
I made you a collaborator on mcgoo/tectonic to see if that does it. Have you done the modifications to |
…nk line It seems that we now need to include libbz2 in the set of forced static links.
Codecov Report
@@ Coverage Diff @@
## master #420 +/- ##
========================================
Coverage ? 43.7%
========================================
Files ? 136
Lines ? 59536
Branches ? 0
========================================
Hits ? 26019
Misses ? 33517
Partials ? 0
Continue to review full report at Codecov.
|
There seems to be some issue with CI statuses updating right now, but I've structured things the way I was thinking and everything that matters is green. Merging! |
@crlf0710 added the ability to build using msvc with libraries from vcpkg.
I'm not sure if it is useful to you, but vcpkg-rs 0.2.7 adds support for Linux and macOS so I enabled it for them also. (This does allow using the exact same versions of libraries across all platforms which may be of interest.) Windows (msvc) works for static and dynamic builds, and Linux and macOS work for static builds. Almost everything builds and passes tests, but on Windows, one of the doctests still fails the first time it is run.
This fixes the issue with the line endings in the test data getting changed to CRLF when it is checked out on Windows, by adding a
.gitattributes
file. This does not update an existing checkout so it is probably necessary to delete thetests/
directory and check it out again to get the unchanged versions. (This is particularly painful if you clone the repo and.gitattributes
is not on the master branch yet - git will not change the line endings as you change branches.)For a Windows static build I used:
For a Linux static build I used:
For a macOS static build I used:
For a Windows dynamic build I used: