Do not expose AODToHepMC.h to ROOT#12248
Conversation
|
Fixes issue introduced in #12038. |
|
The problem is not that
but rather that Apple - in its infinite wisdom - has decided to change a BSD header ( Of course, a way to hack it is not let ROOT see Yours, |
|
Also, I am not convinced the problem is not root related. Compiling with: works fine on the same machine and there is no "vnode.h" included. I am afraid you have little chances to have the arrow header modified, since they will simply say that vnode.h is not included by kernel.h. Finally, there should not be any need to include |
This is needed to fix macOS builds. Apparently ROOT injects some arrow incompatible system headers in the chain.
|
Hi Guilio, Yes Apple can in some respect do what they want, but then again not really if they want to claim OpenSource and BSD. But as I said, fat chance getting them to change anything. Sure, it is ROOT that somewhere (probably very deep) pulls in The header We do have dictionaries for some Don't get me wrong, I think the hack you did is fine, but I do think my comment stands in the sense that it points to a deeper issue that may become a problem. Yours, |
I am not sure what OpenSource and BSD have to do with it. The header in question can be found at: https://opensource.apple.com/source/xnu/xnu-201.5/bsd/sys/vnode.h.auto.html which is both OpenSource and BSD licensed. If you mean they do not adhere to some standard, they only claim to comply to POSIX (i.e. "UNIX"), which does not mention
No, it does not. You can check for yourself with the c++ command I have above. It will dump the whole expanded sourcefile for that header, and you'll see that vnode.h is not even included (nor KERNEL is defined). |
Look at the URL you posted- it literally starts with
Again, the URL you posted says what BSD has to do with it:
Clearly, the header in question comes from the FreeBSD source code.
That condition starts on line 70 and ends on line 79. The problematic define isn't till line 135. It probably should have been protected given that it seems to be used only once and by an internal kernel call - makes you wonder what else the guys and gals at Apple have messed up.
BSD is not POSIX compliant. In their own words it is "mostly POSIX compliant". XNU is, by extension, not POSIX compliant either - heck, the acronym X is Not UNIX would suggest as much :-) Note, I didn't mention POSIX, since BSD is not POSIX compliant. All I said is that other BSDs does not seem to have made the same stupid mistake that Apple has, and therefore the test
That's a relatively bold statement from a single header. What I said was that some C++ header, perhaps I couldn't find any place in the ROOT source code where the header In any case, it seems that Be it as it may, we have a hack, and that's fine. Yours, |
|
The problem has been fixes in upstream Apache Arrow - so now we just need to sync our patched fork 😄 |
BSD != FreeBSD, BSD is just a license, and has nothing to do with the actual code you license with it. They are indeed FreeBSD based, and that does not bind them to any particular non-POSIX API, as per BSD license. Apple is POSIX compliant and certified as such. You do not need to have a UNIX / BSD derived kernel to be so. Even Windows 2000 was certified POSIX compliant, and it's clearly not a UNIX kernel. Setting aside that. I am glad that Arrow adapted their side of the code. That still does not explain how come the code only breaks when compiled with cling, but not when compiled standalone, so I still believe the issue is cling here. Anyway, does not matter, we will update as time permits. |
To quote Wikipedia:
so I guess a more accurate description of BSD would be to say that it is a family of operating systems. BSD licenses are, again quoting Wikipedia
so not a single particular license but a whole family of licenses. Thus, I think
is wrong. The BSD part of the MacOSX kernel (XNU) is based on FreeBSD licensed under the so-called 2 clause BSD license, which is considered OpenSource. For the header in question I do not believe BSD is POSIX compliant, nor that POSIX has anything to say about the header
I know. POSIX is a specification of interface - broadly understood, not implementation so much.
According to Wikipedia, Windows NT could be made mostly POSIX compliant by a dedicated subsystem, but it doesn't look like it was certified. I believe Windows NT (or WNT <- VMS, like HAL -> IBM) was largely based on VMS. Heck, it seems even DOS could have some claim to POSIX 😄 Of course, as Richard Stallmann likes to point out, an operating system is more than a kernel.
yes, good to see that there are projects that will fix things, even if it wasn't technically their problem. Yours, Christian |
Do not expose AODToHepMC.h to ROOT
This is needed to fix macOS builds. Apparently ROOT injects
some arrow incompatible system headers in the chain.