Re: The Synthizer Thread

These lines in CmakeLists.txt which add clang-specific command line options seem to be breaking it:
add_compile_options(-Xclang -fno-caret-diagnostics
    -Xclang -Wno-deprecated-declarations
    -Xclang -Wno-logical-op-parentheses
)
Once I remove them, I get:

C:\py\git\synthizer\build>set CC=gcc

C:\py\git\synthizer\build>set CXX=gcc

C:\py\git\synthizer\build>cmake -G Ninja ..
-- The C compiler identification is GNU 10.1.0
-- The CXX compiler identification is GNU 10.1.0
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe
-- Check for working C compiler: C:/msys64/mingw64/bin/gcc.exe - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/msys64/mingw64/bin/gcc.exe
-- Check for working CXX compiler: C:/msys64/mingw64/bin/gcc.exe - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/py/git/synthizer/build

C:\py\git\synthizer\build>ninja
[9/52] Building CXX object CMakeFiles/synthizer.dir/src/audio_output.cpp.obj
FAILED: CMakeFiles/synthizer.dir/src/audio_output.cpp.obj
C:\msys64\mingw64\bin\gcc.exe  -DBUILDING_SYNTHIZER -DWDL_RESAMPLE_TYPE=float -D
_ENABLE_EXTENDED_ALIGNED_STORAGE -I../include -I../third_party/miniaudio -I../th
ird_party/dr_libs -I../third_party/stb -I../third_party/cpp11-on-multicore/commo
n -I../third_party/wdl -I../third_party/plf_colony -std=gnu++17 -MD -MT CMakeFil
es/synthizer.dir/src/audio_output.cpp.obj -MF CMakeFiles\synthizer.dir\src\audio
_output.cpp.obj.d -o CMakeFiles/synthizer.dir/src/audio_output.cpp.obj -c ../src
/audio_output.cpp
In file included from ../include/synthizer/memory.hpp:5,
                 from ../include/synthizer/audio_ring.hpp:14,
                 from ../include/synthizer/audio_output.hpp:6,
                 from ../src/audio_output.cpp:9:
../include/synthizer/error.hpp: In member function 'T* synthizer::Error::as()':
../include/synthizer/error.hpp:33:19: error: 'dynamic_' is not a member of 'std'

   33 |   auto out = std::dynamic_)cast<T>(this);
      |                   ^~~~~~~~
In file included from ../include/synthizer/audio_ring.hpp:15,
                 from ../include/synthizer/audio_output.hpp:6,
                 from ../src/audio_output.cpp:9:
../include/synthizer/types.hpp: In function 'T synthizer::zeroValue() [with T =
__vector(4) synthizer::AudioSample]':
../include/synthizer/types.hpp:34:69: error: cannot convert '<brace-enclosed ini
tializer list>' to 'synthizer::AudioSample4' {aka '__vector(4) synthizer::AudioS
ample'} in return
   34 | inline AudioSample4 zeroValue<AudioSample4>() { return { 0, 0, 0, 0 }; }

      |                                                                     ^
In file included from ../include/synthizer/audio_output.hpp:6,
                 from ../src/audio_output.cpp:9:
../include/synthizer/audio_ring.hpp: In member function 'unsigned int synthizer:
:AudioRingBase<data_provider_t>::getAndResetLate()':
../include/synthizer/audio_ring.hpp:171:34: error: void value not ignored as it
ought to be
  171 |   return this->late_counter.store(0);
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from ../include/synthizer/audio_output.hpp:10,
                 from ../src/audio_output.cpp:9:
../include/synthizer/queues/bounded_block_queue.hpp: In member function 'void sy
nthizer::BoundedBlockQueue<T>::setQueueSize(std::size_t)':
../include/synthizer/queues/bounded_block_queue.hpp:164:115: error: no matching
function for call to 'std::atomic<long long unsigned int>::compare_exchange_weak
(long long unsigned int*, std::size_t&, std::memory_order, std::memory_order)'
  164 |   if (this->queue_size.compare_exchange_weak(&cur_size, size, std::memor
y_order_relaxed, std::memory_order_relaxed))
      |
                                          ^
