[MXS-4344] error: no viable conversion from 'time_point<[...], duration<[...], ratio<[...], 1000000000>>>' to 'time_point<[...], duration<[...], ratio<[...], 1000000>>>' Created: 2022-10-09  Updated: 2022-10-11  Resolved: 2022-10-11

Status: Closed
Project: MariaDB MaxScale
Component/s: build
Affects Version/s: 22.08.1
Fix Version/s: N/A

Type: Bug Priority: Blocker
Reporter: Martin Filla Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Environment:

uname -a
FreeBSD 13.1-RELEASE-p1 FreeBSD 13.1-RELEASE-p1 GENERIC amd64

clang -v
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir: /usr/bin

-std=gnu++17


Attachments: Text File log.txt    

 Description   

Hi,
i have problem with compilation source code on FreeBSD with clang. This is issue:

/maxbase.dir/stopwatch.cc.o.d -o CMakeFiles/maxbase.dir/stopwatch.cc.o -c work/code/FreeBSD-Ports/maxscale/work/MaxScale-22.08.1/maxutils/maxbase/src/stopwatch.cc
c++: warning: argument unused during compilation: '-rdynamic' [-Wunused-command-line-argument]
work/code/FreeBSD-Ports/maxscale/work/MaxScale-22.08.1/maxutils/maxbase/src/stopwatch.cc:224:33: error: no viable conversion from 'time_point<[...], duration<[...], ratio<[...], 1000000000>>>' to 'time_point<[...], duration<[...], ratio<[...], 1000000>>>'
    return wall_time::to_string(in_wall_time, fmt);
                                ^~~~~~~~~~~~
/usr/include/c++/v1/chrono:1357:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long long, std::ratio<1, 1000000000>>>' to 'const std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long long, std::ratio<1, 1000000>>> &' for 1st argument
class _LIBCPP_TEMPLATE_VIS time_point
                           ^
/usr/include/c++/v1/chrono:1357:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long long, std::ratio<1, 1000000000>>>' to 'std::chrono::time_point<std::chrono::system_clock, std::chrono::duration<long long, std::ratio<1, 1000000>>> &&' for 1st argument
/usr/include/c++/v1/chrono:1376:5: note: candidate template ignored: requirement 'is_convertible<std::chrono::duration<long long, std::ratio<1, 1000000000>>, std::chrono::duration<long long, std::ratio<1, 1000000>>>::value' was not satisfied [with _Duration2 = std::chrono::duration<long long, std::ratio<1, 1000000000>>]
    time_point(const time_point<clock, _Duration2>& t,
    ^
/usr/include/c++/v1/chrono:1371:70: note: explicit constructor is not a candidate
    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit time_point(const duration& __d) : __d_(__d) {}
                                                                     ^
work/code/FreeBSD-Ports/maxscale/work/MaxScale-22.08.1/maxutils/maxbase/include/maxbase/stopwatch.hh:246:33: note: passing argument to parameter 'tp' here
std::string to_string(TimePoint tp, const std::string& fmt = "%F %T");



 Comments   
Comment by Johan Wikman [ 2022-10-11 ]

We only support Linux. Pull-requests may be accepted provided they do not break the Linux build.

Generated at Thu Feb 08 04:27:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.