brew icon indicating copy to clipboard operation
brew copied to clipboard

linux/diagnostic: check `LD_LIBRARY_PATH` when `glibc` is installed.

Open carlocab opened this issue 3 years ago • 4 comments

  • [x] Have you followed the guidelines in our Contributing document?
  • [x] Have you checked to ensure there aren't other open Pull Requests for the same change?
  • [x] Have you added an explanation of what your changes do and why you'd like us to include them?
  • [ ] Have you written new tests for your changes? Here's an example.
  • [x] Have you successfully run brew style with your changes locally?
  • [x] Have you successfully run brew typecheck with your changes locally?
  • [ ] Have you successfully run brew tests with your changes locally?

Adding $HOMEBREW_PREFIX/lib to LD_LIBRARY_PATH breaks many things when glibc is installed, so let's make sure brew doctor complains about it.

Closes Homebrew/homebrew-core#109893.

carlocab avatar Sep 08 '22 06:09 carlocab

Review period will end on 2022-09-09 at 06:40:48 UTC.

BrewTestBot avatar Sep 08 '22 06:09 BrewTestBot

I'm not sure how to test this, since, when I do:

linuxbrew@15eb76ba36ac:~/.linuxbrew/Homebrew$ LD_LIBRARY_PATH=$(brew --prefix)/lib brew doctor
/bin/bash: relocation error: /home/linuxbrew/.linuxbrew/lib/libc.so.6: symbol _dl_audit_preinit, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference

carlocab avatar Sep 08 '22 06:09 carlocab

Review period ended.

BrewTestBot avatar Sep 08 '22 08:09 BrewTestBot

The original issue Homebrew/homebrew-core#109893 is resolved by #13873. Now we should check that etc/ld.so.conf and etc/ld.so.conf.d/*.conf do not point outside HOMEBREW_PREFIX.

  • https://github.com/Homebrew/brew/pull/13873
  • https://github.com/Homebrew/homebrew-core/pull/109998

XuehaiPan avatar Sep 19 '22 08:09 XuehaiPan

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar Oct 13 '22 00:10 github-actions[bot]