Add hse to wrapdb#179
Conversation
34132eb to
16a5ef0
Compare
|
This is the same problem as in the xtensor PR. Meson in git master no longer reports that (fatal) warning on Debian. Windows would still be broken, but there is discussion on fixing it so that may be fixable by adding an option |
|
Good to know that I haven't done anything wrong! |
|
Maybe in the meantime we can add in ci_config.json a new field to skip --meson-fatal-warnings? |
|
@xclaesse do you mean to special case hse in there? Or does something have to be done to the ci_config.json format? |
|
I mean you could add in "hse": {
"ignore-meson-warning": true
}And in sanity_checks.py you can check that field and skip the --fatal-meson-warnings arg. |
|
@eli-schwartz if you think that is a good idea, I can go ahead and create a PR for that. |
|
TBH I'm not too fond of the idea, because it fundamentally amounts to "meson is broken here, let's add an option to just ignore that" and the solution really is just to wait for meson 0.60 -- which is going into rc1 on Sunday. |
|
I have a feeling that the CI for HSE will fail after 0.60.0 because we explicitly set |
|
Should be fixed if you rebase on master I believe |
|
This failure makes no sense to me: https://github.com/mesonbuild/wrapdb/pull/179/checks?check_run_id=3884806754#step:5:116. Where did it grab lz4 1.9.3 from? I specifically have 1.9.2 in my packagefile directory. For right now, I don't use the lz4 in the wrapdb. |
|
@tristan957 lz4 1.9.3 is in wrapdb, it is a nice (but maybe not obvious) property of how wrapdb works, wraps fallbacks to other wraps. |
|
Right, but I don't use the WrapDB variant because it doesn't support 1.9.2. |
|
Wraps from within a subproject cannot be promoted to override a wrap that is in the superproject. What is wrong with 1.9.3 ? |
Wraps from wrapdb takes priority over wraps from hse, because in this CI wrapdb is the main project and hse is a subproject. Any reason you cannot make it work with lz4 from wrapdb? |
|
Well we use a specific define to inline lz4 that isn't exposed in the WrapDB wrap and I can't pass c_args through to a subproject. Not to mention that my project isn't even tested against 1.9.3. |
|
How does this define work in conjunction with system built lz4 as a shared library? How do you intend it to operate when a project embeds both hse and lz4 and their own copy of lz4 wins? Why does it need to be inlined anyway, just for performance micro-optimizations? |
|
That being said, I realize now I should obviously have reviewed the upstream meson.build, mea culpa. I'm declaring a review of the upstream files to be a merge blocker, BTW. |
|
It is a compile-time define used by lz4 itself. We support compiling against system installed lz4, but performance will suffer. Our lz4 symbols are hidden so there shouldn't be any conflict there if I understand symbol visibility correctly. For instance, we already have this problem with lz4 and xxhash where lz4 includes a copy of xxhash. No symbol collision to speak of. |
|
upstream meaning HSE or lz4? |
|
@tristan957 |
That causes lz4 to go through the PLT:
no |
|
From a quick look, you should do both. |
|
After doing both, I get 0 PLT calls whereas previously I had one. Not bad. Will update HSE accordingly. |
|
@xclaesse why did that PR use cc.has_argument? :o |
|
Also shouldn't there be an upstream option to inline the code rather than having downstreams fork the build? |
-fvisibility is a GNU thing, with msvc you need dllexport.
I don't think it should be optional, it is just a way to flag which symbols are public API and which is internal. |
|
FWIW lz4 seems to fail to link if you add the visibility define to a shared library. I added some protection for my downstream wrap in that case. |
|
I know it's a GNU thing, that's why the kwarg you mentioned here begins with |
|
@tristan957 right, because shared libraries exist to expose visible symbols but if you go ahead and hide them because you want them to be inline... |
|
It was more a comment for @xclaesse upstream PR. I don't think he is protecting against it. Should've made the comment there. |
|
I added a little bit of a hack to our lz4 wrap, so that it exports the same variable names as the upstream wrap, so I think it could work, but we will have to wait till a 2.0.1 release which should happen pretty soon. |
This will fail if git is installed, and the superproject is a git repo but the subproject is not. In the wrapdb test, you end up with: (because the commit you want to merge into the wrapdb is commit 6913386) As a general rule of thumb it looks like all of your subproject fallbacks do not use minor nitsYou use Use of find_program('scripts/....') does not need to use join_paths or the exe_install_rpath is broken unless bindir is a direct subdirectory of prefix.
Seems like you really want to join this: For the record, since you pass every one of these as arguments to This if/else could be simplified if one of the deps there was a disabler. This ties back into my earlier comment about using feature options. |
|
It seems that lz4 is the only one using a forked meson.build which deviates from upstream. |
|
Cool. I submitted a PR to HSE, so hopefully I can get the approvals I need and it should be updated for 2.0.1. Got our build to respect |
A Meson contributor took the time to review HSE's Meson usage, and various comments were addressed in this commit. mesonbuild/wrapdb#179 (comment)
|
PR will be put on hold until our 2.1.0 release later this year. |
|
It would be great if at some point the lz4 upstream build system could be improved in time to be incorporated in that release. ;) |
|
Once this PR is merged and released on wrapdb (lz4/lz4#1064), I am happy to drop my custom lz4 in favor of the wrapdb build. Then that should unblock this PR maybe, but won't be mergeable until HSE 3.0 which should be some time this year. |
|
Update for myself. lz4 PR was merged, HdrHistogram_c PRs were merged (yay) and released. At this point HSE is waiting only on an lz4 release, which is taking a while... Some of the upstream HSE build has changed since this PR was originally created. We are currently working on 3.0, so I will update the PR when that release comes out assuming that lz4 gets a new release. |
|
This should be rebased against master. lz4 problem can be avoided for Ubuntu and macOS CI by supplying debian_ and brew_packages. |
|
@neheb HSE needs access to a v1.9.4 of lz4 which doesn't exist since the Meson build that I updated for it hasn't be included in any release. Oh I think I see what you are saying. You would also need to change |
HSE aims to be parallel-installable with itself, but a project should only use one version. HSE provides the following: