Sg4Dylan / libvits-ncnn

libvits-ncnn is an ncnn implementation of the VITS library that enables cross-platform GPU-accelerated speech synthesis.🎙️💻
Apache License 2.0
55 stars 6 forks source link

make: *** No targets specified and no makefile found. Stop. #3

Open DumoeDss opened 1 year ago

DumoeDss commented 1 year ago

$ cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_C_COMPILER=/usr/bin/clang -- Building for: Visual Studio 17 2022 -- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19045. -- The C compiler identification is MSVC 19.34.31935.0 -- The CXX compiler identification is MSVC 19.34.31935.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: M:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: M:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found OpenMP_C: -openmp (found version "2.0") -- Found OpenMP_CXX: -openmp (found version "2.0") -- Found OpenMP: TRUE (found version "2.0") -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - not found -- Found Threads: TRUE -- Configuring done (13.0s) -- Generating done (0.0s) -- Build files have been written to: H:/libvits-ncnn/build

$ make make: *** No targets specified and no makefile found. Stop.

spianmo commented 1 year ago

It is recommended to use msys64\mingw64 to compile libvits-ncnn on the windows platform

spianmo commented 1 year ago

In addition, pay attention to the support of the format function by different compilers under CXX_STANDARD 20. If necessary, you need to modify the CMakeLists to add the fmt library link, or use the gcc compiler of version 13 or above

DumoeDss commented 1 year ago

I try to use cmake .. -G "Unix Makefiles" it will generate a Makefile. But when I try make, it will get error:

[ 90%] Built target libopenjtalk [ 93%] Building CXX object CMakeFiles/vits-ncnn.dir/vits/SynthesizerTrn.cpp.obj [ 95%] Building CXX object CMakeFiles/vits-ncnn.dir/vits/utils.cpp.obj [ 97%] Building CXX object CMakeFiles/vits-ncnn.dir/vitsncnn.cpp.obj [100%] Linking CXX shared library libvits-ncnn.dll c++.exe: error: unrecognized command-line option '-static-openmp' make[2]: [CMakeFiles/vits-ncnn.dir/build.make:146: libvits-ncnn.dll] Error 1 make[1]: [CMakeFiles/Makefile2:138: CMakeFiles/vits-ncnn.dir/all] Error 2 make: *** [Makefile:91: all] Error 2

DumoeDss commented 1 year ago

I used the ncnn-20230517-android-vulkan.zip from https://github.com/Tencent/ncnn/releases, and there doesn't have bin folder.

spianmo commented 1 year ago

I used the ncnn-20230517-android-vulkan.zip from https://github.com/Tencent/ncnn/releases, and there doesn't have bin folder.

https://github.com/spianmo/libvits-ncnn you can try it.

DumoeDss commented 1 year ago

I used the ncnn-20230517-android-vulkan.zip from https://github.com/Tencent/ncnn/releases, and there doesn't have bin folder.

https://github.com/spianmo/libvits-ncnn you can try it.

There are other errors when build

