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

Show the plaform triplet in each warning and error from the auditor #1309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JamesWrigley
Copy link
Contributor

@JamesWrigley JamesWrigley commented Dec 24, 2023

This makes it a bit easier to nail down which platforms are producing the warnings. Also fixed a wee bug I found when running the tests in dd77a37. I wasn't able to run all the tests locally on my machine, I got a Cross-device link (os error 18) when the tests were building a rust package, and I think the wizard tests were hanging.

Old before/after (removed commit from PR)

Before:

┌ Warning: Linked library /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos could not be resolved and could not be auto-mapped
└ @ BinaryBuilder.Auditor ~/.julia/packages/BinaryBuilder/0CUml/src/Auditor.jl:383
┌ Warning: Linked library /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos could not be resolved and could not be auto-mapped
└ @ BinaryBuilder.Auditor ~/.julia/packages/BinaryBuilder/0CUml/src/Auditor.jl:383
┌ Warning: Linked library libcom_err.so.5 could not be resolved and could not be auto-mapped
└ @ BinaryBuilder.Auditor ~/.julia/packages/BinaryBuilder/0CUml/src/Auditor.jl:383
┌ Warning: Linked library libhx509.so.11 could not be resolved and could not be auto-mapped
└ @ BinaryBuilder.Auditor ~/.julia/packages/BinaryBuilder/0CUml/src/Auditor.jl:383
┌ Warning: Linked library libasn1.so.11 could not be resolved and could not be auto-mapped
└ @ BinaryBuilder.Auditor ~/.julia/packages/BinaryBuilder/0CUml/src/Auditor.jl:383
┌ Warning: Linked library libgssapi.so.10 could not be resolved and could not be auto-mapped
└ @ BinaryBuilder.Auditor ~/.julia/packages/BinaryBuilder/0CUml/src/Auditor.jl:383
┌ Warning: Linked library libkrb5.so.11 could not be resolved and could not be auto-mapped
└ @ BinaryBuilder.Auditor ~/.julia/packages/BinaryBuilder/0CUml/src/Auditor.jl:383
┌ Warning: Linked library libheimntlm.so.11 could not be resolved and could not be auto-mapped
└ @ BinaryBuilder.Auditor ~/.julia/packages/BinaryBuilder/0CUml/src/Auditor.jl:383
┌ Warning: Linked library libwind.so.11 could not be resolved and could not be auto-mapped
└ @ BinaryBuilder.Auditor ~/.julia/packages/BinaryBuilder/0CUml/src/Auditor.jl:383
┌ Warning: Minimum instruction set detected for bin/libssh.dll is avx2, not x86_64 as desired.
└ @ BinaryBuilder.Auditor ~/.julia/packages/BinaryBuilder/0CUml/src/Auditor.jl:311

After:

┌ Warning: Linked library /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos could not be resolved and could not be auto-mapped
│   platform = "aarch64-apple-darwin"
└ @ BinaryBuilder.Auditor ~/.julia/dev/BinaryBuilder/src/Auditor.jl:395
┌ Warning: Linked library /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos could not be resolved and could not be auto-mapped
│   platform = "x86_64-apple-darwin"
└ @ BinaryBuilder.Auditor ~/.julia/dev/BinaryBuilder/src/Auditor.jl:395
┌ Warning: Linked library libcom_err.so.5 could not be resolved and could not be auto-mapped
│   platform = "x86_64-unknown-freebsd"
└ @ BinaryBuilder.Auditor ~/.julia/dev/BinaryBuilder/src/Auditor.jl:395
┌ Warning: Linked library libhx509.so.11 could not be resolved and could not be auto-mapped
│   platform = "x86_64-unknown-freebsd"
└ @ BinaryBuilder.Auditor ~/.julia/dev/BinaryBuilder/src/Auditor.jl:395
┌ Warning: Linked library libasn1.so.11 could not be resolved and could not be auto-mapped
│   platform = "x86_64-unknown-freebsd"
└ @ BinaryBuilder.Auditor ~/.julia/dev/BinaryBuilder/src/Auditor.jl:395
┌ Warning: Linked library libgssapi.so.10 could not be resolved and could not be auto-mapped
│   platform = "x86_64-unknown-freebsd"
└ @ BinaryBuilder.Auditor ~/.julia/dev/BinaryBuilder/src/Auditor.jl:395
┌ Warning: Linked library libkrb5.so.11 could not be resolved and could not be auto-mapped
│   platform = "x86_64-unknown-freebsd"
└ @ BinaryBuilder.Auditor ~/.julia/dev/BinaryBuilder/src/Auditor.jl:395
┌ Warning: Linked library libheimntlm.so.11 could not be resolved and could not be auto-mapped
│   platform = "x86_64-unknown-freebsd"
└ @ BinaryBuilder.Auditor ~/.julia/dev/BinaryBuilder/src/Auditor.jl:395
┌ Warning: Linked library libwind.so.11 could not be resolved and could not be auto-mapped
│   platform = "x86_64-unknown-freebsd"
└ @ BinaryBuilder.Auditor ~/.julia/dev/BinaryBuilder/src/Auditor.jl:395
┌ Warning: Minimum instruction set detected for bin/libssh.dll is avx2, not x86_64 as desired.
│   platform = "x86_64-w64-mingw32"
└ @ BinaryBuilder.Auditor ~/.julia/dev/BinaryBuilder/src/Auditor.jl:323

src/Auditor.jl Outdated
@@ -84,7 +84,7 @@ function audit(prefix::Prefix, src_name::AbstractString = "";
readmeta(f) do oh
if !is_for_platform(oh, platform)
if verbose
@warn("Skipping binary analysis of $(relpath(f, prefix.path)) (incorrect platform)")
@warn("Skipping binary analysis of $(relpath(f, prefix.path)) (incorrect platform)", platform=triplet(platform))
Copy link
Member

@giordano giordano Dec 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this solution, it would make the auditor overly verbose in verbose mode (which is what I use most, and what's used in CI in Yggdrasil) where the platform is already printed.

Copy link
Contributor Author

@JamesWrigley JamesWrigley Jan 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll remove it then. Personally I prefer it because it's easy to miss warnings in verbose mode, and even then you have to look for the platform in some other message.

The creation of `libpath_list` assumed that there would only be one directory in
`LD_LIBRARY_PATH` (or the equivalents on other platforms), if there were more
then creating the list would fail because Julia would try to `hcat()` all the
elements together and throw an error about them having different
lengths.

Somewhat scarily, this would've silently done the wrong thing if `libpath_list`
was a column vector instead of a row vector O_o (i.e. if it originally had a
comma between the elements)
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

Successfully merging this pull request may close these issues.

2 participants