In file included from C:/msys64/mingw64/include/c++/10.1.0/bits/shared_ptr_atomi
c.h:33,
                 from C:/msys64/mingw64/include/c++/10.1.0/memory:85,
                 from ../src/audio_output.cpp:4:
C:/msys64/mingw64/include/c++/10.1.0/bits/atomic_base.h:455:7: note: candidate:
'bool std::__atomic_base<_IntTp>::compare_exchange_weak(std::__atomic_base<_IntT
p>::__int_type&, std::__atomic_base<_IntTp>::__int_type, std::memory_order, std:
:memory_order) [with _ITp = long long unsigned int; std::__atomic_base<_IntTp>::
__int_type = long long unsigned int; std::memory_order = std::memory_order]' (ne
ar match)
  455 |       compare_exchange_weak(__int_type& __i1, __int_type __i2,
      |       ^~~~~~~~~~~~~~~~~~~~~
C:/msys64/mingw64/include/c++/10.1.0/bits/atomic_base.h:455:7: note:   conversio
n of argument 1 would be ill-formed:
C:/msys64/mingw64/include/c++/10.1.0/bits/atomic_base.h:469:7: note: candidate:
'bool std::__atomic_base<_IntTp>::compare_exchange_weak(std::__atomic_base<_IntT
p>::__int_type&, std::__atomic_base<_IntTp>::__int_type, std::memory_order, std:
:memory_order) volatile [with _ITp = long long unsigned int; std::__atomic_base<
_IntTp>::__int_type = long long unsigned int; std::memory_order = std::memory_or
der]' (near match)
  469 |       compare_exchange_weak(__int_type& __i1, __int_type __i2,
      |       ^~~~~~~~~~~~~~~~~~~~~
C:/msys64/mingw64/include/c++/10.1.0/bits/atomic_base.h:469:7: note:   conversio
n of argument 1 would be ill-formed:
C:/msys64/mingw64/include/c++/10.1.0/bits/atomic_base.h:484:7: note: candidate:
'bool std::__atomic_base<_IntTp>::compare_exchange_weak(std::__atomic_base<_IntT
p>::__int_type&, std::__atomic_base<_IntTp>::__int_type, std::memory_order) [wit
h _ITp = long long unsigned int; std::__atomic_base<_IntTp>::__int_type = long l
ong unsigned int; std::memory_order = std::memory_order]'
  484 |       compare_exchange_weak(__int_type& __i1, __int_type __i2,
      |       ^~~~~~~~~~~~~~~~~~~~~
C:/msys64/mingw64/include/c++/10.1.0/bits/atomic_base.h:484:7: note:   candidate
expects 3 arguments, 4 provided
C:/msys64/mingw64/include/c++/10.1.0/bits/atomic_base.h:492:7: note: candidate:
'bool std::__atomic_base<_IntTp>::compare_exchange_weak(std::__atomic_base<_IntT
p>::__int_type&, std::__atomic_base<_IntTp>::__int_type, std::memory_order) vola
tile [with _ITp = long long unsigned int; std::__atomic_base<_IntTp>::__int_type
= long long unsigned int; std::memory_order = std::memory_order]'
  492 |       compare_exchange_weak(__int_type& __i1, __int_type __i2,
      |       ^~~~~~~~~~~~~~~~~~~~~
C:/msys64/mingw64/include/c++/10.1.0/bits/atomic_base.h:492:7: note:   candidate
expects 3 arguments, 4 provided
[10/52] Building CXX object CMakeFiles/synthizer.dir/src/buffer.cpp.obj
FAILED: CMakeFiles/synthizer.dir/src/buffer.cpp.obj
C:\msys64\mingw64\bin\gcc.exe  -DBUILDING_SYNTHIZER -DWDL_RESAMPLE_TYPE=float -D
_ENABLE_EXTENDED_ALIGNED_STORAGE -I../include -I../third_party/miniaudio -I../th
ird_party/dr_libs -I../third_party/stb -I../third_party/cpp11-on-multicore/commo
n -I../third_party/wdl -I../third_party/plf_colony -std=gnu++17 -MD -MT CMakeFil
es/synthizer.dir/src/buffer.cpp.obj -MF CMakeFiles\synthizer.dir\src\buffer.cpp.
obj.d -o CMakeFiles/synthizer.dir/src/buffer.cpp.obj -c ../src/buffer.cpp
In file included from ../include/synthizer/base_object.hpp:4,
                 from ../include/synthizer/buffer.hpp:3,
                 from ../src/buffer.cpp:1:
../include/synthizer/error.hpp: In member function 'T* synthizer::Error::as()':
../include/synthizer/error.hpp:33:19: error: 'dynamic_' is not a member of 'std'

   33 |   auto out = std::dynamic_)cast<T>(this);
      |                   ^~~~~~~~