[ 33%] Linking CXX static library libOSDependent.a [ 33%] Built target OSDependent [ 33%] Building CXX object ncnn/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/glslang_tab.cpp.obj In file included from MachineIndependent/glslang.y:86: E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:648:18: error: 'uint32_t' does not name a type 648 | static const uint32t LevelFlagBitOffset = 56; | ^~~~ E:\AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:71:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? 70 | #include "../Include/InfoSink.h" +++ |+#include 71 | E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:661:22: error: 'uint64_t' does not name a type 661 | static constexpr uint64t uniqueIdMask = (1LL << LevelFlagBitOffset) - 1; | ^~~~ E:\AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:661:22: note: 'uint64_t' is defined in header ''; did you forget to '#include '? E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:662:18: error: 'uint32_t' does not name a type 662 | static const uint32t MaxLevelInUniqueID = 127; | ^~~~ E:\AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:662:18: note: 'uint32_t' is defined in header ''; did you forget to '#include '? E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h: In static member function 'static bool glslang::TSymbolTable::isBuiltInSymbol(long long int)': E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:658:50: error: 'LevelFlagBitOffset' was not declared in this scope 658 | int level = static_cast(uniqueId >> LevelFlagBitOffset); | ^~~~~~ E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h: In member function 'void glslang::TSymbolTable::amendSymbolIdLevel(glslang::TSymbol&)': E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:734:9: error: 'uint64_t' was not declared in this scope 734 | uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); | ^~~~ E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:734:9: note: 'uint64t' is defined in header ''; did you forget to '#include '? E:\AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:735:18: error: expected ';' before 'symbolId' 735 | uint64_t symbolId = symbol.getUniqueId(); | ^~~~ E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:736:9: error: 'symbolId' was not declared in this scope; did you mean 'symbol'? 736 | symbolId &= uniqueIdMask; | ^~~~ | symbol E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:736:21: error: 'uniqueIdMask' was not declared in this scope; did you mean 'uniqueId'? 736 | symbolId &= uniqueIdMask; | ^~~~ | uniqueId E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:737:22: error: 'level' was not declared in this scope 737 | symbolId |= (level << LevelFlagBitOffset); | ^~~~~ E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:737:31: error: 'LevelFlagBitOffset' was not declared in this scope 737 | symbolId |= (level << LevelFlagBitOffset); | ^~~~~~ E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h: In member function 'void glslang::TSymbolTable::updateUniqueIdLevelFlag()': E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:931:9: error: 'uint64_t' was not declared in this scope 931 | uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); | ^~~~ E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:931:9: note: 'uint64t' is defined in header ''; did you forget to '#include '? E:\AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:932:21: error: 'uniqueIdMask' was not declared in this scope; did you mean 'uniqueId'? 932 | uniqueId &= uniqueIdMask; | ^~~~ | uniqueId E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:933:22: error: 'level' was not declared in this scope 933 | uniqueId |= (level << LevelFlagBitOffset); | ^~~~~ E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:933:31: error: 'LevelFlagBitOffset' was not declared in this scope 933 | uniqueId |= (level << LevelFlagBitOffset); | ^~~~~~ make[2]: [ncnn\glslang\glslang\CMakeFiles\MachineIndependent.dir\build.make:76: ncnn/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/glslang_tab.cpp.obj] Error 1 make[1]: [CMakeFiles\Makefile2:489: ncnn/glslang/glslang/CMakeFiles/MachineIndependent.dir/all] Error 2 make: *** [Makefile:135: all] Error 2

spianmo commented 1 year ago

I used the ncnn-20230517-android-vulkan.zip from https://github.com/Tencent/ncnn/releases, and there doesn't have bin folder.

https://github.com/spianmo/libvits-ncnn you can try it.

There are other errors when build

[ 33%] Linking CXX static library libOSDependent.a [ 33%] Built target OSDependent [ 33%] Building CXX object ncnn/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/glslang_tab.cpp.obj In file included from MachineIndependent/glslang.y:86: E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:648:18: error: 'uint32_t' does not name a type 648 | static const uint32t LevelFlagBitOffset = 56; | ^~~~ E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:71:1: note: 'uint32_t' is defined in header ''; did you forget to '#include '? 70 | #include "../Include/InfoSink.h" +++ |+#include 71 | E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:661:22: error: 'uint64_t' does not name a type 661 | static constexpr uint64t uniqueIdMask = (1LL << LevelFlagBitOffset) - 1; | ^~~~ E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:661:22: note: 'uint64_t' is defined in header ''; did you forget to '#include '? E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:662:18: error: 'uint32_t' does not name a type 662 | static const uint32t MaxLevelInUniqueID = 127; | ^~~~ E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:662:18: note: 'uint32_t' is defined in header ''; did you forget to '#include '? E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h: In static member function 'static bool glslang::TSymbolTable::isBuiltInSymbol(long long int)': E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:658:50: error: 'LevelFlagBitOffset' was not declared in this scope 658 | int level = static_cast(uniqueId >> LevelFlagBitOffset); | ^~~~~~ E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h: In member function 'void glslang::TSymbolTable::amendSymbolIdLevel(glslang::TSymbol&)': E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:734:9: error: 'uint64_t' was not declared in this scope 734 | uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); | ^~~~ E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:734:9: note: 'uint64_t' is defined in header ''; did you forget to '#include '? E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:735:18: error: expected ';' before 'symbolId' 735 | uint64t symbolId = symbol.getUniqueId(); | ^~~~ E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:736:9: error: 'symbolId' was not declared in this scope; did you mean 'symbol'? 736 | symbolId &= uniqueIdMask; | ^~~~ | symbol E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:736:21: error: 'uniqueIdMask' was not declared in this scope; did you mean 'uniqueId'? 736 | symbolId &= uniqueIdMask; | ^~~~ | uniqueId E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:737:22: error: 'level' was not declared in this scope 737 | symbolId |= (level << LevelFlagBitOffset); | ^~~~~ E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:737:31: error: 'LevelFlagBitOffset' was not declared in this scope 737 | symbolId |= (level << LevelFlagBitOffset); | ^~~~~~ E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h: In member function 'void glslang::TSymbolTable::updateUniqueIdLevelFlag()': E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:931:9: error: 'uint64_t' was not declared in this scope 931 | uint64_t level = (uint32_t)currentLevel() > MaxLevelInUniqueID ? MaxLevelInUniqueID : currentLevel(); | ^~~~ E:_AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:931:9: note: 'uint64_t' is defined in header ''; did you forget to '#include '? E:__AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:932:21: error: 'uniqueIdMask' was not declared in this scope; did you mean 'uniqueId'? 932 | uniqueId &= uniqueIdMask; | ^~~~ | uniqueId E:AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:933:22: error: 'level' was not declared in this scope 933 | uniqueId |= (level << LevelFlagBitOffset); | ^~~~~ E:___AI\libvits-ncnn-2\libvits-ncnn\ncnn\glslang\glslang\MachineIndependent\SymbolTable.h:933:31: error: 'LevelFlagBitOffset' was not declared in this scope 933 | uniqueId |= (level << LevelFlagBitOffset); | ^~~~~~ make[2]: [ncnn\glslang\glslang\CMakeFiles\MachineIndependent.dir\build.make:76: ncnn/glslang/glslang/CMakeFiles/MachineIndependent.dir/MachineIndependent/glslang_tab.cpp.obj] Error 1 make[1]: [CMakeFiles\Makefile2:489: ncnn/glslang/glslang/CMakeFiles/MachineIndependent.dir/all] Error 2 make: *** [Makefile:135: all] Error 2

add #include <cstdint> to glslang/MachineIndependent/SymbolTable.h can solve it image

DumoeDss commented 1 year ago

啊,感谢,修改之后可以编译了,但是编译出来是libvits-ncnn.dll和libvits-ncnn.dll.a,没有libvits-ncnn.so。 然后在编译demo的时候出错了。

In file included from E:_AI\libvits-ncnn-2\libvits-ncnn\demo\utils.hpp:4, from E:_AI\libvits-ncnn-2\libvits-ncnn\demo\vitsdemo.cpp:1: E:_AI\libvits-ncnn-2\libvits-ncnn\demo\vitsncnn.hpp:10:6: error: #elif with no expression 10 | #elif | ^ E:_AI\libvits-ncnn-2\libvits-ncnn\demo\vitsdemo.cpp: In function 'void testMulti(std::vector<std::vector >)': E:___AI\libvits-ncnn-2\libvits-ncnn\demo\vitsdemo.cpp:53:26: error: 'format' was not declared in this scope 53 | saveToWav(infer, format("outputmulti{}.wav", i)); | ^~ make[2]: [demo\CMakeFiles\vits-cli.dir\build.make:75: demo/CMakeFiles/vits-cli.dir/vitsdemo.cpp.obj] Error 1 make[1]: [CMakeFiles\Makefile2:999: demo/CMakeFiles/vits-cli.dir/all] Error 2 make: *** [Makefile:135: all] Error 2