[llvm-bugs] [Bug 39696] New: Workaround "error: ‘(9.223372036854775807e+18 / 1.0e+9)’ is not a constant expression"

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Nov 16 16:56:18 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=39696

            Bug ID: 39696
           Summary: Workaround "error: ‘(9.223372036854775807e+18 /
                    1.0e+9)’ is not a constant expression"
           Product: Build scripts
           Version: 7.0
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: noloader at gmail.com
                CC: llvm-bugs at lists.llvm.org

I'm trying to build LLVM and components on GCC112 from the compiler farm.
GCC112 is ppc64-le, and ships with GCC 4.8.5:

$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)
Copyright (C) 2015 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.

LLVM configuration and build goes well for a while. Then it encounters
https://bugzilla.redhat.com/show_bug.cgi?id=1538817:

[ 35%] Building CXX object
projects/libcxx/lib/CMakeFiles/cxx_objects.dir/__/src/condition_variable.cpp.o
cd /home/noloader/llvm_build/projects/libcxx/lib && /usr/bin/c++  -DNDEBUG
-D_DEBUG -D_GNU_SOURCE -D_LIBCPP_BUILDING_LIBRARY
-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/home/noloader/llvm_build/projects/libcxx/lib
-I/home/noloader/llvm_source/llvm/projects/libcxx/lib
-I/home/noloader/llvm_build/include -I/home/noloader/llvm_source/llvm/include
-I/home/noloader/llvm_build/projects/libcxx/include/c++build
-I/home/noloader/llvm_source/llvm/projects/libcxx/include  -fPIC
-fvisibility-inlines-hidden -std=c++11 -Wall -Wextra -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wno-missing-field-initializers  -Wno-long-long
-Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -g  
-DLIBCXX_BUILDING_LIBCXXABI -std=c++11 -nostdinc++ -fvisibility-inlines-hidden
-Wall -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long
-Werror=return-type -Wno-literal-suffix -Wno-c++14-compat -Wno-noexcept-type
-Wno-error -fPIC -o CMakeFiles/cxx_objects.dir/__/src/condition_variable.cpp.o
-c /home/noloader/llvm_source/llvm/projects/libcxx/src/condition_variable.cpp
In file included from
/home/noloader/llvm_source/llvm/projects/libcxx/src/condition_variable.cpp:15:0:
/home/noloader/llvm_source/llvm/projects/libcxx/include/thread: In function
‘void std::__1::this_thread::sleep_for(const std::__1::chrono::duration<_Rep,
_Period>&)’:
/home/noloader/llvm_source/llvm/projects/libcxx/include/thread:438:73:   in
constexpr expansion of ‘std::__1::chrono::duration<long double>((*(const
std::__1::chrono::duration<long long int, std::__1::ratio<1l, 1000000000l>
>*)(& std::__1::chrono::duration<_Rep, _Period>::max<long long int,
std::__1::ratio<1l, 1000000000l> >())), 0u)’
/home/noloader/llvm_source/llvm/projects/libcxx/include/chrono:1055:68:   in
constexpr expansion of
‘std::__1::chrono::duration_cast<std::__1::chrono::duration<long double>, long
long int, std::__1::ratio<1l, 1000000000l> >((* & __d))’
/home/noloader/llvm_source/llvm/projects/libcxx/include/chrono:907:72:   in
constexpr expansion of
‘std::__1::chrono::__duration_cast<std::__1::chrono::duration<long long int,
std::__1::ratio<1l, 1000000000l> >, std::__1::chrono::duration<long double>,
std::__1::ratio<1l, 1000000000l>, true,
false>().std::__1::chrono::__duration_cast<_FromDuration, _ToDuration, _Period,
true, false>::operator()<std::__1::chrono::duration<long long int,
std::__1::ratio<1l, 1000000000l> >, std::__1::chrono::duration<long double>,
std::__1::ratio<1l, 1000000000l> >((* & __fd))’
/home/noloader/llvm_source/llvm/projects/libcxx/include/thread:438:73: error:
‘(9.223372036854775807e+18 / 1.0e+9)’ is not a constant expression
         _LIBCPP_CONSTEXPR duration<long double> _Max = nanoseconds::max();
                                                                         ^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-noexcept-type"
[enabled by default]
cc1plus: warning: unrecognized command line option "-Wno-c++14-compat"
[enabledby default]
make[2]: ***
[projects/libcxx/lib/CMakeFiles/cxx_objects.dir/__/src/condition_variable.cpp.o]
Error 1
make[2]: Leaving directory `/home/noloader/llvm_build'
make[1]: *** [projects/libcxx/lib/CMakeFiles/cxx_objects.dir/all] Error 2
make[1]: Leaving directory `/home/noloader/llvm_build'
make: *** [all] Error 2
Failed to make LLVM sources

It would be nice if LLVM could work around the issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181117/6a4ab3ae/attachment-0001.html>


More information about the llvm-bugs mailing list