Erreur when trying to build on Ubuntu 22.04 LTS
rbarzic opened this issue · 1 comments
Command:
make INSTALL_DIR=/tmp/test_swerv-iss
Result :
g++ -MMD -MP -mfma -std=c++17 -O3 -I. -fPIC -pedantic -Wall -Wextra -c -o build-Linux/whisper.cpp.o whisper.cpp
whisper.cpp:151:20: error: ‘std::optional’ has not been declared
151 | std::optional& number)
| ^~~
whisper.cpp:151:33: error: expected ‘,’ or ‘...’ before ‘<’ token
151 | std::optional& number)
| ^
whisper.cpp: In function ‘bool parseCmdLineNumber(const string&, const string&, int)’:
whisper.cpp:156:3: error: ‘number’ was not declared in this scope; did you mean ‘numberStr’?
156 | number = n;
| ^~~~~~
| numberStr
whisper.cpp: At global scope:
whisper.cpp:188:8: error: ‘optional’ in namespace ‘std’ does not name a template type
188 | std::optionalstd::string toHostSym;
Commit:
commit 68d4634 (HEAD -> master, origin/master, origin/HEAD)
Merge: 22c1f7f c4e92bc
Author: Ajay Nath Ajay.Nath@wdc.com
Date: Sun Jan 16 08:45:36 2022 -0500Merge branch 'swerv-iss' of ssh://bitbucket.wdc.com:7999/rvc/whisper into swerv-iss
gcc version:
g++ (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
change the g++ version to g++ 9.4 can solve this problem