-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building Cairo.jl for AWS Lambda #133
Comments
Thanks. Could you make a PR? Note that if you add Harfbuzz as a dependency, you also have to add it to all providers, else it will break Windows, Mac (as well as force having build tools installed on Linux). |
Though about point 1: I'm not sure I really understand what happens, but it sounds like a bug in the image. The package manager shouldn't pretend things work if they don't. Anyway, JuliaPackaging/BinDeps.jl#168 could be a reasonable workaround. |
@nalimilan At this point I don't think what I've done to get the build working is worthy of a PR. It feels like a hack. I don't think I understand how BinDeps is supposed to work, but I hope that someone who does can improve
There is a "build" box (Amazon Linux on EC2) and a multitude of "deployment" boxes (Amazon Linux on the Lambda sandbox). The "build" box is configured to have the same system libraries as the Lambda sandbox. When
I think it would make sense to have It is probably also necessary to have something like |
At least the patch you showed seems to include legitimate fixes, so why not submit them? |
@nalimilan I've cleaned things up a little and submitted a PR: #134 |
PR #292 should probably have made all of this not needed, but I can't check as I don't have access to AWS |
Cairo.jl does not build cleanly for AWS Lambda.
The AWS Lambda sandbox runs on Amazon Linux.
An equivalent EC2 image is used to build binaries that will run on AWS Lambda.
There are a number of problems with the way Cairo.jl's BinDeps configuration works at present:
yum
to install dependencies. This "works" on the EC2 build box, but creates binaries that depend on libraries that do not exists in the Lambda sandbox. I have worked around this by disablingyum
on EC2chmod 000 /usr/bin/yum
.libfreetype
andlibfontconfig
are installed, and therefore does not try to build them from source, but this causes thepango
build to fail later becausepango
requires more recent versions. I've worked around this by modifying thealiases =
entries to specify specific version numbers.pango
requireslibharfbuzz
, but there is no rule to build this inbuild.jl
. I've added anAutotools
rule for this.libgobject
is in the same "group" as all the other deps. This results in an empty# Load dependencies
section indeps.jl
becauselibgobject
is satisfied by a system lib and the others in the group are satisfied byAutotools
.runtime = false
that are in fact needed at runtime. e.g.libpng
,libpixman
,libffi
,libfontconfig
fontconfig
needs the option--enable-libxml2
, otherwise it requires expat to be installed.After some experimentation (see patch below), I've managed to get the build working with the following output in
deps.jl
:The end result is that built in system libraries are used for
libgobject
,libpng
,libpixman
,libffi
andlibz
; and everything else is built form source and installed to/var/task/julia/v0.4/Cairo/deps/usr/lib/
.Libraries available on the Lambda Sandbox:
ldd output
The text was updated successfully, but these errors were encountered: