wkhtmltopdf / packaging

Packaging of wkhtmltopdf releases
https://wkhtmltopdf.org/downloads.html#stable
306 stars 138 forks source link

Can we have a static latest version of wkhtmltox? #53

Closed sxiii closed 4 years ago

sxiii commented 4 years ago

I'm trying to make it work on a system that allows either use static builds or building from source; but building from source of this thing is way too long & hard because of the qt-related issues. Is it possible to get static binaries?

ashkulz commented 4 years ago

What is the target platform you're trying to use it on?

sxiii commented 4 years ago

@ashkulz JLinux: https://jcloud.no -> it's a source-based distro that mostly use compiled-in software just like Gentoo probably.

ashkulz commented 4 years ago

I'm not sure what's the problem in building from source -- if you want to use the unpatched Qt5 binaries, it's a very quick build. For the patched Qt4 build, it's extensively documented via build.yml -- if you face problems in getting it to compile, please comment over here.

derek-adair commented 4 years ago

Seems VERY counter-intuitive to require a build, and support BUILDING ON ALL PLATFORMS in a world with docker. Why not release a static docker version. Let users docker pull wkhtmltopdf.

It's not working out of the box on xenial:

Distributor ID: Ubuntu Description: Ubuntu 16.04.6 LTS Release: 16.04 Codename: xenial

$>apt list | grep 'docker.io\|python-yaml\|p7zip-full'                                                              
docker.io/xenial-updates,xenial-security 18.09.7-0ubuntu1~16.04.5 amd64
p7zip-full/xenial-updates,xenial-security,now 9.20.1~dfsg.1-4.2ubuntu0.1 amd64 [installed]
python-yaml/xenial,now 3.11-3build1 amd64 [installed]

Build error:


./build docker-images xenial-amd64                                                                                            1 ↵  10080  14:07:21
enabling qemu-aarch64 ...cat: write error: Invalid argument
docker run --rm --privileged fkrull/qemu-user-static enable
command failed: exit code 1
derek-adair commented 4 years ago

If you're building for other architectures, if there is a docker image then you can use emulation via qemu to use it directly -- but please note that it will be very slow -- it is not uncommon for builds to take 8+ hours on a recent machine.

Again, why not just bake this bad boy into docker?

ashkulz commented 4 years ago

@derek-adair: this repo is for building packages, not using them -- it does use docker (and vagrant where appropriate)! Also, I think you haven't read the README, which clearly says:

Linux kernel >= 4.8 (for linux targets -- foreign archs only) [...] On Ubuntu 18.04, this can be installed via a single command:

derek-adair commented 4 years ago

Ah yes, I am a dumbo:

  1. Was failing to install latest wkhtmltopdf (resolved personally)
  2. Was simply looking for a docker image and misunderstood this projects purpose...

Is there any endorsed effort to Dockerize wkhtmltopdf?

Also genuine question here: Whats the point of this level of build support with the current VM/Container trends going on?

My naive vision, for this project i stumbled upon a week ago;

#Use qt5 or w/e
docker pull wkhtmltopdf/wkhtmltopdf:qt5
# Patched
docker pull wkhtmltopdf/wkhtmltopdf:qt4-patched
derek-adair commented 4 years ago

It'd also probably be possible for these docker images to be used as run-able versions and spit out binaries.

ashkulz commented 4 years ago

Not everyone can use docker directly, wkhtmltopdf is embedded in a lot of applications which themselves use docker for packaging -- so it supports installation on a lot of common supported OSes. You're free to pick your preferred OS 👍

derek-adair commented 4 years ago

Ya that makes sense! Probably especially for non-web-apps.

ashkulz commented 4 years ago

Closing the issue as original reporter (@sxiii) hasn't responded yet.