<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Workaround "error: ‘(9.223372036854775807e+18 / 1.0e+9)’ is not a constant expression""
href="https://bugs.llvm.org/show_bug.cgi?id=39696">39696</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Workaround "error: ‘(9.223372036854775807e+18 / 1.0e+9)’ is not a constant expression"
</td>
</tr>
<tr>
<th>Product</th>
<td>Build scripts
</td>
</tr>
<tr>
<th>Version</th>
<td>7.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>cmake
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>noloader@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1538817">https://bugzilla.redhat.com/show_bug.cgi?id=1538817</a>:
[ 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>
<span class="quote">>*)(& std::__1::chrono::duration<_Rep, _Period>::max<long long int,</span >
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>