gramineproject / gsc

Gramine Shielded Containers (Docker integration)
BSD 3-Clause "New" or "Revised" License
46 stars 37 forks source link

GSC build for workloads is failing GSC tag v1.5 with latest meson version upgrade #178

Closed anjalirai-intel closed 10 months ago

anjalirai-intel commented 12 months ago

Description of the problem

Recently meson version has been upgraded to v1.3.0, due to which gsc v1.5 build fails with error Cannot link_whole a custom or Rust target 'curl' into a static library 'sgx_util'.

Currently meson version has been restricted to meson>=0.56,!=1.2.*

Steps to reproduce

  1. Clone GSC Repo, checkout tag v1.5
  2. Build any test workloads

Expected results

The build should be successful

Actual results

tools/sgx/common/meson.build:1:11: ERROR: Cannot link_whole a custom or Rust target 'curl' into a static library 'sgx_util'. Instead, pass individual object files with the "objects:" keyword argument if possible. Meson had to promote link to link_whole because 'sgx_util' is installed but not 'curl', and thus has to include objects from 'curl' to be usable.

Fix

+++ b/templates/debian/Dockerfile.compile.template
@@ -31,7 +31,7 @@ RUN env DEBIAN_FRONTEND=noninteractive apt-get update \
           python3-tomli-w
        {%- else %}
           python3-pip \
-           && /usr/bin/python3 -B -m pip install 'tomli>=1.1.0' 'tomli-w>=0.4.0' 'meson>=0.56,!=1.2.*'
+           && /usr/bin/python3 -B -m pip install 'tomli>=1.1.0' 'tomli-w>=0.4.0' 'meson>=0.56,<1.2.*'
        {%- endif %}
<!-- ## Additional information -->
<!-- if applicable, uncomment and fill this section -->
anjalirai-intel commented 10 months ago

Issue has been fixed by upgrading GSC to v1.6 which has fix for meson issue