-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
perl: depend on libxcrypt #108663
perl: depend on libxcrypt #108663
Conversation
It also looks like |
Formula/perl.rb
Outdated
on_linux do | ||
depends_on "libnsl" | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no linkage with libnsl
, so this dependency doesn't seem to do anything. The previous run without this also did not register linkage with any libnsl
, as far as I can tell.
If linkage with a system libnsl
is not desired, then brew linkage
needs to be adjusted to make sure it errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh weird, I guess it depends on the system then. On the OS I was testing this on it tried to find libnsl
but I guess it doesn't do so depending on the host.
I think we actually need to adjust brew linkage
to reject both libnsl.so.1
and libcrypt.so.1
as those are both still in the allowlist right now.
I guess better question now is, how do we stop perl
from trying to link to libnsl
if we don't want to add it as a dependency? It may be the case that this only happens when building from source on older systems but I'm not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am okay with dropping libnsl
for now so we can merge the libxcrypt
dependency as that is more critical. Does that sound okay?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess better question now is, how do we stop
perl
from trying to link tolibnsl
if we don't want to add it as a dependency?
It might be a configure argument. If there isn't, I'd leave it alone. It's not really that important to stop opportunistic linkage, especially if it doesn't result in a build failure of some kind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it does result in a build failure which was why I wanted to fix this. Sorry I should have said that earlier!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regrettably the Configure
script hardcodes the list of libraries it searches for and there doesn't seem to be a way to change this, so I just removed it from the list with inreplace
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nvm, I dug up some old stuff from Linuxbrew on how to override libswanted
. The syntax is a little wacky but it does the job and avoids any use of inreplace
.
c70007f
to
4de3db9
Compare
32e01d1
to
24d93ae
Compare
This is the list of failures: Cellar reference to perl interpreter:
Cellar reference to
|
8a08ae7
to
ce62508
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I don't understand here:
Why do all these formulae need revision
bumps for perl
to depend on libxcrypt
?
Does the ABI of libperl.so
change as a consequence of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. These link with perl
through a Cellar
path. But that seems to have been fixed by your perl
changes.
@@ -3,6 +3,7 @@ class V < Formula | |||
homepage "https://github.com/rupa/v" | |||
url "https://github.com/rupa/v/archive/v1.1.tar.gz" | |||
sha256 "6483ef1248dcbc6f360b0cdeb9f9c11879815bd18b0c4f053a18ddd56a69b81f" | |||
revision 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This formula is just a script and a manpage, so the rev bump seems like it was a mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I think confusion was that it failed during test because vim
was broken. Had I run a test where vim
was revision bumped but v
was not, it would have succeeded. We'll be able to skip revision bumping this when we upgrade to Perl 5.36.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that's why we rev bump linkage failures before touching any test failures.
That's what I'm hoping we achieved here, although the only way to find for sure is to do a test revision bump and make sure nothing breaks. I might try that quickly since it doesn't need a long timeout label, and would tell us if we missed anything here. |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?