Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Commit

Permalink
Amazon Linux 2022 => Amazon Linux 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
ashkulz committed Mar 21, 2023
1 parent 438f57a commit 957cfe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.yml
Expand Up @@ -307,10 +307,10 @@ docker-targets:
xorg-x11-fonts-Type1
zlib
amazonlinux2022:
amazonlinux2023:
source: docker/Dockerfile.centos
args:
from: amazonlinux:2022
from: amazonlinux:2023
output: rpm
matrix: ['x86_64', 'aarch64']
depend: >
Expand Down

8 comments on commit 957cfe9

@johnguilmartin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to do a build from this. It starts fine and begins to compile but then errors out. I'm new here, and new to building in general, so I'm not sure what the best practices are in terms of posting the errors. But from what I have gathered there seems to be an issue with the version of gcc and compiling qt. But I can't be sure. Any help getting a build working would be fantastic!

@ashkulz
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnguilmartin please use the 0.12.6.x branch, it should work with the latest compiler versions.

@johnguilmartin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashkulz I was able to create a working build for AL2023 based on this branch. I'm not sure if you want the rpm to add to the releases, but I have it available. Thanks for your guidance.

@jacob-hutchings
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am also needing the rpm for Amazon Linux 2023.
@johnguilmartin is your rpm available for download somewhere? Or can you provide a little guidance on how I could build my own? Thanks in advance for you help.

@jacob-hutchings
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnguilmartin @ashkulz Wonder if either of you know what I am doing wrong here?

Here is the build command I am using

./build --use-qemu linux/arm64/v8 package-docker amazonlinux2023-aarch64 ../wkhtmltopdf/

and the last few lines of output

/src/qt/src/gui/dialogs/qpagesetupdialog_unix.cpp:553:12: error: 'class Ui::QPageSetupWidget' has no member named 'paperHeight'
  553 |     widget.paperHeight->setValue(m_paperSize.height() / m_currentMultiplier);
      |            ^~~~~~~~~~~
make[1]: *** [Makefile:126266: .obj/release-static/qpagesetupdialog_unix.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/tgt/qt/src/gui'
make: *** [Makefile:375: sub-gui-make_default-ordered] Error 2
docker run --rm -v/home/ec2-user/wkhtmltopdf:/src -v/home/ec2-user/packaging-master/targets/amazonlinux2023-aarch64:/tgt -v/home/ec2-user/packaging-master:/pkg -w/tgt/qt --user 0:0 wkhtmltopdf/0.12:amazonlinux2023-aarch64 make -j2
command failed: exit code 2

@johnguilmartin
Copy link

@johnguilmartin johnguilmartin commented on 957cfe9 May 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jacob-hutchings I'm not totally sure about that output, but here are the steps I took to build wkhtmltopdf for Amazon Linux 2023 - I'll see if I can make my rpm available for a wget as well if you're still experiencing issues

  1. Spin up new AL2023 instance
  2. sudo dnf update
  3. sudo dnf install docker
  4. sudo systemctl start docker
  5. sudo dnf install git
  6. sudo dnf install p7zip
  7. sudo ln -s /usr/bin/python3 /usr/bin/python
  8. sudo dnf group install "Development Tools"
  9. mkdir wkhtmltopdf-build && cd wkhtmltopdf-build
  10. sudo git clone https://github.com/wkhtmltopdf/packaging.git
  11. sudo git clone --branch 0.12.6.x https://github.com/wkhtmltopdf/wkhtmltopdf.git --recurse-submodules
  12. cd packaging
  13. sudo ./build package-docker amazonlinux2023-x86_64 ~/wkhtmltopdf-build/wkhtmltopdf

@jacob-hutchings
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johnguilmartin that worked! Thank you so much. I think the problem was I had checked out the main branch of wkhtmltopdf.git and then did git checkout 0.12.6.x so it didn't get the correct version of the qt submodule. But I also installed the "Development Tools" group so it could have been something in there also.

@joeRinehart
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jacob-hutchings !

If someone else ends up here using AL2023 but is on ARM/aarch64, here's the modification I just used to get a working binary. Only difference was enabling experimental in docker and the (per documentation) use of --use-qemu.

Spin up new AL2023 instance
sudo dnf update
sudo dnf install docker
sudo echo "{ \n\t"experimental": true\n}" > /etc/docker/daemon.json
sudo systemctl start docker
sudo dnf install git
sudo dnf install p7zip
sudo ln -s /usr/bin/python3 /usr/bin/python
sudo dnf group install "Development Tools"
mkdir wkhtmltopdf-build && cd wkhtmltopdf-build
sudo git clone https://github.com/wkhtmltopdf/packaging.git
sudo git clone --branch 0.12.6.x https://github.com/wkhtmltopdf/wkhtmltopdf.git --recurse-submodules
cd packaging
sudo ./build --use-qemu linux/arm64/v8 package-docker amazonlinux2023-aarch64 ../wkhtmltopdf

Please sign in to comment.