sile-typesetter / casile

The CaSILE toolkit, a book publishing workflow employing SILE and other wizardry.
GNU Affero General Public License v3.0
54 stars 6 forks source link

Instructions for building from git on Debian #123

Open felipesanches opened 3 years ago

felipesanches commented 3 years ago

I had some trouble when trying to build from git master branch.

Such as this error message:

./configure: line 5627: syntax error near unexpected token `5,'
./configure: line 5627: `    AX_PROG_PERL_VERSION(5, , as_fn_error $? "perl interpreter is required" "$LINENO" 5)'

It took me a while to figure out that it meant I needed to apt install autoconf-archive on my fairly new Debian 11 system.

Maybe it could be helpful to mention that I also had to install these other Debian packages:

When I saw ./configure complaing about the git-warp-time not being available, I instinctively also looked for it on the apt package repos (with apt-cache search but found nothing). Further googling got me to https://crates.io/crates/git-warp-time which then made it obvious to me that this was a rust package. As I am not yet super familiar with rust (even though I had it installed already because I built RuneBender earlier this month), I was not sure which comment to use. It may be useful to mention in the documentation this command:

cargo install --path .

That installed almost rust 200 packages that seem to be needed! I saw that it includes the got-time-warp one. But after it installed everything successfully, I still get the same error message on ./configure:

Screenshot from 2021-07-15 22-10-47

alerque commented 3 years ago

Oh hello there Debian.

This one is on me. The requirements are mostly documented in the README, although I see the most recent addition git-warp-time isn't mentioned yet. That one is confusing you because it is both a Rust library and a stand alone CLI tool. CaSILE uses both versions. One is marked in the Cargo.toml file so Rust will compile the library part, but configure also checks for it because it runs the CLI version in some cases. The CLI version can be installed with cargo install, but personally I don't like installing anything to my system outside of the system package manager.

The most definitive list of dependencies is probably the Arch Linux package meta data. I will work on a Debian/Ubuntu packages that maps all the various requirements to Debian/Ubuntu packages.

In the mean time I highly recommend running the Docker version where you get everything baked in to one container that you can execute directly without polluting your system with things installed outside of the system package manager.

alerque commented 3 years ago

I haven't been able to poke at a Debian system yet to start listing dependencies, but I did remember the other really useful and basically definitive place to review them: the Dockerfile. Again the base image is Arch Linux, but since it is starting with a clean system and installing a known set of packages and ending up with a working Docker container the dependencies are a good model to interpret from.

In fact my approach to Debian will probably be to find a Debian base image and setup a Dockerfile that uses it to build and run SILE. One the dependency package names are worked out there it should be easier to setup a .deb build / put it in the Ubuntu PPA. The almost inevitable blocker though is going to be the Pandoc fork. Must. Get. That. Upstreamed.