Library environment broken (?) in formula test phase, in CI only #4738
Unanswered
lelegard
asked this question in
Writing Formulae/Casks
Replies: 1 comment
-
Thanks for the pull request. Please see review at Homebrew/homebrew-core#140370 (review). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Output of
brew config
Output of
brew doctor
Description of issue
Hi,
What are the specific characteristics of the running environment in the formula test phase during CI tests, following a pull request in homebrew-core?
Here is the situation I have. I fixed an existing formula for
libtomcrypt
. This is not a new version. This is a fix of an existing formula that I didn't author. In short,libtomcrypt
was unable to perform asymmetric cryptography in Homebrew because of a missing dependency onlibtommath
(and a few missing symbols in themake
command).I fixed it on my macOS13 arm64 system. I fixed the formula, reinstalled
--from-source
using the locally fixed formula. It works:brew test libtomcrypt
passes. It basically runs the test program which was build during the installation phase.So far, so good, I submitted a pull request for the fixed formula.
Here comes the problem: the test phase of the macOS11-arm64 fails in the CI (and tests on other platforms were cancelled). The same
brew test libtomcrypt
(which passes on my system) fails in the CI with this error:The library
libtommath.1.dylib
is not found. This library is provided bylibtommath
(note: "math", not "crypt"), the new dependency I added in the formula.Note that the build of
libtomcrypt
succeeded. Since the build useslibtommath
, the library was there at the time of the build.However, the very same library is no longer found in the test phase.
I am a bit surprised by the referenced path
@loader_path/../../../../../opt/libtommath/lib
. It this expected? This path is obviously the reason for the error.The same test command works on my system.
Additional information:
share/libtomcrypt/test
. This executable tests all supported cryptographic algorithms and can be run at any time after installation. Why? No idea.libtommath
library, the dependency I added. Before the fix, this dependency was not present, which explains why it worked.What should I update in the formula to make sure that the test application correctly runs in the CI?
Beta Was this translation helpful? Give feedback.
All reactions