What you were trying to do (and why)
Use brew snemo-shell as a development environment for a package (Falaise) already installed through a Formula
What happened (include command output)
Command output
$ brew snemo-shell
snemo-shell> git clone https://github.com/SuperNEMO-DBD/Falaise.git
snemo-shell> mkdir build && cd build
snemo-shell> cmake ../Falaise.git
snemo-shell> make
...
snemo-shell> ldd BuildProducts/bin/flsimulate
snemo-shell> ldd BuildProducts/bin/flsimulate | grep Falaise
libFalaise.so.3 => /opt/supernemo/lib/libFalaise.so.3 (0x00007ff5100a4000)
What you expected to happen
The link should be to the local version of the library, not the brewed version.
Step-by-step reproduction instructions (by running brew commands)
$ brew snemo-shell
snemo-shell> brew install falaise
snemo-shell> git clone https://github.com/SuperNEMO-DBD/Falaise.git
snemo-shell> mkdir build && cd build
snemo-shell> cmake ../Falaise.git
snemo-shell> make
...
snemo-shell> ldd BuildProducts/bin/flsimulate
snemo-shell> ldd BuildProducts/bin/flsimulate | grep Falaise
libFalaise.so.3 => /opt/supernemo/lib/libFalaise.so.3 (0x00007ff5100a4000)
It's traced to a couple of issues. First, snemo-shell sets the following env vars which influence the rpath setting:
$ brew snemo-shell
snemo-shell> env | sort
...
LDFLAGS=-Wl,--dynamic-linker=/opt/supernemo/lib/ld.so -Wl,-rpath=/opt/supernemo/lib -L/opt/supernemo/lib
LD_RUN_PATH=/opt/supernemo/lib
LIBRARY_PATH=/opt/supernemo/lib
...
These should probably be unset for both runtime and development use cases, as already installed Formulae should have RPaths set correctly already. Unsetting those vars doesn't seem to affect the main applications.
There may also a separate issue with the GCC specs file generated by the gcc-7 formulae, but this will be reported separately after further tests.
Note that these issues only affect the case of developing a package that already exists in a brew install. Building anything not installed as a Formulae is fine.
brewcommand and reproduced the problem with multiple formulae?brew updateand can still reproduce the problem?brew doctor, fixed all issues and can still reproduce the problem?brew configandbrew doctorand included their output with your issue?brew install(orupgrade,reinstall) a single, supernemo-dbd-core formula?brew gist-logs <formula>(where<formula>is the name of the formula that failed) and included the output link?brew gist-logsdidn't work: ranbrew configandbrew doctorand included their output with your issue?What you were trying to do (and why)
Use
brew snemo-shellas a development environment for a package (Falaise) already installed through a FormulaWhat happened (include command output)
Command output
What you expected to happen
The link should be to the local version of the library, not the brewed version.
Step-by-step reproduction instructions (by running
brewcommands)It's traced to a couple of issues. First,
snemo-shellsets the following env vars which influence the rpath setting:These should probably be unset for both runtime and development use cases, as already installed Formulae should have RPaths set correctly already. Unsetting those vars doesn't seem to affect the main applications.
There may also a separate issue with the GCC specs file generated by the
gcc-7formulae, but this will be reported separately after further tests.Note that these issues only affect the case of developing a package that already exists in a brew install. Building anything not installed as a Formulae is fine.