c2patool icon indicating copy to clipboard operation
c2patool copied to clipboard

c2patool build is failing for linux

Open akh64bit opened this issue 3 years ago • 3 comments

Hello Team,

@sven2718 and I (Both are adobe employees [email protected] & [email protected]) have been trying to build the c2patool on linux (as a docker image) using brew and it has recently started failing. It used to work well before. We suspect that recent change in the linuxbrew might be causing this failure.

You should be able to reproduce the error by trying to build the tool on ubuntu:20.04 by doing brew install c2patool

Here are the full logs.

` ERROR [stage-2 27/31] RUN brew install c2patool 22.2s

[stage-2 27/31] RUN brew install c2patool: #42 4.290 ==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:fc45ee6eddf4c7a17f4373dde7b1bc8a58255ea61e6847d3bf895225b28d072a #42 4.290 Already downloaded: /root/.cache/Homebrew/portable-ruby-2.6.8_1.x86_64_linux.bottle.tar.gz #42 4.978 ==> Pouring portable-ruby-2.6.8_1.x86_64_linux.bottle.tar.gz #42 8.759 Running brew update --auto-update... #42 15.54 ==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:fc45ee6eddf4c7a17f4373dde7b1bc8a58255ea61e6847d3bf895225b28d072a #42 15.54 Already downloaded: /root/.cache/Homebrew/portable-ruby-2.6.8_1.x86_64_linux.bottle.tar.gz #42 15.91 ==> Pouring portable-ruby-2.6.8_1.x86_64_linux.bottle.tar.gz #42 22.10 Error: No available formula with the name "python" (dependency of contentauth/tools/c2patool). Did you mean ipython, bpython, wxpython, pythran, jython, cython or ptpython? #42 22.10 In formula file: /home/linuxbrew/.linuxbrew/Library/Taps/homebrew/homebrew-core/Aliases/python #42 22.10 Expected to find class Python, but only found: PythonAT310.


executor failed running [/bin/bash -c brew install c2patool]: exit code: 1 make: *** [build] Error 1`

Please let me and Sven know how to proceed. Please let us know if you need more details from us.

akh64bit avatar Sep 13 '22 21:09 akh64bit

We are updating our build system to create pre-built binaries for different platforms. The brew installation will be updated to support installing those binaries once that is ready. In the mean time we have removed brew install from our documentation

you can use: cargo install c2patool to build a new c2patool on your platform. You should make sure is is in your path with something like this: export PATH=$PATH:/root/.cargo/bin

gpeacock avatar Sep 14 '22 20:09 gpeacock

Hmm. Just doing a simple cargo install c2patool inside a ubuntu:20.04 base image still didn't work for us. After a little messing around with packages, I found this config, which does appear to build and run in docker:

FROM ubuntu:20.04 as c2pa_builder

SHELL ["/bin/bash", "-c"]

RUN apt-get update -y && apt-get upgrade -y && apt-get install -y clang curl build-essential git libssl-dev && \
 curl https://sh.rustup.rs -sSf | bash -s -- -y && \
 source "$HOME/.cargo/env" && \
 cargo install c2patool

I'm not entirely sure if all those apt packages are necessary on ubuntu, but I was seeing some strange gcc errors before I switched to clang.

sven2718 avatar Oct 18 '22 22:10 sven2718

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/CAI-3363 is successfully created for this GitHub issue.

github-jira-sync-bot avatar Jan 23 '23 19:01 github-jira-sync-bot