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

Binary Releases #2

Open
Michael-F-Bryan opened this issue Oct 14, 2019 · 9 comments
Open

Binary Releases #2

Michael-F-Bryan opened this issue Oct 14, 2019 · 9 comments

Comments

@Michael-F-Bryan
Copy link

It's been mentioned that compiling mdbook takes forever, which in turn makes installing mdbook-latex from source take forever.

Is it possible to upload release binaries for mdbook-latex? The easiest way would be to grab relevant code from the trust repo's travis.yml and appveyor.yml so it's all automated.

@lbeckman314
Copy link
Owner

This is a good idea — I will work to get a trust-y workflow set up in order to publish binaries in the next couple days.

@lbeckman314
Copy link
Owner

lbeckman314 commented Oct 16, 2019

Just a small progress update —

I've got the barebones of a trust workflow set up in the trust branch, and am ironing out getting Tectonic dependencies (e.g. harfbuzz and graphite2) working on travis and appveyor. I feel like getting these up and going on trust (via the Debian-based cross) and BSD-flavors should go smoothy, but I may run into a little difficulty with the macOS and Windows hosts, as I have less experience with those.

Regardless, I'll work on getting 64 and 32-bit Linux and BSD binaries deployed, and then move on to the 64/32-bit macOS and Windows binaries after that. I may be a bit slower than optimal due to time and work constraints, but will keep this issue updated as I go. Having cross platform binaries available for users is a worthwhile goal, and something I'd be really excited to see. And if you or anyone else has recommendations or pull requests for this issue, as always that would be more than welcome!

Also, if you (or anyone) has a preferred OS/architecture, let me know and I'll place it higher in the "Get Supported" list!


I've seen some talk about oxidizing harfbuzz and graphite2, and will keep an eye on further discussion there.

edit: craterizing to oxidizing.

@lbeckman314
Copy link
Owner

Progress update —

I believe in order to move forward with trust, custom docker images will have to be made that have the harfbuzz, graphite2, and freetype2 libraries installed for tectonic. cross has a nice writeup on setting that up, so it shouldn't be a problem. I will update here when the first custom docker image is built and run successfully with trust. Thank you for your patience!

@lbeckman314
Copy link
Owner

lbeckman314 commented Oct 31, 2019

Progress update —

Running into some linking issues with Cross for the x86_64-unknown-linux-gnu target. I will try running cross from my Linux machine over the weekend!

cross build --target x86_64-unknown-linux-gnu
   Compiling openssl v0.10.24
   Compiling openssl-sys v0.9.48
   Compiling native-tls v0.2.3
   Compiling hyper-native-tls v0.3.0
   Compiling tectonic v0.1.11
   Compiling mdbook-latex v0.1.5 (/project)
error: linking with `cc` failed: exit code: 1
 ...
 ...
  = note: /target/x86_64-unknown-linux-gnu/debug/deps/libopenssl_sys-73aed5431004e69d.rlib(aes-x86_64.o): In function `AES_cbc_encrypt':
          (.text+0xf90): multiple definition of `AES_cbc_encrypt'
          /target/x86_64-unknown-linux-gnu/debug/deps/libtectonic-72c7e5a32d31f073.rlib(dpx-dpxcrypt.o):/cargo/registry/src/github.com-1ecc6299db9ec823/tectonic-0.1.11/tectonic/dpx-dpxcrypt.c:1235: first defined here
          /usr/bin/ld: cannot find -licuuc
          /usr/bin/ld: cannot find -licudata
          /usr/bin/ld: cannot find -lpng16
          collect2: error: ld returned 1 exit status
error: aborting due to previous error

error: Could not compile `mdbook-latex`.

@lbeckman314
Copy link
Owner

Update from linux machine —

Running into a version error for harfbuzz: Requested \'harfbuzz >= 1.4\' but version of harfbuzz is 0.9.27.

Currently, Ubuntu 14.04 is used to create cross's docker images (for backwards-compatibility reasons I believe). I didn't see harfbuzz in trusty's backports, so the route forward may include one of the following:

  1. Use a custom Docker image based on more recent Ubuntu version (preferably just ubuntu:latest). This may make mdbook-latex less compatible for distros with older glibc versions, but for a small project like this, it should be just fine (and a future improvement!).
  2. Backport libharfbuzz-dev to Ubuntu 14.04. This may more trouble than it's worth.

More verbose error output:

error: failed to run custom build command for `tectonic v0.1.11`

Caused by:
  process didn't exit successfully: `/target/debug/build/tectonic-4ae16c3fbaa9ed1d/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"fontconfig harfbuzz >= 1.4 harfbuzz-icu icu-uc freetype2 graphite2 libpng zlib\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Requested \'harfbuzz >= 1.4\' but version of harfbuzz is 0.9.27\n" } }', src/libcore/result.rs:999:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

@Michael-F-Bryan
Copy link
Author

Looks like they've considered bumping the Ubuntu version used in those docker containers, but not much has come of it.

Given what you know now and the effort it's taken, do you still think having CI build release binaries is worth doing?

I found it easy enough to set up cross-compilation for mdbook-linkcheck, but that's only because the hard work was already done upstream in crates like reqwest and rustls.

@lbeckman314
Copy link
Owner

lbeckman314 commented Nov 1, 2019

Looks like they've considered bumping the Ubuntu version used in those docker containers, but not much has come of it.

Thanks for linking that issue! It looks like a delicate balance between older glibc compatibility, maintenance costs, and library/dependency requirements.

Given what you know now and the effort it's taken, do you still think having CI build release binaries is worth doing?

I think so! My next effort will likely involve option (1) ("Use a custom Docker image based on more recent Ubuntu version (preferably just ubuntu:latest)"). Will keep updated!

I found it easy enough to set up cross-compilation for mdbook-linkcheck, but that's only because the hard work was already done upstream in crates like reqwest and rustls.

I'm always impressed by all the effort people put into those projects! Really awesome stuff : )

@lbeckman314
Copy link
Owner

A x86_64-unknown-linux-gnu binary has been successfully produced by the trust-branch pipeline (1). I'll work to get i686-unknown-linux-gnu up next (eventually adding support for macOS/Windows/FreeBSD, and any others that anyone suggests).

(1) https://github.com/lbeckman314/mdbook-latex/releases

@gideongrinberg
Copy link

The current binary releases (and the Crate) both fail on mac with an error about libicuuc.66.dylib not being found.

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

3 participants