mlverse / torchaudio

R interface to torchaudio
https://mlverse.github.io/torchaudio/
Other
26 stars 6 forks source link

prepare release 0.2.2 #59

Closed skeydan closed 1 year ago

skeydan commented 1 year ago
* installing *source* package ‘torchaudio’ ...
** package ‘torchaudio’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++ (GCC) 13.0.0 20230115 (experimental)’
make[2]: Entering directory '/data/gannet/ripley/R/packages/tests-gcc13/torchaudio/src'
/usr/local/gcc13/bin/g++ -std=gnu++14 -I"/data/gannet/ripley/R/R-gcc13/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-dev/Rcpp/include' -I/usr/local/include    -fpic  -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection  -c RcppExports.cpp -o RcppExports.o
/usr/local/gcc13/bin/g++ -std=gnu++14 -I"/data/gannet/ripley/R/R-gcc13/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-dev/Rcpp/include' -I/usr/local/include    -fpic  -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection  -c read_mp3.cpp -o read_mp3.o
/usr/local/gcc13/bin/g++ -std=gnu++14 -I"/data/gannet/ripley/R/R-gcc13/include" -DNDEBUG  -I'/data/gannet/ripley/R/test-dev/Rcpp/include' -I/usr/local/include    -fpic  -g -O2 -Wall -pedantic -mtune=native -Wno-ignored-attributes -Wno-parentheses -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong -fstack-clash-protection -fcf-protection  -c read_wav.cpp -o read_wav.o
In file included from read_wav.cpp:2:
AudioFile.h: In member function 'bool AudioFile<T>::decodeWaveFile(std::vector<unsigned char>&)':
AudioFile.h:619:93: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
  619 |                     sample = (T) sampleAsInt / static_cast<float> (std::numeric_limits<std::int32_t>::max());
      |                                                                                             ^~~~~~~
In file included from /usr/include/sys/types.h:155,
                 from /usr/include/stdlib.h:395,
                 from /usr/local/gcc13/include/c++/13.0.0/bits/std_abs.h:38,
                 from /usr/local/gcc13/include/c++/13.0.0/cmath:49,
                 from /data/gannet/ripley/R/test-dev/Rcpp/include/Rcpp/platform/compiler.h:100,
                 from /data/gannet/ripley/R/test-dev/Rcpp/include/Rcpp/r/headers.h:62,
                 from /data/gannet/ripley/R/test-dev/Rcpp/include/RcppCommon.h:30,
                 from /data/gannet/ripley/R/test-dev/Rcpp/include/Rcpp.h:27,
                 from read_wav.cpp:1:
/usr/include/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   26 | typedef __int32_t int32_t;
      |                   ^~~~~~~
AudioFile.h:619:93: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
  619 |                     sample = (T) sampleAsInt / static_cast<float> (std::numeric_limits<std::int32_t>::max());
      |                                                                                             ^~~~~~~
/usr/include/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   26 | typedef __int32_t int32_t;
      |                   ^~~~~~~
AudioFile.h:619:100: error: template argument 1 is invalid
  619 |                     sample = (T) sampleAsInt / static_cast<float> (std::numeric_limits<std::int32_t>::max());
      |                                                                                                    ^
AudioFile.h: In member function 'bool AudioFile<T>::decodeAiffFile(std::vector<unsigned char>&)':
AudioFile.h:764:93: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
  764 |                     sample = (T) sampleAsInt / static_cast<float> (std::numeric_limits<std::int32_t>::max());
      |                                                                                             ^~~~~~~
/usr/include/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   26 | typedef __int32_t int32_t;
      |                   ^~~~~~~
AudioFile.h:764:93: error: 'int32_t' is not a member of 'std'; did you mean 'int32_t'?
  764 |                     sample = (T) sampleAsInt / static_cast<float> (std::numeric_limits<std::int32_t>::max());
      |                                                                                             ^~~~~~~
/usr/include/bits/stdint-intn.h:26:19: note: 'int32_t' declared here
   26 | typedef __int32_t int32_t;
      |                   ^~~~~~~
AudioFile.h:764:100: error: template argument 1 is invalid
  764 |                     sample = (T) sampleAsInt / static_cast<float> (std::numeric_limits<std::int32_t>::max());
      |                                                                                                    ^
AudioFile.h: In instantiation of 'bool AudioFile<T>::decodeWaveFile(std::vector<unsigned char>&) [with T = float]':
AudioFile.h:486:16:   required from 'bool AudioFile<T>::load(std::string) [with T = float; std::string = std::__cxx11::basic_string<char>]'
read_wav.cpp:9:11:   required from here
AudioFile.h:617:59: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  617 |                     sample = (T)reinterpret_cast<float&> (sampleAsInt);
      |                                                           ^~~~~~~~~~~
AudioFile.h: In instantiation of 'bool AudioFile<T>::decodeAiffFile(std::vector<unsigned char>&) [with T = float]':
AudioFile.h:490:16:   required from 'bool AudioFile<T>::load(std::string) [with T = float; std::string = std::__cxx11::basic_string<char>]'
read_wav.cpp:9:11:   required from here
AudioFile.h:762:59: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  762 |                     sample = (T)reinterpret_cast<float&> (sampleAsInt);
      |                                                           ^~~~~~~~~~~
make[2]: *** [/data/gannet/ripley/R/R-gcc13/etc/Makeconf:198: read_wav.o] Error 1
make[2]: Target 'all' not remade because of errors.
make[2]: Leaving directory '/data/gannet/ripley/R/packages/tests-gcc13/torchaudio/src'
ERROR: compilation failed for package ‘torchaudio’
* removing ‘/data/gannet/ripley/R/packages/tests-gcc13/torchaudio.Rcheck/torchaudio’
skeydan commented 1 year ago

TBD: more cleanup:

  1. validation.tar.gz etc should be temp files

  2. warning on macos: https://github.com/mlverse/torchaudio/actions/runs/3968313004/jobs/6801319454#step:8:125

skeydan commented 1 year ago

Remaining check should be ok once Rcpp is accepted on CRAN.