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

add support for ppc64le architecture #6

Closed
sarahkemp opened this issue Jun 18, 2018 · 20 comments · Fixed by #66
Closed

add support for ppc64le architecture #6

sarahkemp opened this issue Jun 18, 2018 · 20 comments · Fixed by #66
Assignees
Milestone

Comments

@sarahkemp
Copy link

Referencing: wkhtmltopdf/wkhtmltopdf#3540

I'd love to see wkhtmltopdf working without all the trouble under Ubuntu on PPC64LE architecture.

@ashkulz
Copy link
Member

ashkulz commented Jun 21, 2018

Okay, so this is not really documented -- but you can build your own, see instructions here -- you'll have to use the xenial image instead of centos7. After that, you just need to build the docker image (./build docker-images <image-name>) and the target package (./build package-docker <image-name> <source-dir>) -- note that this will take very long (~8 hours or so) as it uses ppc64le emulation via qemu. You might also want to co-ordinate with @notorca who has a possible alternative for the qt patch required in wkhtmltopdf/qt#40.

@ashkulz
Copy link
Member

ashkulz commented Jun 22, 2018

Added documentation on the complete build/porting process in 1a23e08.

@ashkulz ashkulz changed the title PPC64LE under Ubuntu 16.04 add support for ppc64le architecture Jun 22, 2018
@ashkulz
Copy link
Member

ashkulz commented Jun 22, 2018

The targets requested till date are:

  • xenial-ppc64le
  • centos7-ppc64le

I think it makes sense to add bionic-ppc64le, but building a release will take a long time. Need to figure out if a native cross-compiling solution can be worked out.

@ashkulz ashkulz self-assigned this Mar 21, 2019
@ashkulz
Copy link
Member

ashkulz commented Mar 21, 2019

I'll be adding a centos7-ppc64le build for the next release.

@ananiasfilho
Copy link

I saw the centos7-ppc64le rpm package in https://builds.wkhtmltopdf.org/wkhtmltox-0.12.5-1.centos7.ppc64le.rpm and confirm its works!
But, i cant find package to Ubuntu 16.04 and 18.04 ppc64le. Have package to these version?
Im running ppc64le container, so i cant build it under a container.

@ashkulz
Copy link
Member

ashkulz commented Oct 25, 2019

@ananiasfilho: you can build your own packages easily by changing build.yml in this repository and checking if it works yourself ... I don't see a point in supporting every build variation :)

@ashkulz
Copy link
Member

ashkulz commented Jun 2, 2020

@sarahkemp @ananiasfilho: just a heads up, the next release will have the following builds supported:

  • bionic-ppc64le
  • buster-ppc64le
  • centos7-ppc64le
  • centos8-ppc64le
  • focal-ppc64le
  • stretch-ppc64le
  • xenial-ppc64le

None of these will be built by default, as it takes 5-6 hours to build each target (as it is done via emulation) -- you should be easily be able to build them on your own once #66 is merged.

@ashkulz
Copy link
Member

ashkulz commented Jun 4, 2020

Please see the latest release which has packages for all the targets mentioned above. Please add a comment if you face any problems in using the packages 👍

@ashkulz
Copy link
Member

ashkulz commented Jun 6, 2020

A release candidate for the 0.12.6 release is now available for download, which should contain changes which possibly address this issue.

Would appreciate downloading the package and reporting back if any issues are encountered during testing. Assuming all goes well, I plan to release 0.12.6 on the 2-year anniversary of the previous release i.e. June 11, 2020.

@sarahkemp
Copy link
Author

Really appreciate your work on this. I have not had opportunity to try it until tonight because my OS was too far back. Now I am on 20.04 and tried the candidate and unfortunately it looks like the spelling disagreement between ppc64el and ppc64le prevents my installing it. DPKG insists my architecture is ppc64el, which the architecture of the candidate is ppc64le. I tried forcing it, but all of the dependencies have the same issue.

@ashkulz
Copy link
Member

ashkulz commented Dec 23, 2020

Hmm, can you do a local build with this patch applied?

diff --git a/build.yml b/build.yml
index a206771..4738bd9 100644
--- a/build.yml
+++ b/build.yml
@@ -114,7 +114,7 @@ docker-targets:
       from: ubuntu:focal
       jpeg: libjpeg-turbo8-dev
     output: deb
-    matrix: ['amd64', 'arm64', 'armhf', 'ppc64le']
+    matrix: ['amd64', 'arm64', 'armhf', 'ppc64el']
     depend: >
       ca-certificates
       fontconfig
@@ -529,6 +529,7 @@ matrix-platforms:
   aarch64: linux/arm64/v8
   # common
   ppc64le: linux/ppc64le
+  ppc64el: linux/ppc64le
 
 # parameters for building linux packages via fpm (deb/rpm)
 fpm-params:

@sarahkemp
Copy link
Author

I wish I could but I don't have the resources. My only server with this architecture is my production LPAR and it is not equipped for docker and vagrant.

If I am misunderstanding the capabilites of docker and this could be done on my local machine (not ppc64le/el), I could do that.

@ashkulz
Copy link
Member

ashkulz commented Dec 30, 2020

Yeah, the build can be done on your local machine -- it uses qemu to emulate the ppc64le architecture.

@sarahkemp
Copy link
Author

In case it is not apparent, I've never used docker before.

I installed Docker for Windows on my local machine. I ran ppc64/ubuntu image privileged with a volume. In the ubuntu image, I installed the prerequisites from the readme, cloned the wkhtmltopdf repo with submodules, patched the file, and I tried to ./build package-docker focal-ppc64el ../wkhtmltopdf but I cannot get past the first docker pull:

