Skip to content

Replace /usr/bin/find hacks in dependency makefiles with Cargo variables #6088

Closed

Description

@SimonSapin

Some of our dependencies makefiles have hacks like this:

https://github.com/servo/rust-azure/blob/11d7292919a365c55ca6204c465c5eeefcabfe05/makefile.cargo#L62

SKIA_OUTDIR = $(shell find $(OUT_DIR)/../.. -name 'skia-*' -type d)/out

… which break when e.g. there is more then one directory matching skia-* (multiple versions have been built without cargo clean).

Instead, we should be using Cargo’s metadata and DEP_* environment variables: http://doc.crates.io/build-script.html#the-links-manifest-key

Activity

  1. SimonSapin commented on May 16, 2015

    @SimonSapin
    MemberAuthor

    This should fix issues like this:

    http://logs.glob.uno/?c=mozilla%23servo#c213053

    07:38 KiChjang i'm having trouble building servo now
    07:38 KiChjang using mach build, it tells me that there's an error in skia-c.h
    07:39 KiChjang i mean, an error in azure-c.cpp
    07:39 KiChjang says it cannot find skia-c.h
    11:30 Manishearth crowbot: ping KiChjang delete all azure and skia thingies from your target/debug dir. rm -rf components/servo/target/debug/_/_azure* and same for skia

  2. self-assigned this
    on May 27, 2015
  3. added
    I-bustage
    on May 27, 2015
  4. SimonSapin commented on May 27, 2015

    @SimonSapin
    MemberAuthor

    Based on cargo-home/git/checkouts$ grep -Rl 'shell find'|cut -d/ -f1|sort -u:

    • libfontconfig
    • mozjs
    • rust-azure
    • rust-core-foundation
    • rust-core-graphics
    • rust-core-text
    • rust-egl
    • rust-fontconfig
    • rust-freetype
    • rust-io-surface
    • rust-layers
    • rust-mozjs
    • rust-stb-image
    • rust-xlib
    • skia
  5. added a commit that references this issue on May 27, 2015
  6. mbrubeck commented on May 27, 2015

    @mbrubeck
    Contributor

    It looks like the rust-freetype one is innocent (it's just running find -name *.rs within its source directory).

  7. removed their assignment
    on May 27, 2015
  8. added
    E-less-complex
    on May 27, 2015
  9. mbrubeck commented on May 27, 2015

    @mbrubeck
    Contributor

    If anyone would like to help out with the remaining packages, see the various pull requests linked above for examples of how to fix this.

  10. added a commit that references this issue on May 27, 2015
  11. asbaker commented on May 28, 2015

    @asbaker
    Contributor

    These are also all innocently finding within their source directories:
    mozjs
    rust-core-graphics
    rust-core-foundation
    rust-core-text
    rust-egl
    rust-io-surface
    rust-layers
    rust-stb-image
    rust-xlib

    That should just leave rust-mozjs as the only offender.

    I'll take a look and open a PR tomorrow evening.

  12. added 2 commits that reference this issue on May 30, 2015
    f4584c9
    5916143
  13. added
    A-build
    and removed on Jan 12, 2016
  14. added a commit that references this issue on Jun 12, 2017
    0262edf
  15. added 3 commits that reference this issue on Sep 30, 2019
    80333ef
    2cd98bb
    253b3fd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-buildE-less-complexI-bustage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions