Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build libvmaf fail #1066

Open
spgyip opened this issue Jul 18, 2022 · 1 comment
Open

Build libvmaf fail #1066

spgyip opened this issue Jul 18, 2022 · 1 comment

Comments

@spgyip
Copy link

spgyip commented Jul 18, 2022

[root@VM-229-231-centos ~/vmaf/libvmaf]# meson build --buildtype release
The Meson build system
Version: 0.55.1
Source dir: /root/vmaf/libvmaf
Build dir: /root/vmaf/libvmaf/build
Build type: native build
Project name: libvmaf
Project version: 2.3.1
C compiler for the host machine: cc (gcc 4.9.2 "cc (GCC) 4.9.2")
C linker for the host machine: cc ld.bfd 2.23.52.0.1-55
C++ compiler for the host machine: c++ (gcc 4.9.2 "c++ (GCC) 4.9.2")
C++ linker for the host machine: c++ ld.bfd 2.23.52.0.1-55
Host machine cpu family: x86_64
Host machine cpu: x86_64
Check usable header "stdatomic.h" : YES 
Configuring version.h using configuration
Program nasm found: YES
Configuring config.asm using configuration
Program xxd found: YES
Configuring config.h using configuration
Run-time dependency threads found: YES
Library m found: YES
Checking for function "strsep" : YES 
Program doxygen found: YES
Configuring Doxyfile using configuration
Build targets in project: 28

Build errors as

ninja -vC build
....
[12/104] cc -Isrc/libx86_avx2.a.p -Isrc -I../src -I../src/feature/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -D_GNU_SOURCE -fPIC -mavx -mavx2 -pedantic -DOC_NEW_STYLE_INCLUDES -MD -MQ src/libx86_avx2.a.p/feature_x86_vif_avx2.c.o -MF src/libx86_avx2.a.p/feature_x86_vif_avx2.c.o.d -o src/libx86_avx2.a.p/feature_x86_vif_avx2.c.o -c ../src/feature/x86/vif_avx2.c
FAILED: src/libx86_avx2.a.p/feature_x86_vif_avx2.c.o 
cc -Isrc/libx86_avx2.a.p -Isrc -I../src -I../src/feature/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=c11 -O3 -D_GNU_SOURCE -fPIC -mavx -mavx2 -pedantic -DOC_NEW_STYLE_INCLUDES -MD -MQ src/libx86_avx2.a.p/feature_x86_vif_avx2.c.o -MF src/libx86_avx2.a.p/feature_x86_vif_avx2.c.o.d -o src/libx86_avx2.a.p/feature_x86_vif_avx2.c.o -c ../src/feature/x86/vif_avx2.c
../src/feature/x86/vif_avx2.c: In function 'vif_statistic_16_avx2':
../src/feature/x86/vif_avx2.c:605:25: warning: implicit declaration of function '_mm_bsrli_si128' [-Wimplicit-function-declaration]
                         sg2, _mm256_cvtepu16_epi64(_mm_bsrli_si128(l0, 8))));
                         ^
../src/feature/x86/vif_avx2.c:605:30: error: incompatible type for argument 1 of '_mm256_cvtepu16_epi64'
                         sg2, _mm256_cvtepu16_epi64(_mm_bsrli_si128(l0, 8))));
                              ^
In file included from /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/immintrin.h:43:0,
                 from ../src/feature/x86/vif_avx2.c:20:
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/avx2intrin.h:513:1: note: expected '__m128i' but argument is of type 'int'
 _mm256_cvtepu16_epi64 (__m128i __X)
 ^
../src/feature/x86/vif_avx2.c:612:30: error: incompatible type for argument 1 of '_mm256_cvtepu16_epi64'
                         sg3, _mm256_cvtepu16_epi64(_mm_bsrli_si128(l1, 8))));
                              ^
In file included from /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/immintrin.h:43:0,
                 from ../src/feature/x86/vif_avx2.c:20:
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/avx2intrin.h:513:1: note: expected '__m128i' but argument is of type 'int'
 _mm256_cvtepu16_epi64 (__m128i __X)
 ^
../src/feature/x86/vif_avx2.c:621:30: error: incompatible type for argument 1 of '_mm256_cvtepu16_epi64'
                         sg2, _mm256_cvtepu16_epi64(_mm_bsrli_si128(l0, 8))));
                              ^
In file included from /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/immintrin.h:43:0,
                 from ../src/feature/x86/vif_avx2.c:20:
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/avx2intrin.h:513:1: note: expected '__m128i' but argument is of type 'int'
 _mm256_cvtepu16_epi64 (__m128i __X)
 ^
../src/feature/x86/vif_avx2.c:628:30: error: incompatible type for argument 1 of '_mm256_cvtepu16_epi64'
                         sg3, _mm256_cvtepu16_epi64(_mm_bsrli_si128(l1, 8))));
                              ^
In file included from /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/immintrin.h:43:0,
                 from ../src/feature/x86/vif_avx2.c:20:
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/avx2intrin.h:513:1: note: expected '__m128i' but argument is of type 'int'
 _mm256_cvtepu16_epi64 (__m128i __X)
 ^
../src/feature/x86/vif_avx2.c:643:30: error: incompatible type for argument 1 of '_mm256_cvtepu16_epi64'
                         sd2, _mm256_cvtepu16_epi64(_mm_bsrli_si128(l0, 8))));
                              ^
In file included from /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/immintrin.h:43:0,
                 from ../src/feature/x86/vif_avx2.c:20:
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/avx2intrin.h:513:1: note: expected '__m128i' but argument is of type 'int'
 _mm256_cvtepu16_epi64 (__m128i __X)
 ^
../src/feature/x86/vif_avx2.c:650:30: error: incompatible type for argument 1 of '_mm256_cvtepu16_epi64'
                         sd3, _mm256_cvtepu16_epi64(_mm_bsrli_si128(l1, 8))));
                              ^
In file included from /usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/immintrin.h:43:0,
                 from ../src/feature/x86/vif_avx2.c:20:
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.9.2/include/avx2intrin.h:513:1: note: expected '__m128i' but argument is of type 'int'
 _mm256_cvtepu16_epi64 (__m128i __X)
 ^
../src/feature/x86/vif_avx2.c:515:33: warning: variable 'shift_HP' set but not used [-Wunused-but-set-variable]
     int32_t add_shift_round_HP, shift_HP;
                                 ^
../src/feature/x86/vif_avx2.c:515:13: warning: variable 'add_shift_round_HP' set but not used [-Wunused-but-set-variable]
     int32_t add_shift_round_HP, shift_HP;
@spgyip
Copy link
Author

spgyip commented Jul 18, 2022

I tried as #851's solution

CXXFLAGS=-pthread  meson build --buildtype release -Denable_asm=false -Denable_tests=false
ninja -C build

But still got errors

FAILED: src/libvmaf.so.1.1.3.p/svm.cpp.o 
c++ -Isrc/libvmaf.so.1.1.3.p -Isrc -I../src -Iinclude -I../include -I../src/feature -I../src/feature/common -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -std=c++11 -O3 -pthread -fPIC -pedantic -DOC_NEW_STYLE_INCLUDES -MD -MQ src/libvmaf.so.1.1.3.p/svm.cpp.o -MF src/libvmaf.so.1.1.3.p/svm.cpp.o.d -o src/libvmaf.so.1.1.3.p/svm.cpp.o -c ../src/svm.cpp
../src/svm.cpp: In instantiation of 'SVMModelParser<TSource>::SVMModelParser(TSource&&) [with TSource = SVMModelParserFileSource]':
../src/svm.cpp:3162:65:   required from here
../src/svm.cpp:3023:79: error: use of deleted function 'SVMModelParserFileSource::SVMModelParserFileSource(SVMModelParserFileSource&&)'
  SVMModelParser(TSource&& model_source) : model_source(std::move(model_source)) {}
                                                                               ^
../src/svm.cpp:2950:7: note: 'SVMModelParserFileSource::SVMModelParserFileSource(SVMModelParserFileSource&&)' is implicitly deleted because the default definition would be ill-formed:
 class SVMModelParserFileSource {
       ^
../src/svm.cpp:2950:7: error: use of deleted function 'std::basic_ifstream<char>::basic_ifstream(const std::basic_ifstream<char>&)'
In file included from ../src/svm.cpp:11:0:
/usr/local/include/c++/4.9.2/fstream:430:11: note: 'std::basic_ifstream<char>::basic_ifstream(const std::basic_ifstream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_ifstream : public basic_istream<_CharT, _Traits>
           ^
/usr/local/include/c++/4.9.2/fstream:430:11: error: use of deleted function 'std::basic_istream<char>::basic_istream(const std::basic_istream<char>&)'
In file included from /usr/local/include/c++/4.9.2/fstream:38:0,
                 from ../src/svm.cpp:11:
/usr/local/include/c++/4.9.2/istream:58:11: note: 'std::basic_istream<char>::basic_istream(const std::basic_istream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_istream : virtual public basic_ios<_CharT, _Traits>
           ^
/usr/local/include/c++/4.9.2/istream:58:11: error: use of deleted function 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)'
In file included from /usr/local/include/c++/4.9.2/ios:44:0,
                 from /usr/local/include/c++/4.9.2/istream:38,
                 from /usr/local/include/c++/4.9.2/fstream:38,
                 from ../src/svm.cpp:11:
/usr/local/include/c++/4.9.2/bits/basic_ios.h:66:11: note: 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_ios : public ios_base
           ^
