Weird float.h issues with macports clang
Mark E Anderson
mark at macports.org
Fri Aug 28 22:25:00 UTC 2026
This was on qt6-qtcreator.
The symbols were:
INFINITY, FLT_MAX, and DBL_MAX.
float.h seems to get included but clang seems to pick one or the other either INFINITY works or FLT_MAX, DBL_MAX works.
float.h might need to be patched. Seems like there is a compile time race to include one of the two files in float.h. I wasn't sure how to do that without breaking all sorts of stuff, so I did this work around for myself for now.
Not super urgent for me, since I'm on 27 just trying to get ahead of the problems about to hit. This might also be an issue on w/ our clang++ in mac 26 and higher as well with a high enough llvm being used, I'm giving it a try.
—Mark
Macports Wiki Page <https://trac.macports.org/wiki/mark> | GitHub <https://github.com/markemer> | Blog <https://emer.net>
On Fri, Aug 28, 2026, at 6:05 PM, Joshua Root wrote:
> On 29/8/2026 07:11, Mark E Anderson wrote:
> > Has anyone else seen this? Using our clang macports, you'll get missing
> > symbol errors sometimes from float.h. This super hacky thing got qt6-
> > qtcreator building for me, but I'm not sure if that's the real solution
> > or if I'm just missing something obvious.
> >
> > configure.cxxflags-append
> > -D__need_float_float \
> > -D__need_infinity_nan \
> > -include float.h
> Which symbols? Is the code in fact including float.h (or preferably
> cfloat since this appears to be C++)?
>
> - Josh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20260828/ab1a1a4e/attachment.htm>
More information about the macports-dev
mailing list