# docker info
Client:
Debug Mode: false

Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 19.03.8
Storage Driver: vfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version:
runc version:
init version:
Kernel Version: 4.19.128-microsoft-standard
Operating System: Ubuntu 20.04.1 LTS (containerized)
OSType: linux
Architecture: ppc64le
CPUs: 12
Total Memory: 12.38GiB
Name: 5fde96cabd8d
ID: 5A4G:SD3W:BDNQ:FGTC:NIKF:QZGE:EJ3M:G6BI:5PKP:RO3G:LPNW:FMCU
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
# ./build package-docker focal-ppc64el ../wkhtmltopdf
latest: Pulling from aptman/qus
fcdecd492fba: Extracting [==================================================>] 2.625MB/2.625MB 3085330db5da: Download complete 0381b8f086ad: Download complete 731d255096d7: Download complete ccde65c88066: Download complete failed to register layer: ApplyLayer exit status 1 stdout: stderr:
docker pull aptman/qus:latest
command failed: exit code 1

The only way I could get dockerd to run on the ubuntu image was to use --iptables-false.

I got the same error running 'docker run hello-world' so I know it is something I am doing wrong, but I don't have the context to guess what that is since there is no stderr in the message.

@ashkulz
Copy link
Member

ashkulz commented Jan 1, 2021

I haven't tried it on Windows, maybe you should use WSL 2 or an actual Linux machine? Either way, can't really help you troubleshoot docker 🙁

@sarahkemp
Copy link
Author

I tried on an Ubuntu 16.04.1 machine now.

user@computer:~/packaging$ ./build package-docker focal-ppc64el ../wkhtmltopdf
latest: Pulling from aptman/qus
d60bca25ef07: Pull complete
9d7ce0f1bd25: Pull complete
446a55f2ca7b: Pull complete
3769ceceaa1e: Pull complete
d44699a7e3e3: Pull complete
Digest: sha256:e4d01643d7a0e2c1e50b23dbdbb14ec7ed89af9c52b9f18f1d97d74ec8f6398c
Status: Downloaded newer image for aptman/qus:latest
standard_init_linux.go:211: exec user process caused "exec format error"
docker run --rm --privileged aptman/qus:latest -- -r
command failed: exit code 1

Unfortunately I don't even know if this is more docker troubleshooting or something that is meaningful to you.

Is there any way to build without docker on a machine with the same architecture anymore? The build files I used to make wkhtmltopdf on the production machine before are no longer in the wkhtmltopdf repo in favor of this one.

Thank you for your time.

@ashkulz
Copy link
Member

ashkulz commented Jan 8, 2021

What's the output of uname -a? I suspect that the OS is too old, and doesn't meet the requirements.

@sarahkemp
Copy link
Author

You are correct, the kernel did not meet the requirements (I blame the late night). Today I upgraded the OS to 18.04.5. After that, my output is:

user@computer:~/packaging$ uname -a
Linux intranix 4.15.0-130-generic #134-Ubuntu SMP Tue Jan 5 20:42:22 UTC 2021 i686 i686 i686 GNU/Linux

user@computer:~/packaging$ ./build package-docker focal-ppc64el ../wkhtmltopdf
Untagged: aptman/qus:latest
Untagged: aptman/qus@sha256:e4d01643d7a0e2c1e50b23dbdbb14ec7ed89af9c52b9f18f1d97d74ec8f6398c
Deleted: sha256:dae65ad78aebc8e91fd98b4ae93d52bd07a9e27aa8d284a109c3ed70f728da3c
Deleted: sha256:bb3f850de536e687d1afa0465535342088f0de2575ac625f335212a86819daf4
Deleted: sha256:201cf3d5c420d87d49b6d16a4cfb5e660c7d4f71f20a9d6574c1d17cba20af39
Deleted: sha256:ff055b94fa1d27e919752814bf99ae43c456ab2688311eafc4392dff72d62b32
Deleted: sha256:0271e5a98617e2ade68ca44683129614f7bfc9d277aac0b115678a741570de37
Deleted: sha256:1dad141bdb55cb5378a5cc3f4e81c10af14b74db9e861e505a3e4f81d99651bf
latest: Pulling from aptman/qus
d60bca25ef07: Pull complete
9d7ce0f1bd25: Pull complete
446a55f2ca7b: Pull complete
3769ceceaa1e: Pull complete
d44699a7e3e3: Pull complete
Digest: sha256:e4d01643d7a0e2c1e50b23dbdbb14ec7ed89af9c52b9f18f1d97d74ec8f6398c
Status: Downloaded newer image for aptman/qus:latest
docker.io/aptman/qus:latest
standard_init_linux.go:211: exec user process caused "exec format error"
docker run --rm --privileged aptman/qus:latest -- -r
command failed: exit code 1

@sarahkemp
Copy link
Author

After my failure on the linux server, I spun up a new Hyper V instance on a Windows server and installed Ubuntu 20.04. I followed the instructions for this repo and your patch and was able to build wkhtmltopdf for focal-ppc64el. It is now running on my ppc64el machine and seems to be working as expected.

I really appreciate your help with this issue!

ashkulz added a commit that referenced this issue Jan 22, 2021
@ashkulz
Copy link
Member

ashkulz commented Jan 22, 2021

Thanks for confirming! I've pushed a fix for all Debian/Ubuntu packages.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants