Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter RPATH relevant environment variables in snemo-shell #9

Open
1 of 7 tasks
drbenmorgan opened this issue Mar 20, 2019 · 0 comments
Open
1 of 7 tasks

Filter RPATH relevant environment variables in snemo-shell #9

drbenmorgan opened this issue Mar 20, 2019 · 0 comments

Comments

@drbenmorgan
Copy link
Member

  • ran a brew command and reproduced the problem with multiple formulae?
  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew config and brew doctor and included their output with your issue?
  • have a problem with brew install (or upgrade, reinstall) a single, supernemo-dbd-core formula?
  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
  • if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant