# BinaryBuilder project works on Travis CI, but fails on GitLab CI

**URL:** <https://discourse.julialang.org/t/binarybuilder-project-works-on-travis-ci-but-fails-on-gitlab-ci/66819>\
**Category:** Tooling\
**Tags:** binarybuilder\
**Created:** [August 22, 2021, 9:54pm UTC](https://discourse.julialang.org/t/binarybuilder-project-works-on-travis-ci-but-fails-on-gitlab-ci/66819 "2021-08-22T21:54:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stemann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stemann/32/4030_2.png) [@stemann](https://discourse.julialang.org/u/stemann)\
**Post date:** [August 22, 2021, 9:54pm UTC](https://discourse.julialang.org/t/binarybuilder-project-works-on-travis-ci-but-fails-on-gitlab-ci/66819/1 "2021-08-22T21:54:39Z")

</div>

Any idea, why the following (Julia 1.0) BinaryBuilder project, [https://github.com/IHPSystems/pylon\_julia\_wrapper/tree/feature/travis\_ci\_2021](https://github.com/IHPSystems/pylon_julia_wrapper/tree/feature/travis_ci_2021), builds (using BB) just fine on Travis CI (in 2019 and today in Aug. 2021), but has trouble building on GitLab CI?

The project,

- [builds just fine on Travis CI](https://app.travis-ci.com/github/IHPSystems/pylon_julia_wrapper/builds/235942246),
- builds just fine “on my machine” (Mac using the Docker BB runner),

```julia
BINARYBUILDER_RUNNER=docker BINARYBUILDER_AUTOMATIC_APPLE=true julia --color=yes build_tarballs.jl --verbose

```

- but fails to build tarballs on (a private) GitLab CI running BB in a julia-1.0 container (Julia 1.0 on Debian - on Kubernetes, where the GitLab CI runner is running in privileged mode - it can run docker-in-docker etc.).

Here is the GitLab CI YAML - just a copy of the working Travis CI YAML, except from not defining `BINARYBUILDER_DOWNLOADS_CACHE=downloads`:

```julia
.julia:1.0:
  image: julia:1.0-buster

build:1.0:
  extends:
    - .julia:1.0
  variables:
    BINARYBUILDER_AUTOMATIC_APPLE: "true"
  before_script:
    - julia --project -e 'using Pkg; pkg"add BinaryProvider@0.5.3"; pkg"add BinaryBuilder@0.1.4"; Pkg.build()'
  script:
    - julia --color=yes --project build_tarballs.jl --verbose
    - ls -la products || true

```

The failure on the GitLab CI runner seems to stem from not being able to write to `/workspace/destdir` - even a `touch $prefix/lib/libfoo.txt` in the BB build script fails:

```julia
touch: /workspace/destdir/lib/libfoo.txt: Permission denied

```

I have experimented with setting

- `BINARYBUILDER_RUNNER=privileged`,
- `BINARYBUILDER_RUNNER=userns`,
- just setting `BINARYBUILDER_USE_SQUASHFS=true`
- and combining `BINARYBUILDER_RUNNER=privileged` with `BINARYBUILDER_USE_SQUASHFS=true` (it seems SquashFS images are used on Travis (without setting any env. variables)

Any ideas? What is different/special with Travis?

My last resort (which may come very soon) is trying to upgrade to Julia 1.3+

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [August 22, 2021, 10:15pm UTC](https://discourse.julialang.org/t/binarybuilder-project-works-on-travis-ci-but-fails-on-gitlab-ci/66819/2 "2021-08-22T22:15:11Z")

</div>

> [@stemann](#):
>
> Any ideas?

No

> [@stemann](#):
>
> What is different/special with Travis?

No clue

> [@stemann](#):
>
> My last resort (which may come very soon) is trying to upgrade to Julia 1.3+

Note that BinaryBuilder [v0.1.4](https://github.com/JuliaPackaging/BinaryBuilder.jl/releases/tag/v0.1.4) is 2.5-year old and the package has been largely rewritten since then. The workflow now is completely different. It’s quite unlikely you’ll get any help for that branch of development.

---

<div class="post-metadata">

**Author:** ![stemann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stemann/32/4030_2.png) [@stemann](https://discourse.julialang.org/u/stemann)\
**Post date:** [August 23, 2021, 4:53am UTC](https://discourse.julialang.org/t/binarybuilder-project-works-on-travis-ci-but-fails-on-gitlab-ci/66819/3 "2021-08-23T04:53:46Z")

</div>

OK - thanks for the quick reply.

Time to get the dust off this project and upgrade… 🙂
