Closed philippremy closed 5 months ago
Thank you for notifying. I try to answer below:
My experience of maintaining this codebase over 25y on a wide variety of OSes is that having too many options in the build system makes it very hard to maintain, even when the dependencies have a CMakeFile (which is not even the case for all dependencies!). It is especially true when you also have Windows in the supported OSes ! I prefer to have the same set of sourcefiles compiled on all systems, with some ifdefs to select which file is compiled in which OS, then the complexity is handled by one single construct.
Yes, I know ! But the good thing is that as time passed, a larger number of dependencies switched to git and to CMake, so I have added a larger number of them as submodules, which is cleaner.
This one is harder to cleanly integrate, it has a configure script, a zconf.h file, for some OSes it exists in the OS, for some other not (Windows), so it is still using a bundled preconfigured one, which is bad, I know !
From what I'm seeing, I think that adding #include <stddef.h>
at the beginning of gzguts.h
will fix the problem (if my diagnostic is correct). Would you try and tell me ?
Thanks for the detailed answer! I can understand your reasoning quite well and I would not consider it as "bad" as you described it above :D. Maintenance can be quite a pain...
I indeed tried to include stddef.h
within gzguts.h
, that did not fix it for me however :/.
There is one thing in my build log that makes me highly suspicious: Clang mixes it's own libc++ headers (from my LLVM 18 homebrew installation) with the Xcode-shipped macOS SDK libc++ headers. Apple's header files (from my observation) contain some additional stuff, which the LLVM ones don't have. Maybe that causes some hiccups during macro expansion... and that would also explain why your CI build with plain AppleClang and only the macOS SDK work just fine. I don't like that the headers are getting mixed in my build.
So I think that this might be just a problem of my build environment after all... I will investigate further and otherwise just use a custom fork :). However, I still like the idea to let the developer choose which zlib
should be linked, so maybe I can just go back when the option is available.
Feel free to close the issue, I think this is most likely a me-problem and does not have anything to do with the projects overall build system :D.
Hi, I'll try this week with MacOS 14 (I see gh has a runner for it).
Tested on the CI, it compiles with MacOS 14 Some non-regression tests fail though (nearest neighbor search), investigating... I'm closing this issue (and opening a new one regarding the failed tests).
Problem
The build of Geogram fails because the compilation of
lib/geogram/third_party/zlib
does not succeed.Environment
Configure log
Build log (error excerpt)
Expected behavior
Interestingly, when I use a plain
zlib
checkout from their repo, this compiles without issue on the same compiler with the same build environment. Why is the dependency not handled through a submodule (or why does the project not use macOS's systemzlib
or let the developer choose to link with an existingzlib
)?Last words
Thanks in advance ^^!