In file included from ../include/synthizer/buffer.hpp:6,
                 from ../src/buffer.cpp:1:
../include/synthizer/types.hpp: In function 'T synthizer::zeroValue() [with T =
__vector(4) synthizer::AudioSample]':
../include/synthizer/types.hpp:34:69: error: cannot convert '<brace-enclosed ini
tializer list>' to 'synthizer::AudioSample4' {aka '__vector(4) synthizer::AudioS
ample'} in return
   34 | inline AudioSample4 zeroValue<AudioSample4>() { return { 0, 0, 0, 0 }; }

      |                                                                     ^
[11/52] Building CXX object CMakeFiles...d_party/wdl/WDL/projectcontext.cpp.obj
In file included from ../third_party/wdl/WDL/projectcontext.cpp:14:
../third_party/wdl/WDL/fileread.h: In constructor 'WDL_FileRead::WDL_FileRead(co
nst char*, int, int, int, unsigned int, unsigned int)':
../third_party/wdl/WDL/fileread.h:213:65: warning: passing NULL to non-pointer a
rgument 4 of 'void* CreateFileMappingA(HANDLE, LPSECURITY_ATTRIBUTES, DWORD, DWO
RD, DWORD, LPCSTR)' [-Wconversion-null]
  213 |           m_mmap_fmap=CreateFileMapping(m_fh,NULL,PAGE_READONLY,NULL,0,N
ULL);
      |                                                                 ^~~~
In file included from C:/msys64/mingw64/x86_64-w64-mingw32/include/windows.h:70,

                 from ../third_party/wdl/WDL/projectcontext.cpp:2:
C:/msys64/mingw64/x86_64-w64-mingw32/include/winbase.h:1534:132: note:   declare
d here
1534 |   WINBASEAPI HANDLE WINAPI CreateFileMappingA (HANDLE hFile, LPSECURITY_
ATTRIBUTES lpFileMappingAttributes, DWORD flProtect, DWORD dwMaximumSizeHigh, DW
ORD dwMaximumSizeLow, LPCSTR lpName);
      |
                                                     ~~~~~~^~~~~~~~~~~~~~~~~
[14/52] Building CXX object CMakeFiles...d_party/wdl/WDL/shm_connection.cpp.obj
ninja: build stopped: subcommand failed.

C:\py\git\synthizer\build>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.1.0/l
to-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-10.1.0/configure --prefix=/mingw64 --with-local-prefix=/
mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_
64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/inclu
de --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=g
eneric --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++ --enable-shared --e
nable-static --enable-libatomic --enable-threads=posix --enable-graphite --enabl
e-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-t
ime=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-
check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release
--disable-rpath --disable-win32-registry --disable-nls --disable-werror --disab
le-symvers --disable-plugin --with-libiconv --with-system-zlib --with-gmp=/mingw
64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversio
n='Rev3, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/
msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.1.0 (Rev3, Built by MSYS2 project)

C:\py\git\synthizer\build>

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : nolan via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : keithwipf1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector

Reply via email to