Skip to content

Conversation

@alanc
Copy link
Contributor

@alanc alanc commented Mar 23, 2023

Makes it stop reporting that it found a static zlib on Solaris which does not ship a static library file for libz, and thus allows "test cases/rust/13 external c dependencies" to pass.

Fixes #10906

On Solaris 11.4.57, this changes the results of that rust test case from:

 [SUCCESS]   rust: 13 external c dependencies    (static=False method=cmake)
 [SUCCESS]   rust: 13 external c dependencies    (static=False method=pkg-config)
 [SUCCESS]   rust: 13 external c dependencies    (static=False method=system)
 [SUCCESS]   rust: 13 external c dependencies    (static=True method=cmake)
  [ERROR]    rust: 13 external c dependencies    (static=True method=system)
During: build
Reason: Compiling source code failed.

to

 [SUCCESS]   rust: 13 external c dependencies    (static=False method=cmake)
 [SUCCESS]   rust: 13 external c dependencies    (static=False method=pkg-config)
 [SUCCESS]   rust: 13 external c dependencies    (static=False method=system)
 [SUCCESS]   rust: 13 external c dependencies    (static=True method=cmake)
 [SKIPPED]   rust: 13 external c dependencies    (static=True method=system)
Reason: Could not find a static zlib

@eli-schwartz
Copy link
Member

@dcbaker Do you have any idea what is up with the rust link errors this PR is causing? I'm completely confused here.

@dcbaker
Copy link
Member

dcbaker commented Sep 22, 2023

I can't reproduce the failure locally, so I'm wondering if it's been fixed in the mean time (also the logs are gone). I've rebased this on main, so let's see how it looks now

@eli-schwartz
Copy link
Member

Unfortunately the error is still there, but now you can see it in the logs. :)

@dcbaker
Copy link
Member

dcbaker commented Sep 22, 2023

Oh boy, that's a legit bug that exists right now. We don't proper propogate the links out to the rust targets from external deps. You can replicate this by installing only a static zlib and using any dependency method.

@dcbaker
Copy link
Member

dcbaker commented Sep 22, 2023

Oh, and it gets better. Sigh

dcbaker and others added 2 commits September 21, 2023 20:48
Rustc expects to be provided both a search path `-L`, and a link arg `-l
kind=libname`, but we don't handle that correctly. Because we combine -L
and -l arguments from pkg-config the backend must rematerialize the -L
and -l split. We currently don't do this for static archives.
Makes it stop reporting that it found a static zlib on Solaris
which does not ship a static library file for libz, and thus allows
"test cases/rust/13 external c dependencies" to pass.

Fixes mesonbuild#10906
@dcbaker
Copy link
Member

dcbaker commented Sep 22, 2023

I've added a patch that will hopefully fix this (it fixes my system at least). I think both of these deserve a backport, but if someone things the zlib one doesn't we can merge that separately so it can be backported

@xclaesse xclaesse merged commit ded5bd7 into mesonbuild:master Sep 22, 2023
@xclaesse xclaesse modified the milestones: 1.3.0, 1.2.2 Sep 22, 2023
@eli-schwartz
Copy link
Member

I'm happy to backport them both, unless someone else objects.

@xclaesse
Copy link
Member

Hm, CI started to fail in master after this PR, any chance it's related? https://github.com/mesonbuild/meson/actions/runs/6276237334/job/17045465367

@eli-schwartz
Copy link
Member

I cannot see how it would be related, and it passed in this PR itself.

@xclaesse
Copy link
Member

yeah, seems completely unrelated to all our changes tbh.

@eli-schwartz
Copy link
Member

It is most likely because homebrew updated to LLVM 17, cf. @carlocab

Probably, meson has issues detecting LLVM 17 in all cases and we are simply seeing the errors on homebrew first.

@eli-schwartz
Copy link
Member

Ah, apparently it was fixed by adding 17 to the names of possible llvm-config programs. Yay!

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.

test cases/rust/13 external c dependencies fails on Solaris due to lack of static zlib

5 participants