In file included from /usr/local/include/c++/4.9.2/ios:42:0,
                 from /usr/local/include/c++/4.9.2/istream:38,
                 from /usr/local/include/c++/4.9.2/fstream:38,
                 from ../src/svm.cpp:11:
/usr/local/include/c++/4.9.2/bits/ios_base.h:786:5: error: 'std::ios_base::ios_base(const std::ios_base&)' is private
     ios_base(const ios_base&);
     ^
In file included from /usr/local/include/c++/4.9.2/ios:44:0,
                 from /usr/local/include/c++/4.9.2/istream:38,
                 from /usr/local/include/c++/4.9.2/fstream:38,
                 from ../src/svm.cpp:11:
/usr/local/include/c++/4.9.2/bits/basic_ios.h:66:11: error: within this context
     class basic_ios : public ios_base
           ^
In file included from ../src/svm.cpp:11:0:
/usr/local/include/c++/4.9.2/fstream:430:11: error: use of deleted function 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)'
     class basic_ifstream : public basic_istream<_CharT, _Traits>
           ^
/usr/local/include/c++/4.9.2/fstream:430:11: error: use of deleted function 'std::basic_filebuf<char>::basic_filebuf(const std::basic_filebuf<char>&)'
/usr/local/include/c++/4.9.2/fstream:72:11: note: 'std::basic_filebuf<char>::basic_filebuf(const std::basic_filebuf<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_filebuf : public basic_streambuf<_CharT, _Traits>
           ^
In file included from /usr/local/include/c++/4.9.2/ios:43:0,
                 from /usr/local/include/c++/4.9.2/istream:38,
                 from /usr/local/include/c++/4.9.2/fstream:38,
                 from ../src/svm.cpp:11:
/usr/local/include/c++/4.9.2/streambuf:802:7: error: 'std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]' is private
       basic_streambuf(const basic_streambuf& __sb)
       ^
In file included from ../src/svm.cpp:11:0:
/usr/local/include/c++/4.9.2/fstream:72:11: error: within this context
     class basic_filebuf : public basic_streambuf<_CharT, _Traits>
           ^
../src/svm.cpp: In instantiation of 'SVMModelParser<TSource>::SVMModelParser(TSource&&) [with TSource = SVMModelParserBufferSource]':
../src/svm.cpp:3168:74:   required from here
../src/svm.cpp:3023:79: error: use of deleted function 'SVMModelParserBufferSource::SVMModelParserBufferSource(SVMModelParserBufferSource&&)'
  SVMModelParser(TSource&& model_source) : model_source(std::move(model_source)) {}
                                                                               ^
../src/svm.cpp:2983:7: note: 'SVMModelParserBufferSource::SVMModelParserBufferSource(SVMModelParserBufferSource&&)' is implicitly deleted because the default definition would be ill-formed:
 class SVMModelParserBufferSource {
       ^
../src/svm.cpp:2983:7: error: use of deleted function 'std::basic_istringstream<char>::basic_istringstream(const std::basic_istringstream<char>&)'
In file included from ../src/svm.cpp:12:0:
/usr/local/include/c++/4.9.2/sstream:272:11: note: 'std::basic_istringstream<char>::basic_istringstream(const std::basic_istringstream<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_istringstream : public basic_istream<_CharT, _Traits>
           ^
/usr/local/include/c++/4.9.2/sstream:272:11: error: use of deleted function 'std::basic_istream<char>::basic_istream(const std::basic_istream<char>&)'
/usr/local/include/c++/4.9.2/sstream:272:11: error: use of deleted function 'std::basic_ios<char>::basic_ios(const std::basic_ios<char>&)'
/usr/local/include/c++/4.9.2/sstream:272:11: error: use of deleted function 'std::basic_stringbuf<char>::basic_stringbuf(const std::basic_stringbuf<char>&)'
/usr/local/include/c++/4.9.2/sstream:64:11: note: 'std::basic_stringbuf<char>::basic_stringbuf(const std::basic_stringbuf<char>&)' is implicitly deleted because the default definition would be ill-formed:
     class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
           ^
In file included from /usr/local/include/c++/4.9.2/ios:43:0,
                 from /usr/local/include/c++/4.9.2/istream:38,
                 from /usr/local/include/c++/4.9.2/fstream:38,
                 from ../src/svm.cpp:11:
/usr/local/include/c++/4.9.2/streambuf:802:7: error: 'std::basic_streambuf<_CharT, _Traits>::basic_streambuf(const std::basic_streambuf<_CharT, _Traits>&) [with _CharT = char; _Traits = std::char_traits<char>]' is private
       basic_streambuf(const basic_streambuf& __sb)
       ^
In file included from ../src/svm.cpp:12:0:
/usr/local/include/c++/4.9.2/sstream:64:11: error: within this context
     class basic_stringbuf : public basic_streambuf<_CharT, _Traits>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant