conda-forge / conda-forge/compilers-feedstock

duplicate `rpath` with `fortran-compiler` (but not `gfortran`)

Open
#79 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
12
Forks
19
Avg merge
1h 6m
Merged PRs (30d)
2

Description

compare:

```console
❯ pixi exec gfortran -### -o foo.so foo.o "$LDFLAGS"
...
-rpath /Users/lucascolley/Library/Caches/rattler/cache/cached-envs-v0/gfortran-5a01f82d1d3155b5/lib
-rpath /Users/lucascolley/Library/Caches/rattler/cache/cached-envs-v0/gfortran-5a01f82d1d3155b5/lib/gcc/arm64-apple-darwin20.0.0/15.2.0
-rpath /Users/lucascolley/Library/Caches/rattler/cache/cached-envs-v0/gfortran-5a01f82d1d3155b5/lib/gcc
```

```console
❯ pixi exec -s fortran-compiler gfortran -### -o foo.so foo.o "$LDFLAGS"
...
-rpath /Users/lucascolley/Library/Caches/rattler/cache/cached-envs-v0/gfortran-24bf00bc432f11f3/lib
-no_compact_unwind
-rpath "@loader_path"
-rpath /Users/lucascolley/Library/Caches/rattler/cache/cached-envs-v0/gfortran-24bf00bc432f11f3/lib/gcc/arm64-apple-darwin20.0.0/14.3.0
-rpath /Users/lucascolley/Library/Caches/rattler/cache/cached-envs-v0/gfortran-24bf00bc432f11f3/lib
```

A duplicate `-rpath /Users/lucascolley/Library/Caches/rattler/cache/cached-envs-v0/gfortran-24bf00bc432f11f3/lib` (i.e. `${PREFIX}/lib`) is introduced with the `fortran-compiler` package. `ld` complains about this:

```console
ld: warning: duplicate -rpath '/Users/lucascolley/ghq/github.com/scipy/scipy/.pixi/envs/build-cpu/lib' ignored
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the two `pixi exec` commands from the issue and compare the `gfortran -###` linker arguments, focusing on the `${PREFIX}/lib` entries added by `fortran-compiler`. Trace the package metadata or compiler configuration that adds the extra path; done means the package no longer produces a duplicate `-rpath` warning while preserving the required runtime paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.