Open yaroslav-kuzmin opened 2 weeks ago
@llvm/issue-subscribers-libc
Author: Kuzmin Yaroslav (yaroslav-kuzmin)
Could you please try 18 or main
branch?
build 18
[1700/5004] Building CXX object projects/libc/src/stdio/CMakeFiles/libc.src.stdio.sprintf.dir/sprintf.cpp.o
FAILED: projects/libc/src/stdio/CMakeFiles/libc.src.stdio.sprintf.dir/sprintf.cpp.o
/usr/bin/g++ -DLIBC_NAMESPACE=llvm_libc_18_18 -I/home/kuzmin_y/src/llvm-project/build_llvm/projects/libc/src/stdio -I/home/kuzmin_y/src/llvm-project/libc/src/stdio -I/home/kuzmin_y/src/llvm-project/libc -isystem /home/kuzmin_y/src/llvm-project/build_llvm/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fpie -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLIC_PACKAGING -DLIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE -MD -MT projects/libc/src/stdio/CMakeFiles/libc.src.stdio.sprintf.dir/sprintf.cpp.o -MF projects/libc/src/stdio/CMakeFiles/libc.src.stdio.sprintf.dir/sprintf.cpp.o.d -o projects/libc/src/stdio/CMakeFiles/libc.src.stdio.sprintf.dir/sprintf.cpp.o -c /home/kuzmin_y/src/llvm-project/libc/src/stdio/sprintf.cpp
In file included from /home/kuzmin_y/src/llvm-project/libc/src/string/memory_utils/inline_memcpy.h:14,
from /home/kuzmin_y/src/llvm-project/libc/src/stdio/printf_core/writer.h:15,
from /home/kuzmin_y/src/llvm-project/libc/src/stdio/printf_core/printf_main.h:13,
from /home/kuzmin_y/src/llvm-project/libc/src/stdio/sprintf.cpp:13:
/home/kuzmin_y/src/llvm-project/libc/src/string/memory_utils/utils.h: In function ‘void __llvm_libc_18_18::memcpy_inline(void, const void)’:
/home/kuzmin_y/src/llvm-project/libc/src/string/memory_utils/utils.h:95:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
95 | #pragma GCC diagnostic ignored "-Wstringop-overread"
| ^~~~~
In file included from /home/kuzmin_y/src/llvm-project/libc/src/string/memory_utils/op_x86.h:21,
from /home/kuzmin_y/src/llvm-project/libc/src/string/memory_utils/x86_64/inline_memcpy.h:15,
from /home/kuzmin_y/src/llvm-project/libc/src/string/memory_utils/inline_memcpy.h:22,
from /home/kuzmin_y/src/llvm-project/libc/src/stdio/printf_core/writer.h:15,
from /home/kuzmin_y/src/llvm-project/libc/src/stdio/printf_core/printf_main.h:13,
from /home/kuzmin_y/src/llvm-project/libc/src/stdio/sprintf.cpp:13:
/home/kuzmin_y/src/llvm-project/libc/src/string/memory_utils/op_generic.h: In instantiation of ‘T llvm_libc_18_18::generic::splat(uint8_t) [with T = short unsigned int; uint8_t = unsigned char]’:
/home/kuzmin_y/src/llvm-project/libc/src/string/memory_utils/op_generic.h:139:29: required from ‘static void llvm_libc_18_18::generic::Memset~~~~^~~~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
Can you add -DLIBC_WNO_ERROR=ON
to see if it works?
Build main branch
[1924/5322] Building CXX object projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextdownl.dir/nextdownl.cpp.o FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextdownl.dir/nextdownl.cpp.o /usr/bin/g++ -DLIBC_NAMESPACE=llvm_libc_19_0_0_git -I/home/kuzmin_y/src/llvm-project/build_main/projects/libc/src/math/generic -I/home/kuzmin_y/src/llvm-project/libc/src/ma th/generic -I/home/kuzmin_y/src/llvm-project/libc -isystem /home/kuzmin_y/src/llvm-project/build_main/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inl ines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-overri de -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -mavx2 -mfma -fpie -fno-builtin -fno-exceptions -f no-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -O3 -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.gen eric.nextdownl.dir/nextdownl.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextdownl.dir/nextdownl.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextdownl.dir/nextdownl.cpp.o -c /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_function.h:13, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/decay.h:16, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:18, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/__support/CPP/type_traits/is_reference.h:19:18: error: missing binary operator before token "(" 19 | #if __has_builtin(__is_reference) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/decay.h:16, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:18, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/__support/CPP/type_traits/is_function.h:19:18: error: missing binary operator before token "(" 19 | #if __has_builtin(__is_function) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_base_of.h:14, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/invoke.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:22, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/remove_all_extents.h:18:18: error: missing binary operator before token "(" 18 | #if __has_builtin(__remove_all_extents) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/utility/forward.h:11, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/invoke.h:18, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:22, from /home/kuzmin_y/src/llvm-project/libc/src/__support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_lvalue_reference.h:19:18: error: missing binary operator before token "(" 19 | #if __has_builtin(__is_lvalue_reference) | ^ | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:31, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_destructible.h:23:18: error: missing binary operator before token "(" 23 | #if __has_builtin(__is_destructible) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:43, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_rvalue_reference.h:19:18: error: missing binary operator before token "(" 19 | #if __has_builtin(__is_rvalue_reference) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:49, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_trivially_destructible.h:18:18: error: missing binary operator before token "(" 18 | #if __has_builtin(__is_trivially_destructible) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/libc_assert.h:25, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/FPBits.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/integer_to_string.h:161:58: error: conversion from ‘long unsigned int’ to ‘unsigned char’ may change value [-Werror=convers ion] 161 | template |
^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/FEnvImpl.h:30, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/NearestIntegerOperations.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:13, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h: In function ‘uint16_t llvm_libc_19_0_0_git::fputil::internal::get_status_value_for_except(int)’ |
---|
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:81:71: error: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-We
rror=conversion]
75 | return ((excepts & FE_INVALID) ? ExceptionFlags::INVALID_F : 0) |
| ~~~~~~~~~~~~~~
76 | #ifdef FE_DENORM
| ~~~~~~
77 | ((excepts & FE_DENORM) ? ExceptionFlags::DENORMAL_F : 0) |
| ~~~~~~~~~~~~
78 | #endif // FE_DENORM
| ~~~~~
79 | ((excepts & FE_DIVBYZERO) ? ExceptionFlags::DIV_BY_ZERO_F : 0) |
| ~~~~~~~~~~~~~~~~
80 | ((excepts & FE_OVERFLOW) ? ExceptionFlags::OVERFLOW_F : 0) |
| ~~~~~~~~~~~~
81 | ((excepts & FE_UNDERFLOW) ? ExceptionFlags::UNDERFLOW_F : 0) |
| ~~~~~~~~~~~~~^
82 | ((excepts & FE_INEXACT) ? ExceptionFlags::INEXACT_F : 0);
| ~~~~~~~~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h: In function ‘int __llvm_libc_19_0_0_git::fputil::enable_except(int)’:
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:161:10: error: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-W
error=conversion]
161 | x87_cw &= ~bit_mask;
| ~^~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h: In function ‘int __llvm_libc_19_0_0_git::fputil::clear_except(int)’:
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:208:76: error: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-W
error=conversion]
208 | static_cast~~~~~^~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:600:29: error: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-W
error=conversion]
600 | x87_status.control_word &= ~(uint16_t(0x3) << 10); // Round to nearest.
| ~~~~~~^~~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:623:26: error: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-W
error=conversion]
623 | x87_status.status_word &= ~uint16_t(0x3F);
| ~~~~~^~~~
In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/libc_assert.h:25,
from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/FPBits.h:15,
from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12,
from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10:
/home/kuzmin_y/src/llvm-project/libc/src/support/integer_to_string.h: In instantiation of ‘static char llvm_libc_19_0_0_git::IntegerToString<T, Fmt>::IntegerWriter::digit
_char(uint8_t) [with T = unsigned int; Fmt = llvm_libc_19_0_0_git::details::Fmt<10>; uint8_t = unsigned char]’:
/home/kuzmin_y/src/llvm-project/libc/src/support/integer_to_string.h:226:29: required from ‘static void llvm_libc_19_0_0_git::IntegerToString<T, Fmt>::IntegerWriter::wr
ite_unsigned_number(llvm_libc_19_0_0_git::IntegerToString<T, Fmt>::IntegerWriter::UNSIGNED_T, llvm_libc_19_0_0_git::details::BackwardStringBufferWriter&) [with T = unsign
ed int; Fmt = __llvm_libc_19_0_0_git::details::Fmt<10>; llvm_libc_19_0_0_git::IntegerToString<T, Fmt>::IntegerWriter::UNSIGNED_T = unsigned int; llvm_libc_19_0_0_git::det
ails::BackwardStringBufferWriter = llvm_libc_19_0_0_git::details::StringBufferWriterImpl~~^~~~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/~~~~~~^~~~~~~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
Can you add -DLIBC_WNO_ERROR=ON to see if it works?
when configuring version 17
CMake Warning: Manually-specified variables were not used by the project: LIBC_WNO_ERROR
But build 18
[1921/5021] Building CXX object projects/libc/src/fenv/CMakeFiles/libc.src.fenv.feraiseexcept.dir/feraiseexcept.cpp.o
FAILED: projects/libc/src/fenv/CMakeFiles/libc.src.fenv.feraiseexcept.dir/feraiseexcept.cpp.o
/usr/bin/g++ -DLIBC_NAMESPACE=llvm_libc_18_18 -I/home/kuzmin_y/src/llvm-project/build_18/projects/libc/src/fenv -I/home/kuzmin_y/src/llvm-project/libc/src/fenv -I/home/ku
zmin_y/src/llvm-project/libc -isystem /home/kuzmin_y/src/llvm-project/build_18/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=dat
e-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-
uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-mi
sleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -fpie -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwin
d-tables -fno-asynchronous-unwind-tables -fno-rtti -Wall -Wextra -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -O2 -DLIBC_COPTPUBLIC
PACKAGING -MD -MT projects/libc/src/fenv/CMakeFiles/libc.src.fenv.feraiseexcept.dir/feraiseexcept.cpp.o -MF projects/libc/src/fenv/CMakeFiles/libc.src.fenv.feraiseexcept.dir/
feraiseexcept.cpp.o.d -o projects/libc/src/fenv/CMakeFiles/libc.src.fenv.feraiseexcept.dir/feraiseexcept.cpp.o -c /home/kuzmin_y/src/llvm-project/libc/src/fenv/feraiseexcept.
cpp
In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/FEnvImpl.h:31,
from /home/kuzmin_y/src/llvm-project/libc/src/fenv/feraiseexcept.cpp:10:
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h: In function ‘int __llvm_libc_18_18::fputil::enable_except(int)’:
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:161:10: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [
-Wconversion]
161 | x87_cw &= ~bit_mask;
| ~^~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h: In function ‘int __llvm_libc_18_18::fputil::clear_except(int)’:
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:208:76: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [
-Wconversion]
208 | static_cast~~~~~^~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:600:29: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [
-Wconversion]
600 | x87_status.control_word &= ~(uint16_t(0x3) << 10); // Round to nearest.
| ~~~~~~^~~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:623:26: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [
-Wconversion]
623 | x87_status.status_word &= ~uint16_t(0x3F);
| ~~~~~^~~~
In file included from /home/kuzmin_y/src/llvm-project/libc/src/fenv/feraiseexcept.cpp:11:
/home/kuzmin_y/src/llvm-project/libc/src/fenv/feraiseexcept.cpp: At global scope:
/home/kuzmin_y/src/llvm-project/libc/src/fenv/feraiseexcept.cpp:15:25: error: ‘int llvm_libc_18_18::feraiseexcept(int)’ aliased to external symbol ‘feraiseexcept’
15 | LLVM_LIBC_FUNCTION(int, feraiseexcept, (int e)) {
| ^~~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/common.h:28:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’
28 | decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]]; \
| ^~~~
/home/kuzmin_y/src/llvm-project/libc/src/fenv/feraiseexcept.cpp:15:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’
15 | LLVM_LIBC_FUNCTION(int, feraiseexcept, (int e)) {
| ^~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/fenv/feraiseexcept.cpp:15:25: warning: ‘int llvm_libc_18_18::feraiseexcept(int)’ specifies less restrictive attributes than its t
arget ‘int feraiseexcept(int)’: ‘leaf’, ‘nothrow’ [-Wmissing-attributes]
15 | LLVM_LIBC_FUNCTION(int, feraiseexcept, (int e)) {
| ^~~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/common.h:28:34: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’
28 | decltype(LIBC_NAMESPACE::name) name [[gnu::alias(#name)]]; \
| ^~~~
/home/kuzmin_y/src/llvm-project/libc/src/fenv/feraiseexcept.cpp:15:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’
15 | LLVM_LIBC_FUNCTION(int, feraiseexcept, (int e)) {
| ^~~~~~
In file included from /usr/include/features.h:461,
from /usr/include/errno.h:25,
from /home/kuzmin_y/src/llvm-project/libc/src/errno/libc_errno.h:15,
from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/FEnvImpl.h:15,
from /home/kuzmin_y/src/llvm-project/libc/src/fenv/feraiseexcept.cpp:10:
/usr/include/x86_64-linux-gnu/bits/fenv.h:157:1: note: ‘int llvm_libc_18_18::feraiseexcept(int)’ target declared here
157 | NTH (feraiseexcept (int __excepts))
| ^~~~~
ninja: build stopped: subcommand failed.
Build 19
FAILED: projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextdownl.dir/nextdownl.cpp.o /usr/bin/g++ -DLIBC_NAMESPACE=llvm_libc_19_0_0_git -I/home/kuzmin_y/src/llvm-project/build_19/projects/libc/src/math/generic -I/home/kuzmin_y/src/llvm-project/libc/src/math /generic -I/home/kuzmin_y/src/llvm-project/libc -isystem /home/kuzmin_y/src/llvm-project/build_19/projects/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplici t-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override - Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -mavx2 -mfma -fpie -fno-builtin -fno-exceptions -fno-l ax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wall -Wextra -Wconversion -Wno-sign-c onversion -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -O3 -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextdownl.dir/nextdownl.cpp.o -MF projects/libc/src/math/generic/CMakeFiles/libc.src.math.generic.nextdownl.dir/nextdownl.cpp.o.d -o projects/libc/src/math/generic/CMakeFiles/libc.s rc.math.generic.nextdownl.dir/nextdownl.cpp.o -c /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_function.h:13, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/decay.h:16, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:18, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/__support/CPP/type_traits/is_reference.h:19:18: error: missing binary operator before token "(" 19 | #if __has_builtin(__is_reference) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/decay.h:16, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:18, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/__support/CPP/type_traits/is_function.h:19:18: error: missing binary operator before token "(" 19 | #if __has_builtin(__is_function) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_base_of.h:14, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/invoke.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:22, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/remove_all_extents.h:18:18: error: missing binary operator before token "(" 18 | #if __has_builtin(__remove_all_extents) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/utility/forward.h:11, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/invoke.h:18, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:22, from /home/kuzmin_y/src/llvm-project/libc/src/__support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_lvalue_reference.h:19:18: error: missing binary operator before token "(" 19 | #if has_builtin(__is_lvalue_reference) In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:31, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/__support/CPP/type_traits/is_destructible.h:23:18: error: missing binary operator before token "(" 23 | #if __has_builtin(__is_destructible) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:43, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_rvalue_reference.h:19:18: error: missing binary operator before token "(" 19 | #if __has_builtin(__is_rvalue_reference) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits.h:49, from /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/bit.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/FPBits.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/CPP/type_traits/is_trivially_destructible.h:18:18: error: missing binary operator before token "(" 18 | #if __has_builtin(__is_trivially_destructible) | ^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/libc_assert.h:25, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/FPBits.h:15, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/integer_to_string.h:161:58: warning: conversion from ‘long unsigned int’ to ‘unsigned char’ may change value [-Wconversion] 161 | template |
^ In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/FEnvImpl.h:30, from /home/kuzmin_y/src/llvm-project/libc/src/__support/FPUtil/NearestIntegerOperations.h:12, from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:13, from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10: /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h: In function ‘uint16_t llvm_libc_19_0_0_git::fputil::internal::get_status_value_for_except(int)’ |
---|
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:81:71: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-
Wconversion]
75 | return ((excepts & FE_INVALID) ? ExceptionFlags::INVALID_F : 0) |
| ~~~~~~~~~~~~~~
76 | #ifdef FE_DENORM
| ~~~~~~
77 | ((excepts & FE_DENORM) ? ExceptionFlags::DENORMAL_F : 0) |
| ~~~~~~~~~~~~
78 | #endif // FE_DENORM
| ~~~~~
79 | ((excepts & FE_DIVBYZERO) ? ExceptionFlags::DIV_BY_ZERO_F : 0) |
| ~~~~~~~~~~~~~~~~
80 | ((excepts & FE_OVERFLOW) ? ExceptionFlags::OVERFLOW_F : 0) |
| ~~~~~~~~~~~~
81 | ((excepts & FE_UNDERFLOW) ? ExceptionFlags::UNDERFLOW_F : 0) |
| ~~~~~~~~~~~~~^
82 | ((excepts & FE_INEXACT) ? ExceptionFlags::INEXACT_F : 0);
| ~~~~~~~~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h: In function ‘int __llvm_libc_19_0_0_git::fputil::enable_except(int)’:
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:161:10: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [
-Wconversion]
161 | x87_cw &= ~bit_mask;
| ~^~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h: In function ‘int __llvm_libc_19_0_0_git::fputil::clear_except(int)’:
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:208:76: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [
-Wconversion]
208 | static_cast~~~~~^~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:600:29: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [
-Wconversion]
600 | x87_status.control_word &= ~(uint16_t(0x3) << 10); // Round to nearest.
| ~~~~~~^~~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/x86_64/FEnvImpl.h:623:26: warning: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [
-Wconversion]
623 | x87_status.status_word &= ~uint16_t(0x3F);
| ~~~~~^~~~
In file included from /home/kuzmin_y/src/llvm-project/libc/src/support/libc_assert.h:25,
from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/FPBits.h:15,
from /home/kuzmin_y/src/llvm-project/libc/src/support/FPUtil/ManipulationFunctions.h:12,
from /home/kuzmin_y/src/llvm-project/libc/src/math/generic/nextdownl.cpp:10:
/home/kuzmin_y/src/llvm-project/libc/src/support/integer_to_string.h: In instantiation of ‘static char llvm_libc_19_0_0_git::IntegerToString<T, Fmt>::IntegerWriter::digit
_char(uint8_t) [with T = unsigned int; Fmt = llvm_libc_19_0_0_git::details::Fmt<10>; uint8_t = unsigned char]’:
/home/kuzmin_y/src/llvm-project/libc/src/support/integer_to_string.h:226:29: required from ‘static void llvm_libc_19_0_0_git::IntegerToString<T, Fmt>::IntegerWriter::wr
ite_unsigned_number(llvm_libc_19_0_0_git::IntegerToString<T, Fmt>::IntegerWriter::UNSIGNED_T, llvm_libc_19_0_0_git::details::BackwardStringBufferWriter&) [with T = unsign
ed int; Fmt = __llvm_libc_19_0_0_git::details::Fmt<10>; llvm_libc_19_0_0_git::IntegerToString<T, Fmt>::IntegerWriter::UNSIGNED_T = unsigned int; llvm_libc_19_0_0_git::det
ails::BackwardStringBufferWriter = llvm_libc_19_0_0_git::details::StringBufferWriterImpl~~^~~~~~~~
/home/kuzmin_y/src/llvm-project/libc/src/~~~~~~^~~~~~~~~
ninja: build stopped: subcommand failed.
@nickdesaulniers
Thanks for the report. @yaroslav-kuzmin can you please provide the output from: /usr/bin/g++ --version
?
Are you on a RISC-V host machine, or trying to cross compile? Can you please also provide the output from uname -m
?
:> /usr/bin/g++ --version g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
:> uname -m x86_64
Are you on a RISC-V host machine, or trying to cross compile?
I'm making a cross compiler
I'm building version 17.0.6 build options
cmake -S llvm -B build -G Ninja \ -DCMAKE_C_COMPILER=gcc \ -DCMAKE_CXX_COMPILER=g++ \ -DCMAKE_BUILD_TYPE="Release" \ -DLLVM_ENABLE_PROJECTS="clang;lld;polly;clang-tools-extra;libc" \ -DLLVM_BUILD_LLVM_DYLIB=YES \ -DLLVM_LINK_LLVM_DYLIB=YES \ -DCLANG_DEFAULT_RTLIB="compiler-rt" \ -DCLANG_DEFAULT_UNWINDLIB="libunwind" \ -DCLANG_DEFAULT_CXX_STDLIB="libc++" \ -DLLVM_INSTALL_UTILS=OFF \ -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \ -DBUILD_SHARED_LIBS=False \ -DLLVM_APPEND_VC_REV=NO \ -DLLVM_USE_SPLIT_DWARF=True \ -DCMAKE_INSTALL_PREFIX="/usr/local/clang_17" \ -DLLVM_OPTIMIZED_TABLEGEN=True -DLLVM_BUILD_TESTS=False \ -DDEFAULT_SYSROOT="/usr/local/clang_17/riscv64-unknown-elf" \ -DLLVM_DEFAULT_TARGET_TRIPLE="riscv64-unknown-elf" \ -DLLVM_INCLUDE_TESTS=OFF \ -DCLANG_INCLUDE_TESTS=ON \ -DENABLE_LINKER_BUILD_ID=YES \ -DLLVM_TARGETS_TO_BUILD="RISCV"
an error occurs during building
:> cmake --build build -j 1 --target install [1/284] Building CXX object projects/libc/src/fenv/CMakeFiles/libc.src.fenv.feraiseexcept.dir/feraiseexcept.cpp.o FAILED: projects/libc/src/fenv/CMakeFiles/libc.src.fenv.feraiseexcept.dir/feraiseexcept.cpp.o /usr/bin/g++ -D_GNU_SOURCE -DSTDC_CONSTANT_MACROS -DSTDC_FORMAT_MACROS -DSTDC_LIMIT_MACROS -I/home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/build_llvm/projects/libc/src /fenv -I/home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/fenv -I/home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/build_llvm/include -I/home/kuzmin_y/src/llvm-project-llv morg-17.0.6/llvm/include -I/home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc -I/home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/build_llvm/projects/libc/include -fPIC -fno-se mantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initia lizers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -O2 -fp ie -ffreestanding -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -Wall -Wextra -Wimplicit-fallthrough - Wwrite-strings -Wextra-semi -DLIBC_COPT_PUBLICPACKAGING -MD -MT projects/libc/src/fenv/CMakeFiles/libc.src.fenv.feraiseexcept.dir/feraiseexcept.cpp.o -MF projects/libc/src/f env/CMakeFiles/libc.src.fenv.feraiseexcept.dir/feraiseexcept.cpp.o.d -o projects/libc/src/fenv/CMakeFiles/libc.src.fenv.feraiseexcept.dir/feraiseexcept.cpp.o -c /home/kuzmin y/src/llvm-project-llvmorg-17.0.6/libc/src/fenv/feraiseexcept.cpp In file included from /home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/fenv/feraiseexcept.cpp:11: /home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/fenv/feraiseexcept.cpp:15:25: error: ‘int llvm_libc::feraiseexcept(int)’ aliased to external symbol ‘feraiseexcept’ 15 | LLVM_LIBC_FUNCTION(int, feraiseexcept, (int e)) { | ^
~~~~ /home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/support/common.h:30:31: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’ 30 | decltype(llvm_libc::name) name [[gnu::alias(#name)]]; \ | ^~~~ /home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/fenv/feraiseexcept.cpp:15:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’ 15 | LLVM_LIBC_FUNCTION(int, feraiseexcept, (int e)) { | ^~~~~~ /home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/fenv/feraiseexcept.cpp:15:25: warning: ‘int llvm_libc::feraiseexcept(int)’ specifies less restrictive attributes tha n its target ‘int feraiseexcept(int)’: ‘leaf’, ‘nothrow’ [-Wmissing-attributes] 15 | LLVM_LIBC_FUNCTION(int, feraiseexcept, (int e)) { | ^~~~~ /home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/support/common.h:30:31: note: in definition of macro ‘LLVM_LIBC_FUNCTION_IMPL’ 30 | decltype(__llvm_libc::name) name [[gnu::alias(#name)]]; \ | ^~~~ /home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/fenv/feraiseexcept.cpp:15:1: note: in expansion of macro ‘LLVM_LIBC_FUNCTION’ 15 | LLVM_LIBC_FUNCTION(int, feraiseexcept, (int e)) { | ^~~~~~ In file included from /usr/include/features.h:461, from /usr/include/errno.h:25, from /home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/errno/libc_errno.h:15, from /home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/support/FPUtil/FEnvImpl.h:14, from /home/kuzmin_y/src/llvm-project-llvmorg-17.0.6/libc/src/fenv/feraiseexcept.cpp:10: /usr/include/x86_64-linux-gnu/bits/fenv.h:157:1: note: ‘int llvm_libc::feraiseexcept(int)’ target declared here