swesterfeld / audiowmark

Audio Watermarking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Random generator is incompatible with LLVM 15

aeiouaeiouaeiouaeiouaeiouaeiou opened this issue · comments

make[2]: Entering directory `/opt/local/var/macports/build/_Users_user_macports-ports_audio_audiowmark/audiowmark/work/audiowmark-0.6.1/src'
  CXX      audiowmark.o
  CXX      random.o
  CXX      audiostream.o
  CXX      sfinputstream.o
In file included from random.cc:18:
In file included from ./random.hh:26:
In file included from /opt/local/libexec/llvm-15/bin/../include/c++/v1/random:1682:
In file included from /opt/local/libexec/llvm-15/bin/../include/c++/v1/__random/bernoulli_distribution.h:14:
/opt/local/libexec/llvm-15/bin/../include/c++/v1/__random/uniform_real_distribution.h:119:5: error: static assertion failed due to requirement '__libcpp_random_is_valid_urng<Random, void>::value':
    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/libexec/llvm-15/bin/../include/c++/v1/__random/uniform_real_distribution.h:84:17: note: in instantiation of function template specialization 'std::uniform_real_distribution<>::operator()<Random>' requested here
        {return (*this)(__g, __p_);}
                ^
./random.hh:73:24: note: in instantiation of function template specialization 'std::uniform_real_distribution<>::operator()<Random>' requested here
    return double_dist (*this);
                       ^
In file included from audiowmark.cc:21:
In file included from /opt/local/libexec/llvm-15/bin/../include/c++/v1/random:1682:
In file included from /opt/local/libexec/llvm-15/bin/../include/c++/v1/__random/bernoulli_distribution.h:14:
/opt/local/libexec/llvm-15/bin/../include/c++/v1/__random/uniform_real_distribution.h:119:5: error: static assertion failed due to requirement '__libcpp_random_is_valid_urng<Random, void>::value':
    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/libexec/llvm-15/bin/../include/c++/v1/__random/uniform_real_distribution.h:84:17: note: in instantiation of function template specialization 'std::uniform_real_distribution<>::operator()<Random>' requested here
        {return (*this)(__g, __p_);}
                ^
./random.hh:73:24: note: in instantiation of function template specialization 'std::uniform_real_distribution<>::operator()<Random>' requested here
    return double_dist (*this);
                       ^
1 error generated.
1 error generated.
make[2]: *** [audiowmark.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [random.o] Error 1

I was able to reproduce the same error message using debain/unstable in docker and clang++-15 with libc++-15. Should be fixed by this commit: 99ffa6b

I'll close the issue since I think everything should work with my changes, let me know if that is not the case.