Code Monkey home page Code Monkey logo

packaging's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

packaging's Issues

Build

Any guide how to build this? Which OS is required, what steps have to be taken etc.?

Suse Linux RPM

Hi,

What would be the possibility of compiling, making a build for Suse Linux ? I can provide you platform with SSH if needed.

I am trying without much success.

[Windows] Silent install fails

I'm trying to install with chocolatey, but it fails with exit code 2.
If i try to manually install silten it does nothing.

Tried on Windows 10, Server 2018R2 and Server 2016.

Normal installation works as expected.

2018-11-23 11:33:00,905 17224 [DEBUG] - Running 'ChocolateyScriptRunner' for wkhtmltopdf v0.12.5 with packageScript 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\chocolateyInstall.ps1', packageFolder:'C:\ProgramData\chocolatey\lib\wkhtmltopdf', installArguments: '', packageParameters: '',
2018-11-23 11:33:00,959 17224 [DEBUG] - Running 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\chocolateyInstall.ps1'
2018-11-23 11:33:01,061 17224 [DEBUG] - Running Get-ProcessorBits -compare '64' 
2018-11-23 11:33:01,096 17224 [INFO ] - Installing 64 bit version
2018-11-23 11:33:01,195 17224 [DEBUG] - Running Install-ChocolateyInstallPackage -silentArgs '/S' -file 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\wkhtmltox-0.12.5-1.msvc2015-win64_x64.exe' -fileType 'exe' -validExitCodes '0 1223' -packageName 'wkhtmltopdf' 
2018-11-23 11:33:01,199 17224 [DEBUG] - Running Get-ProcessorBits -compare '32' 
2018-11-23 11:33:01,216 17224 [INFO ] - Installing wkhtmltopdf...
2018-11-23 11:33:01,400 17224 [DEBUG] - Running Start-ChocolateyProcessAsAdmin -validExitCodes '0 1223' -workingDirectory 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools' -statements '/S ' -exeToRun 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\wkhtmltox-0.12.5-1.msvc2015-win64_x64.exe' 
2018-11-23 11:33:01,497 17224 [DEBUG] - Test-ProcessAdminRights: returning True
2018-11-23 11:33:01,522 17224 [DEBUG] - Elevating permissions and running ["C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\wkhtmltox-0.12.5-1.msvc2015-win64_x64.exe" /S ]. This may take a while, depending on the statements.
2018-11-23 11:33:02,026 17224 [DEBUG] - Command ["C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\wkhtmltox-0.12.5-1.msvc2015-win64_x64.exe" /S ] exited with '2'.
2018-11-23 11:33:02,046 17224 [WARN ] - WARNING: Setup was cancelled.
2018-11-23 11:33:02,115 17224 [ERROR] - ERROR: Running ["C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\wkhtmltox-0.12.5-1.msvc2015-win64_x64.exe" /S ] was not successful. Exit code was '2'. Exit code indicates the following: Setup was cancelled..
2018-11-23 11:33:02,136 17224 [DEBUG] - Built-in PowerShell host called with ['[System.Threading.Thread]::CurrentThread.CurrentCulture = '';[System.Threading.Thread]::CurrentThread.CurrentUICulture = ''; & import-module -name 'C:\ProgramData\chocolatey\helpers\chocolateyInstaller.psm1'; & 'C:\ProgramData\chocolatey\helpers\chocolateyScriptRunner.ps1' -packageScript 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\chocolateyInstall.ps1' -installArguments '' -packageParameters '''] exited with '2'.
2018-11-23 11:33:02,145 17224 [DEBUG] - Calling command ['"C:\Windows\System32\shutdown.exe" /a']
2018-11-23 11:33:02,203 17224 [DEBUG] - Command ['"C:\Windows\System32\shutdown.exe" /a'] exited with '1116'
2018-11-23 11:33:02,707 17224 [DEBUG] - Capturing package files in 'C:\ProgramData\chocolatey\lib\wkhtmltopdf'
2018-11-23 11:33:03,106 17224 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\wkhtmltopdf.nupkg'
  with checksum 'E624C00F28F34B31788714DAD172254E'
2018-11-23 11:33:03,107 17224 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\wkhtmltopdf.nuspec'
  with checksum '03B019F9440B286C74838754F75C0FB0'
2018-11-23 11:33:03,108 17224 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\legal\LICENSE.txt'
  with checksum 'E6A600FD5E1D9CBDE2D983680233AD02'
2018-11-23 11:33:03,109 17224 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\legal\VERIFICATION.txt'
  with checksum 'EEF4FFFAAE3200985430D553F49B5241'
2018-11-23 11:33:03,110 17224 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\chocolateyInstall.ps1'
  with checksum '5B39F1021211D2F20AEA746736A80EFC'
2018-11-23 11:33:03,344 17224 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\wkhtmltox-0.12.5-1.msvc2015-win32_x32.exe'
  with checksum '26ED1EA1BE6091DA2210048C62391AC4'
2018-11-23 11:33:03,550 17224 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\wkhtmltox-0.12.5-1.msvc2015-win64_x64.exe'
  with checksum 'C743C0D097FEA9E22A38B0F7EF9E4BEA'
2018-11-23 11:33:03,551 17224 [DEBUG] -  Found 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\wkhtmltox-0.12.5-1.msvc2015-win64_x64.exe.ignore'
  with checksum 'BEA07E6D2B8DCE396FE21BAA61B34956'
2018-11-23 11:33:03,596 17224 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\wkhtmltopdf.0.12.5\.arguments".
2018-11-23 11:33:03,597 17224 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\wkhtmltopdf.0.12.5\.extra".
2018-11-23 11:33:03,597 17224 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\wkhtmltopdf.0.12.5\.version".
2018-11-23 11:33:03,598 17224 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\wkhtmltopdf.0.12.5\.sxs".
2018-11-23 11:33:03,600 17224 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\wkhtmltopdf.0.12.5\.pin".
2018-11-23 11:33:03,615 17224 [DEBUG] - Attempting to delete directory "C:\ProgramData\chocolatey\lib-bad\wkhtmltopdf".
2018-11-23 11:33:03,663 17224 [DEBUG] - Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2018-11-23 11:33:03,668 17224 [ERROR] - The install of wkhtmltopdf was NOT successful.
2018-11-23 11:33:03,677 17224 [ERROR] - Error while running 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\chocolateyInstall.ps1'.
 See log for details.
2018-11-23 11:33:03,690 17224 [DEBUG] - Moving 'C:\ProgramData\chocolatey\lib\wkhtmltopdf'
 to 'C:\ProgramData\chocolatey\lib-bad\wkhtmltopdf'
2018-11-23 11:33:05,701 17224 [DEBUG] - Attempting to delete file "C:\Users\kriese\AppData\Local\NuGet\Cache\wkhtmltopdf.0.12.5.nupkg".
2018-11-23 11:33:05,774 17224 [WARN ] - 
Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2018-11-23 11:33:05,783 17224 [INFO ] - 
2018-11-23 11:33:05,788 17224 [ERROR] - Failures
2018-11-23 11:33:05,794 17224 [ERROR] -  - wkhtmltopdf (exited 2) - Error while running 'C:\ProgramData\chocolatey\lib\wkhtmltopdf\tools\chocolateyInstall.ps1'.
 See log for details.
2018-11-23 11:33:05,812 17224 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2018-11-23 11:33:05,835 17224 [DEBUG] - Exiting with 2

Packagist auto-update feature is off

Current version available on Packagist is 0.12.4 instead of 0.12.5. This means that I'm not able to use composer (withouth specifying VCS url) to get the latest version.

Let's Encrypt certificate has expired

I'm getting the following error when attempting to apt-get on Ubuntu Docker Image...

--2020-01-17 01:09:42--  https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
Resolving downloads.wkhtmltopdf.org (downloads.wkhtmltopdf.org)... 107.174.217.167
Connecting to downloads.wkhtmltopdf.org (downloads.wkhtmltopdf.org)|107.174.217.167|:443... connected.
ERROR: cannot verify downloads.wkhtmltopdf.org's certificate, issued by ‘CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US’:
  Issued certificate has expired.
To connect to downloads.wkhtmltopdf.org insecurely, use `--no-check-certificate'.

Command being run
wget -O wkhtmltopdf.deb https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb && dpkg -i wkhtmltopdf.deb && rm wkhtmltopdf.deb

I'm aware of the --no-check-certificate option. I just thought I would raise awareness of the issue.

build raspbian.stretch-armhf

Hi I build raspbian.stretch-armhf ,then I got
./build package-docker raspbian.stretch-armhf ../wkhtmltopdf
enabling qemu-aarch64 ...cat: write error: Invalid argument
docker run --rm --privileged fkrull/qemu-user-static enable
command failed: exit code 1

Ask for help:how to build wkhtmlto×× with the mips64el architecture

My computer's architecture is mips64el, OS is Fedora 21;and QMake version 3.1、Using Qt version 5.9.8 in /usr/lib64
When I compile locally like this:
qmake -o Makefile wkhtmltopdf.pro
make
make install
then using Error: This version of wkhtmltopdf is built against an unpatched version of QT

When I compile like this: ./build release ../wkhtmltopdf/,
then:exec user process caused "exec format error"
ask for help:How can I build wkhtmlto×× with the mips64el architecture?

Alpine build

There's already a (docker based) build for alpine over here:

https://github.com/Surnet/docker-wkhtmltopdf

The build setup could be copied as a starting point.

It basically works - but has issues with some fonts not being rendered correctly (See Surnet/docker-wkhtmltopdf#1). We've boiled that down to:

  • fontconfig works
  • Serif fonts are available on the system and reported by fontconfig
  • The match string that fontconfig receives from wkhtmltopdf misses Serif fonts - even if used in CSS

/cc @chdanielmueller Maybe you can contribute something here? It would be awesome to have an "official" alpine build of wkhtmltopdf and you seem to already have solved most of the hurdles.

As much as I'd like to help, I have not looked into the build process at all and I'm not really an expert here.

Not able install or package myself

Opened this issue due to missing troubleshooting guide.
Got Ubuntu bionic instance in DO.
Inside a docker container tried to install it using apt-get install and when I run got

QXcbConnection: Could not connect to display 
Aborted (core dumped)

Tried to build a binary myself using the installation guide and performed next commands on machine with client ubuntu version

git clone --recurse-submodules https://github.com/wkhtmltopdf/wkhtmltopdf
git clone --recurse-submodules https://github.com/wkhtmltopdf/packaging
cd packaging
sudo ./build package-docker bionic-amd64 ../wkhtmltopdf

It take some time and at the end I found targets folder with some result. Tried again to convert a file from html to pdf and got the same error output. But on the client ubuntu version it works fine.
What I am doing wrong?

UPDATE:
If I download tar from https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz and unpack then everything works fine

UPDATE 2:
Downloaded generic-amd64 truncates html and renders with errors. Splits into 2 pages and right side is truncated
Screenshot 2020-03-25 at 23 44 43
Screenshot 2020-03-25 at 23 44 38

UPDATE 3
If I try to download from here https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-dev-20200127/wkhtmltox_0.12.6-0.20200125.25.dev.ba575ea.bionic_amd64.deb and install using dpkg -I .. then I get

dpkg: dependency problems prevent configuration of wkhtmltox:
 wkhtmltox depends on libjpeg-turbo8; however:
  Package libjpeg-turbo8 is not installed.
 wkhtmltox depends on xfonts-75dpi; however:
  Package xfonts-75dpi is not installed.

dpkg: error processing package wkhtmltox (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 wkhtmltox

UPDATE 4
Tried deb from the latest dev release on exiting 14.04 Ubuntu instance and works fine

ARM64 builds

Hello!

As discussed in wkhtmltopdf/wkhtmltopdf#3886 I moved conversation here.

Regarding distro support I have experience only with Ubuntu LTS and Debian. Both of them work pretty fine on ARM64 arch.

An Evansport (i686) package of 0.12.1 or 0.12.1.2 or 0.12.1.3 ?

HI there, I've been on the hunt for a while for a working 0.12.1 (or 0.12.1.2 or 0.12.1.3) patched with qt and inclusive of its dependencies. It is starting to be my white whale.

Having tried the majority of the i386 and i686 packages available, I've been left with only partial success and would need a compiled package to complete the installation.

SRPMs may be missing

Hi. I didn't see any SRPMs anywhere. Please, if the readme.md is missing it, can it please be added?

cross building for windows

Hi ashkulz,

I'm running builds using the new packaging model with vagrant and virtual box on ubuntu 18.04 LTS (a vm on my esxi5.5 host) and successfully have built wkhtmltopdf for linux, but am having a gruelling time trying to get a windows build going.

I have a standard newly built ubuntu 18.04 and installed the necessaries with

sudo apt install -y python-yaml docker.io vagrant virtualbox p7zip-full,

then onward upgrading to the latest vagrant and virtual box however I am getting the now famous net::ssh errors that are all over the web etc, I have tried everything, even trying to build on 16.04 with different versions of vagrant and virtualbox using other mcandre boxes etc. but to no avail.

commandline output below...

test@srv_ub64_009:~/packaging$ sudo ./build vagrant msvc2015-win64 /home/test/wkhtmltopdf/
Bringing machine 'windows' up with 'virtualbox' provider...
==> windows: Machine already provisioned. Run vagrant provision or use the --provision
==> windows: flag to force provisioning. Provisioners marked to run always will still run.
ssh_exchange_identification: read: Connection reset by peer
ssh -F vagrant/.vagrant/windows_config windows -- mkdir -p /c/Users/vagrant/msvc2015-win64
command failed: exit code 255

Did you manage a windows build successfully with this new model and if so can you share the vagrant versions etc.

Many thanks

Perl Tester.

Deb install on Ubuntu should run ldconfig after?

Just installed this on my Mint 19 (Ubuntu 18.04) system and could not get it to work. I was trying to use with a python wrapper. It gave errors related to libwkhtmltox.so.0 not found. After a bit of detective work it turns out that ldconfig needs to be run to update paths after the lib is installed. After doing that the library was found and test code in python using it worked without error.

I wonder if this is something the dpkg install process should do in order to ensure it can be used after installing? Or at least maybe add a line to docs so users aren't scratching their head and wasting time googling to get a working setup.

build docker-images buster-amd64 error

Which step did I make mistakes?

Any help, Thx

  • My PC:
    macOS Mojave
    Version 10.14.5
    Python 2.7.10

  • Docker:
    Docker Engine - Community
    Version 19.03.1

  • wkhtmltox
    Version 0.12.4

./build docker-images stretch-amd64
./build package-docker stretch-amd64 ../wkhtmltopdf/

make[1]: *** [.obj/release-static/qsslkey.o] Error 1
Makefile:17359: recipe for target '.obj/release-static/qsslkey.o' failed
make[1]: Leaving directory '/tgt/qt/src/network'
Makefile:267: recipe for target 'sub-network-make_default-ordered' failed
make: *** [sub-network-make_default-ordered] Error 2
docker run …… wkhtmltopdf/packaging:0.12_stretch-amd64 make -j4
command failed: exit code 2
./build docker-images buster-amd64
./build package-dcoker buster-amd64 ../wkhtmltopdf/

make[1]: Leaving directory '/tgt/qt/src/network'
make[1]: *** [Makefile:17788: .obj/release-static/qsslsocket_openssl.o] Error 1
make: *** [Makefile:267: sub-network-make_default-ordered] Error 2
docker run …… wkhtmltopdf/packaging:0.12_buster-amd64 make -j4
command failed: exit code 2

error :

/src/qt/src/network/ssl/qsslcertificate.cpp: In member function 'QByteArray QSslCertificate::version() const':
/src/qt/src/network/ssl/qsslcertificate.cpp:264:68: error: invalid use of incomplete type 'X509' {aka 'struct x509_st'}
             QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1);
                                                                    ^~
In file included from ../../include/QtNetwork/qsslcertificate.h:1,
                 from /src/qt/src/network/ssl/qsslerror.h:47,
                 from ../../include/QtNetwork/qsslerror.h:1,
                 from /src/qt/src/network/ssl/qsslsocket.h:50,
                 from /src/qt/src/network/ssl/qsslsocket_p.h:46,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_p.h:57,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_symbols_p.h:57,
                 from /src/qt/src/network/ssl/qsslcertificate.cpp:114:
/src/qt/src/network/ssl/qsslcertificate.h:53:16: note: forward declaration of 'X509' {aka 'struct x509_st'}
 typedef struct x509_st X509; // ### check if this works
                ^~~~~~~
/src/qt/src/network/ssl/qsslcertificate.cpp: In member function 'QByteArray QSslCertificate::serialNumber() const':
/src/qt/src/network/ssl/qsslcertificate.cpp:279:45: error: invalid use of incomplete type 'X509' {aka 'struct x509_st'}
         ASN1_INTEGER *serialNumber = d->x509->cert_info->serialNumber;
                                             ^~
In file included from ../../include/QtNetwork/qsslcertificate.h:1,
                 from /src/qt/src/network/ssl/qsslerror.h:47,
                 from ../../include/QtNetwork/qsslerror.h:1,
                 from /src/qt/src/network/ssl/qsslsocket.h:50,
                 from /src/qt/src/network/ssl/qsslsocket_p.h:46,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_p.h:57,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_symbols_p.h:57,
                 from /src/qt/src/network/ssl/qsslcertificate.cpp:114:
/src/qt/src/network/ssl/qsslcertificate.h:53:16: note: forward declaration of 'X509' {aka 'struct x509_st'}
 typedef struct x509_st X509; // ### check if this works
                ^~~~~~~
/src/qt/src/network/ssl/qsslcertificate.cpp: In member function 'QSslKey QSslCertificate::publicKey() const':
/src/qt/src/network/ssl/qsslcertificate.cpp:492:32: error: invalid use of incomplete type 'X509' {aka 'struct x509_st'}
     X509_PUBKEY *xkey = d->x509->cert_info->key;
                                ^~
In file included from ../../include/QtNetwork/qsslcertificate.h:1,
                 from /src/qt/src/network/ssl/qsslerror.h:47,
                 from ../../include/QtNetwork/qsslerror.h:1,
                 from /src/qt/src/network/ssl/qsslsocket.h:50,
                 from /src/qt/src/network/ssl/qsslsocket_p.h:46,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_p.h:57,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_symbols_p.h:57,
                 from /src/qt/src/network/ssl/qsslcertificate.cpp:114:
/src/qt/src/network/ssl/qsslcertificate.h:53:16: note: forward declaration of 'X509' {aka 'struct x509_st'}
 typedef struct x509_st X509; // ### check if this works
                ^~~~~~~
/src/qt/src/network/ssl/qsslcertificate.cpp:496:29: error: invalid use of incomplete type 'EVP_PKEY' {aka 'struct evp_pkey_st'}
     if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA) {
                             ^~
In file included from /usr/include/openssl/crypto.h:25,
                 from /usr/include/openssl/bio.h:20,
                 from /usr/include/openssl/asn1.h:16,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_p.h:66,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_symbols_p.h:57,
                 from /src/qt/src/network/ssl/qsslcertificate.cpp:114:
/usr/include/openssl/ossl_typ.h:93:16: note: forward declaration of 'EVP_PKEY' {aka 'struct evp_pkey_st'}
 typedef struct evp_pkey_st EVP_PKEY;
                ^~~~~~~~~~~
/src/qt/src/network/ssl/qsslcertificate.cpp:500:36: error: invalid use of incomplete type 'EVP_PKEY' {aka 'struct evp_pkey_st'}
     } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) {
                                    ^~
In file included from /usr/include/openssl/crypto.h:25,
                 from /usr/include/openssl/bio.h:20,
                 from /usr/include/openssl/asn1.h:16,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_p.h:66,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_symbols_p.h:57,
                 from /src/qt/src/network/ssl/qsslcertificate.cpp:114:
/usr/include/openssl/ossl_typ.h:93:16: note: forward declaration of 'EVP_PKEY' {aka 'struct evp_pkey_st'}
 typedef struct evp_pkey_st EVP_PKEY;
                ^~~~~~~~~~~
/src/qt/src/network/ssl/qsslcertificate.cpp:504:36: error: invalid use of incomplete type 'EVP_PKEY' {aka 'struct evp_pkey_st'}
     } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) {
                                    ^~
In file included from /usr/include/openssl/crypto.h:25,
                 from /usr/include/openssl/bio.h:20,
                 from /usr/include/openssl/asn1.h:16,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_p.h:66,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_symbols_p.h:57,
                 from /src/qt/src/network/ssl/qsslcertificate.cpp:114:
/usr/include/openssl/ossl_typ.h:93:16: note: forward declaration of 'EVP_PKEY' {aka 'struct evp_pkey_st'}
 typedef struct evp_pkey_st EVP_PKEY;
                ^~~~~~~~~~~
make[1]: *** [Makefile:16715: .obj/release-static/qsslcertificate.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/src/qt/src/network/ssl/qsslkey.cpp: In member function 'int QSslKey::length() const':
/src/qt/src/network/ssl/qsslkey.cpp:325:34: error: invalid use of incomplete type 'RSA' {aka 'struct rsa_st'}
            ? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p);
                                  ^~
In file included from /usr/include/openssl/crypto.h:25,
                 from /usr/include/openssl/bio.h:20,
                 from /usr/include/openssl/asn1.h:16,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_p.h:66,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_symbols_p.h:57,
                 from /src/qt/src/network/ssl/qsslkey.cpp:62:
/usr/include/openssl/ossl_typ.h:110:16: note: forward declaration of 'RSA' {aka 'struct rsa_st'}
 typedef struct rsa_st RSA;
                ^~~~~~
/src/qt/src/network/ssl/qsslkey.cpp:325:61: error: invalid use of incomplete type 'DSA' {aka 'struct dsa_st'}
            ? q_BN_num_bits(d->rsa->n) : q_BN_num_bits(d->dsa->p);
                                                             ^~
In file included from /usr/include/openssl/crypto.h:25,
                 from /usr/include/openssl/bio.h:20,
                 from /usr/include/openssl/asn1.h:16,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_p.h:66,
                 from /src/qt/src/network/ssl/qsslsocket_openssl_symbols_p.h:57,
                 from /src/qt/src/network/ssl/qsslkey.cpp:62:
/usr/include/openssl/ossl_typ.h:107:16: note: forward declaration of 'DSA' {aka 'struct dsa_st'}
 typedef struct dsa_st DSA;
                ^~~~~~
make[1]: *** [Makefile:17359: .obj/release-static/qsslkey.o] Error 1
make[1]: Leaving directory '/tgt/qt/src/network'
make: *** [Makefile:267: sub-network-make_default-ordered] Error 2

Get the right build for quality documents AND Docker

I recently tried wkhtmltopdf and was very pleased by the result.

I first installed it on my Fedora 30 workstation from Fedora repo : results were perfect and crisp!

Then, I wanted to deploy it on Docker. I first used Alpine Linux. Then, while executing Docker instance on my workstation, I noticed this was not that crisp anymore : images were distorted, etc...

I then deployed on a Docker Debian Buster Stretch and the crispiness was happily back again : Good so far.

But, while deploying on AWS, wkhtmltopdf would generate blank pdf and image... I guess, the reason is that wkhtmltopdf package is not Qt patched... (But why does it work on a docker instance on my workstation?)

So, I installed the Qt Patched package provided here : https://wkhtmltopdf.org/downloads.html

Cool, documents are generated on AWS Docker... But are not crispy at all...
No flexbox!!!

I just applied the packaging procedure described in this repo and got a package for target debian busty amd64 build (checkout with the 012.5 tag). Unfortunately, it's the same problem as above : no flexbox and distorted images... Did not even tried to execute it on AWS Docker...
Well, I guess I just built the same binaries as those provided by your project.

So, the point here is to get - or build - a package that would make crispy documents AND being able to work on Docker...

Are they special arguments to add to build it with more features (flexbox?) ???

Debian and Fedora achieved to build 0.12.5 versions which render great. So, I know this lib is able to do it! Is this achieved by installed additional packages?
I just need the Fedora/Debian packages quality with Docker support (Qt)!!!!

Thanks for your help

SSH command syntax incorrect

Hi,
Doing a windows build using the new packaging module I get past invoking the virtualbox mcandre/windows-amd64 and successfully ssh into the vm to begin building the pre requisites for a windows build but get stuck on ...

The syntax of the command is incorrect.
ssh -F vagrant/.vagrant/windows_config windows -- mkdir -p /c/Users/vagrant/msvc2015-win64
command failed: exit code 1

image

Building on Ubuntu 18.04 server with standard packaging git cloned

rework Raspberry Pi build

The docker repository used for the Stretch build has been deprecated. We need to investigate whether the new repository generates usable packages, and merge them if we're able to get feedback whether they work.

We should also probably add a buster build as well.

Synology ipkg package

Hello,

I would like to ask you to create ipkg packages for Synology Diskstations too when you create a new release.

Thanks

QXcbConnection: Could not connect to display

QXcbConnection: Could not connect to display
wkhtmltopdf exited with code 134

in

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

Lambda function convert HTML to PDF using wkhtmltopdf failed after upgraded the runtime from Node.js 8.10 to 10.x deployed on Amazon Linux 2

Error happened after deployed to AWS (new AWS Linux 2 with node.js 10.x runtime). It was working with node.js 8.10 runtime with previous AWS Linux.

Description
Due to end of life support of Node.js 8.10 runtime for AWS Lambda function, we are currently undergoing an upgrade to Node.js 10.x runtime which runs on a new version of Amazon Linux called the Amazon Linux 2.

Once deployed my application to AWS, I received the following errors:
Error: wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory
wkhtmltopdf exited with code 127
at handleError (/var/task/payment/index.js:3715:16)
at ChildProcess. (/var/task/payment/index.js:3683:7)
at ChildProcess.emit (events.js:198:13)
at ChildProcess.EventEmitter.emit (domain.js:448:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)

wkhtmltopdf module depends on libXrender.so system module, which is not included in the Amazon Linux 2 AMI. It worked earlier as this module was available in previous Amazon Linux AMI with Node.js 8.10.

Are you able to provide a build package compiled with the wkhtmltopdf binary? I can then create a lambda layer from it.

Thanks
Joe

YUM repo may be missing

I also did not notice the yum repo URL in the readme.md file. Please, can this be added to documentation?

Please publish debian buster build for 0.12.5

Hi,

Commit 66ddc3e added support for building on debian buster, which is the current debian stable release. However, such a build does not exist on the homepage yet:

image

It would be awesome if such a binary would be published.

Thank you for all your great work!

FEATURE: we use different linux packages and it is very complex to install it to a folder

Hello!

How are you?

Before, we could install the wkhtmltopdf installer with a https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz, but with 0.12.5 we have many deb, rpm etc...

Is it possible to get the latest *linux-generic-amd64.tar.xz release and just untar to use it, like before?

We would have to install it every flavour in LINUX......

THANKS SO MUCH!

patrik

Problems when compiling on armv8 platform.

#1

I tried to build for arm64, but some compilation errors have occurred.

error: cast from 'JSC::JSCell*' to 'int32_t {aka int}' loses precision [-fpermissive]

It seems to be qt4 own bug. (http://lists.openembedded.org/pipermail/openembedded-core/2014-November/098726.html)

I tried change int32_t to int64_t, solved the cast problem but caused another problem:
It can't pass COMPILE_ASSERT at src/3rdparty/webkit/Source/JavaScriptCore/runtime/JSGlobalData.cpp:126

// Enough storage to fit a JSArray, JSByteArray, JSString, or JSFunction.
// COMPILE_ASSERTS below check that this is true.
char storage[64];
COMPILE_ASSERT(sizeof(JSArray) <= sizeof(storage), sizeof_JSArray_must_be_less_than_storage);

So I change char storage[64]; to char storage[80];, and compiled successfully.

But when I tried to run it, a segmentation error occurred. I tried to debug it with gdb, seems to be about JSValue or something else...

I don't know how to solve it. I am not familiar with c++. 😢


packaging version is 0.12.5-1
wkhtmltopdf version is 4.8.7
build command I am using is

./build package-docker arm64 ./path/of/wkhtmltopdf

Here is the build.yml

# prefix used in determining full image name in "docker-images" and "compile-docker"
docker-prefix: wkhtmltopdf/packaging:0.12_

# command to run for enabling foreign-arch support in currently running kernel (>= 4.8)
qemu-cmd:      docker run --rm --privileged fkrull/qemu-user-static enable

# all targets supported by the docker-related commands, keys are as follows:
#
#   source:         Dockerfile used to build image
#   output:         one of deb, rpm, tar or 7z
#   args:           build-time docker args (optional)
#   arch:           used as arch specified to fpm (for deb or rpm output)
#   depend:         dependent packages specified to fpm (for deb or rpm output)
#   qt_config:      override the qt configuration used for building Qt (optional)
#   cross_compile:  use given prefix for cross-compilation (optional)
#   qemu:           set to true if qemu emulation is required (optional)
#
docker-targets:
  arm64:
    source: docker/Dockerfile.debian
    args:
      from: arm64v8/debian:stretch
    output: 7z
    qemu:   true
    arch:   arm64
    depend: >
      ca-certificates
      fontconfig
      libc6
      libfreetype6
      libjpeg62-turbo
      libpng16-16
      libssl1.1
      libstdc++6
      libx11-6
      libxcb1
      libxext6
      libxrender1
      xfonts-75dpi
      xfonts-base
      zlib1g

# Qt configure arguments
qt-config:
  common: >
    -opensource
    -confirm-license
    -fast
    -release
    -static
    -graphicssystem raster
    -webkit
    -exceptions
    -xmlpatterns
    -system-zlib
    -system-libpng
    -system-libjpeg
    -no-libmng
    -no-libtiff
    -no-accessibility
    -no-stl
    -no-qt3support
    -no-phonon
    -no-phonon-backend
    -no-opengl
    -no-declarative
    -no-script
    -no-scripttools
    -no-sql-ibase
    -no-sql-mysql
    -no-sql-odbc
    -no-sql-psql
    -no-sql-sqlite
    -no-sql-sqlite2
    -no-mmx
    -no-3dnow
    -no-sse
    -no-sse2
    -no-multimedia
    -nomake demos
    -nomake docs
    -nomake examples
    -nomake tools
    -nomake tests
    -nomake translations
  debug:
    -debug
    -webkit-debug
  docker: >
    -silent
    -xrender
    -largefile
    -iconv
    -openssl-linked
    -no-javascript-jit
    -no-rpath
    -no-dbus
    -no-nis
    -no-cups
    -no-pch
    -no-gtkstyle
    -no-nas-sound
    -no-sm
    -no-xshape
    -no-xinerama
    -no-xcursor
    -no-xfixes
    -no-xrandr
    -no-mitshm
    -no-xinput
    -no-xkb
    -no-glib
    -no-gstreamer
    -no-icu
    -no-openvg
    -no-xsync
    -no-audio-backend
    -no-sse3
    -no-ssse3
    -no-sse4.1
    -no-sse4.2
    -no-avx
    -no-neon
  mingw-w64: >
    -silent
    -openssl-linked
    -no-reduce-exports
    -no-rpath
    -no-pch
    -xplatform win32-g++-4.6
  macos-carbon: >
    -silent
    -reduce-exports
    -no-framework
    -no-dwarf2
    -openssl-linked
    -largefile
    -no-rpath
    -carbon
    -platform unsupported/macx-clang
  macos-cocoa: >
    -silent
    -reduce-exports
    -no-framework
    -no-dwarf2
    -openssl-linked
    -largefile
    -no-rpath
    -cocoa
    -platform unsupported/macx-clang-libc++
  msvc: >
    -mp
    -qt-style-windows
    -no-style-cleanlooks
    -no-style-windowsxp
    -no-style-windowsvista
    -no-style-plastique
    -no-style-motif
    -no-style-cde
    -openssl-linked

# docker image which provides fpm
fpm-image:      wkhtmltopdf/fpm:20190502

# parameters for building linux packages via fpm (deb/rpm)
fpm-params:
  name:         wkhtmltox
  description:  convert HTML to PDF and various image formats using QtWebkit
  license:      LGPLv3
  vendor:       wkhtmltopdf
  maintainer:   Ashish Kulkarni <[email protected]>
  url:          https://wkhtmltopdf.org/
  prefix:       /usr/local
  category:     utils

Thanks !

Hello @ashkulz,

Just wanted to say thanks for your work on wkhtmltopdf (repackaging to fix cross distro issues, maintaining the package, etc). Your continued efforts are invaluable :)

Have a nice day,
Conrad

How to Build: Debian Jessie

I've installed 0.12.5 via apt, so I know it's possible.

But I cannot for the life of me get it to compile via source.

Do you have exact steps to build this? I've looked at various issues, but none are helping.

Various attempts:
From #12:

****@****:~/packaging$ ./build compile-docker jessie-amd64 ../wkhtmltopdf/ release
flag provided but not defined: -v/home/****/wkhtmltopdf:/src
See 'docker run --help'.
docker run --rm -v/home/****/wkhtmltopdf:/src -v/home/****/packaging/release:/tgt -w/tgt/qt --user 1001:1001 wkhtmltopdf/packaging:0.12_jessie-amd64 /src/qt/configure -opensource -confirm-license -fast -release -static -graphicssystem raster -webkit -exceptions -xmlpatterns -system-zlib -system-libpng -system-libjpeg -no-libmng -no-libtiff -no-accessibility -no-stl -no-qt3support -no-phonon -no-phonon-backend -no-opengl -no-declarative -no-script -no-scripttools -no-sql-ibase -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 -no-mmx -no-3dnow -no-sse -no-sse2 -no-multimedia -nomake demos -nomake docs -nomake examples -nomake tools -nomake tests -nomake translations -silent -xrender -largefile -iconv -openssl-linked -no-javascript-jit -no-rpath -no-dbus -no-nis -no-cups -no-pch -no-gtkstyle -no-nas-sound -no-sm -no-xshape -no-xinerama -no-xcursor -no-xfixes -no-xrandr -no-mitshm -no-xinput -no-xkb -no-glib -no-gstreamer -no-icu -no-openvg -no-xsync -no-audio-backend -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-neon  --prefix=/tgt/qt
command failed: exit code 2

From #7

****@****:~/packaging$ ./build package-docker ../wkhtmltopdf release
Traceback (most recent call last):
  File "./build", line 297, in <module>
    main()
  File "./build", line 294, in main
    func(yaml.load(f.read()), **args)
  File "./build", line 116, in package_docker
    if config['docker-targets'][target].get('qemu'):
KeyError: '../wkhtmltopdf'

Any help would be appreciated.

(Yes, I've properly cloned the wkhtmltopdf and qt repos)

Can we have a static latest version of wkhtmltox?

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?

Ubuntu 12 support

hi!

Can we have the .deb for Ubuntu 12? Or at least the generic version

How to build without patched Qt

I only need some simple function of wkhtmltopdf. My docker wkhtmltopdf work perfectly.
But, with the version with patched Qt downloaded in wkhtmltopdf site, It not work correct, the pdf file broken table border.
In my docker, wkhtmltopdf is reduced version. When I run wkhtmltopdf -h, the result is:

Name:
  wkhtmltopdf 0.12.5
...
Reduced Functionality:
  This version of wkhtmltopdf has been compiled against a version of QT without
  the wkhtmltopdf patches. Therefore some features are missing, if you need
  these features please use the static version.

I need run wkhtmltopdf on centos 6. Thus, I need build my self wkhtmltopdf without patched Qt. How to do this?

p/s: I tried build wkhtmltopdf from this repo. The result is same with download file in main site. #

Build for centOS 7

I am trying to build binary for centOS7 . can any help ? i cannot upgrade docker version in env to the mentioned version. Is there any other way to build it .

Build for sles 12.4 needed

Hello,

we need the 0.12.5 on a SLES 12.4 server.
i downloaded the sources and if i get this right i would need a docker image for sles 12.4 which i cant find - so no possibility to compile this?!

with best regards, roebert

.net core

Is there an easy way to port this to .net core?

I have see some wrapper for .net Framework. (TuesPechkin is verry nice).

.net core aim to be for all platforms, so if you can target .net standard 2.0, we will be able to use this on MacOs, Android, IOS, Asp.Net Core, Windows Applications, Linux, etc ...

Is there anny work in progress ?

Build command doesn't work as expected

I ran the command to build for Linux as instructed here but I get an error telling me there are too few arguments.

./build package-docker

I don't really understand the instructions on the home page either. I've had a look at the .yml file where it says there are instructions but it isn't at all clear to me what commands I would run for a specific build. I would expect something like the following.

./build --target bionic-amd64

To get round my use case I've downloaded the previous version directly like so.

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz

As I've seen mentioned elsewhere this was a lot simpler but I'm now stuck on an older version as these packages are no longer provided. Any help appreciated :-)

Alpine Support

Alpine becomes quite popular when docker containers are used.
Thus It is good to have Alpine support by wkhtmltopdf.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.