wkhtmltopdf
wkhtmltopdf copied to clipboard
Missing `-lssl -lcrypto` during linking of `wkhtmltoimage` on EL9
wkhtmltopdf version(s) affected: 0.13.0
OS information RHEL 9.4
Description
When trying to compile the package we are unable to link the final wkhtmltoimage
binary.
How to reproduce
Follow the steps on README.md to install the package, it will fail on ./bootstrap.sh wk build
.
As for the dependencies just install it as:
dnf install -y python3.11 python3.11-pip git make gcc-g++ libX11-devel libXext-devel libXdmcp-devel libXrender-devel openssl-devel
PSA: libXdmcp-devel
is only available on Codeready Builder / CRB / PowerTools.
Expected behavior Successful compilation
Possible Solution
Just adding -lssl -lcrypto
will solve the issue. I've manually done that with the command:
g++ -Wl,-O1 -o ../../bin/wkhtmltoimage outputter.o manoutputter.o htmloutputter.o textoutputter.o arghandler.o commondocparts.o commandlineparserbase.o commonarguments.o progressfeedback.o loadsettings.o logging.o multipageloader.o tempfile.o converter.o websettings.o reflect.o utilities.o pdfsettings.o pdfconverter.o outline.o tocstylesheet.o imagesettings.o imageconverter.o wkhtmltoimage.o imagearguments.o imagecommandlineparser.o imagedocparts.o moc_progressfeedback.o moc_multipageloader_p.o moc_converter_p.o moc_pdfconverter_p.o moc_imageconverter_p.o moc_converter.o moc_multipageloader.o moc_utilities.o moc_pdfconverter.o moc_imageconverter.o qrc_wkhtmltopdf.o -L/root/wkhtmltopdf/.cutekit/build/host-x86_64-28303022-81498e1a/prefix/lib -L/root/wkhtmltopdf/.cutekit/build/host-x86_64-28303022-81498e1a/prefix/plugins/codecs -lqcncodecs -L/root/wkhtmltopdf/.cutekit/build/host-x86_64-28303022-81498e1a/qt/lib -L/root/wkhtmltopdf/.cutekit/build/host-x86_64-28303022-81498e1a/prefix/lib -lqjpcodecs -lqkrcodecs -lqtwcodecs -lQtWebKit -L/usr/X11R6/lib -lQtSvg -lQtXmlPatterns -lQtGui -lXrender -lXext -lX11 -lxcb -lXau -lXdmcp -lQtNetwork -lQtCore -lm -ldl -lrt -lpthread -lssl -lcrypto
But that isn't a solution. The build system should be modified to handle this.