Skip to content

"In-place"d build-tools not made available via $PATH #5104

@hvr

Description

@hvr

It appears that build-tools which become in-place, don't end up being locatable via $PATH.

I noticed this when trying to cabal new-build exe:cabal in Git's cabal-2.0 branch:

$ cnb exe:cabal
Build profile: -w ghc-8.2.2 -O1
In order, the following will be built (use -v for more details):
 - pretty-show-1.6.16 (lib) (first run)
 - cabal-install-2.0.0.1 (exe:cabal) (first run)
Configuring library for pretty-show-1.6.16..
cabal: The program 'happy' is required but it could not be found.

cabal: Failed to build pretty-show-1.6.16 (which is required by cabal-install-2.0.0.1). The failure occurred during the configure step.

And if we look at plan.json, we can clearly see that pretty-show depends on the inplace happy-1.19.8-inplace build-tool:

    {
      "type": "configured",
      "id": "pretty-show-1.6.16-inplace",
      "pkg-name": "pretty-show",
      "pkg-version": "1.6.16",
      "flags": {},
      "style": "inplace",
      "pkg-src-sha256": "dbee8476bf12ce5bd991d0a52c1340802e07bb706c68c1a7911a38db16ac0350",
      "dist-dir": "/stuff3/work/GitHub/cabal-2.0/dist-newstyle/build/x86_64-linux/ghc-8.2.2/pretty-show-1.6.16",
      "depends": [
        "array-0.5.2.0",
        "base-4.10.1.0",
        "haskell-lexer-1.0.1-e064fdcf35c9d26edcab1e4ec89f91c2f69f01338016ce35cbe105ffc3720962",
        "pretty-1.1.3.3",
        "filepath-1.4.1.2",
        "ghc-prim-0.5.1.1"
      ],
      "exe-depends": [
        "happy-1.19.8-inplace"
      ],
      "component-name": "lib"
    },

whose executable can be found in dist-newstyle:

    {
      "type": "configured",
      "id": "happy-1.19.8-inplace",
      "pkg-name": "happy",
      "pkg-version": "1.19.8",
      "flags": {
        "small_base": true
      },
      "style": "inplace",
      "pkg-src-sha256": "4df739965d559e48a9b0044fa6140241c07e8f3c794c6c0a6323024fd7f0d3a0",
      "dist-dir": "/stuff3/work/GitHub/cabal-2.0/dist-newstyle/build/x86_64-linux/ghc-8.2.2/happy-1.19.8",
      "components": {
        "exe:happy": {
          "depends": [
            "base-4.10.1.0",
            "array-0.5.2.0",
            "containers-0.5.10.2",
            "mtl-2.2.1-97763c4fed4fb8db9480ab17817d7bc91517cc666c409844d1b89dd550f4d270"
          ],
          "exe-depends": [],
          "bin-file": "/stuff3/work/GitHub/cabal-2.0/dist-newstyle/build/x86_64-linux/ghc-8.2.2/happy-1.19.8/build/happy/happy"
        },
        "setup": {
          "depends": [
            "Cabal-2.0.1.1-inplace",
            "base-4.10.1.0",
            "directory-1.3.0.2",
            "filepath-1.4.1.2"
          ],
          "exe-depends": []
        }
      }
    },

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions