Skip to content

Build error with clang+mingw #45

@Gei0r

Description

@Gei0r

When building rapidyaml (which uses fast_float) with clang+mingw on windows, I get the following error message:

FAILED: CMakeFiles/ryml.dir/src/c4/yml/tree.cpp.obj
D:\User\Adrian\Programmierung\3rdParty\rapidyaml\Clang-Windows\bin\clang++.exe  -I../src -I../ext/c4core/src -O3 -DNDEBUG -std=c++11 -MD -MT CMakeFiles/ryml.dir/src/c4/yml/tree.cpp.obj -MF CMakeFiles\ryml.dir\src\c4\yml\tree.cpp.obj.d -o CMakeFiles/ryml.dir/src/c4/yml/tree.cpp.obj -c ../src/c4/yml/tree.cpp
In file included from ../src/c4/yml/tree.cpp:1:
In file included from ../src\c4/yml/tree.hpp:10:
In file included from ../ext/c4core/src\c4/charconv.hpp:50:
In file included from ../ext/c4core/src\c4/ext/fast_float.hpp:14:
In file included from ../ext/c4core/src\c4/ext/./fast_float/include/fast_float/fast_float.h:44:
In file included from ../ext/c4core/src\c4/ext/./fast_float/include/fast_float/parse_number.h:3:
In file included from ../ext/c4core/src\c4/ext/./fast_float/include/fast_float/ascii_number.h:9:
../ext/c4core/src\c4/ext/./fast_float/include/fast_float/float_common.h:168:16: error: use of undeclared identifier '_umul128'
  answer.low = _umul128(a, b, &answer.high); // _umul128 not available on ARM64
               ^

_umul128() is declared in intrin.h, but it is not included in fast_float/float_common.h due to the following lines:

#if ((defined(_WIN32) || defined(_WIN64)) && !defined(__clang__))
#include <intrin.h>
#endif

So I think the condition should be changed, perhaps to #ifdef __MINGW32__?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions