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

brew test curl fails on Tiger (old system Perl doesn’t have library module) #1145

Open
gsteemso opened this issue Apr 23, 2024 · 4 comments

Comments

@gsteemso
Copy link
Contributor

When you run brew test curl, it executes a Perl script. Unfortunately, that script pulls in a library module (Time::Piece) that only began shipping bundled with Perl starting in version 5.10.0. Tiger’s system Perl is version 5.8.6. Leopard is no better off, with its system Perl being version 5.8.8.

I'm not certain what a good fix for this would be. It would be fairly ridiculous to list a dependency on the Perl formula just to be able to run the test, but the Time::Piece module's functionality is complex enough that patching the script to not need it would be a non-trivial endeavour.

I'm open to suggestions.

@mistydemeo
Copy link
Owner

Hmm, does the test work if you have perl installed? It looks like it tries to add the Tigerbrew curl to the path; it should probably at least be erroring out if it's not installed. https://github.com/mistydemeo/tigerbrew/blob/master/Library/Formula/curl.rb#L86

@gsteemso
Copy link
Contributor Author

Perl had been brewed, but the library search path that Perl 5.8.6 listed upon failure did not include anything from it. I'm slightly puzzled that it didn't try to outright use the brewed Perl; I'll have to dig into what it was supposed to do when I get time later today.

@gsteemso
Copy link
Contributor Author

It adds the brewed curl to the system $PATH, but that has nothing that I can see to do with Perl's library search path, which is internal and separately defined.
Fundamentally, for the test to work as written on Tiger or Leopard, you need to (a) have brewed Perl, and (b) change the test to explicitly use it (because Perl is a keg-only brew).
The only other options are to either rewrite the test -- which appears to have come shipped with curl? -- or to pick a different test procedure altogether.

@gsteemso
Copy link
Contributor Author

Rewriting the test to explicitly call the brewed Perl works, and should be somewhat reliable as brewed Perl is a dependency of a dependency (openssl3, I believe).

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

2 participants