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

make遇错 #1

Open
luckypoem opened this issue Aug 29, 2019 · 8 comments
Open

make遇错 #1

luckypoem opened this issue Aug 29, 2019 · 8 comments

Comments

@luckypoem
Copy link

hi。

运行 make
显示如下:
...
/Users/brite/tun2socks-by-wtdcode/tun2socks-core/./include/tuntap.h:3:10: fatal error:
'string_view' file not found
#include <string_view>
^
4 warnings and 2 errors generated.
make[2]: *** [tun2socks-core/CMakeFiles/tun2socks-core.dir/tun2socks-core.cpp.o] Error 1
make[1]: *** [tun2socks-core/CMakeFiles/tun2socks-core.dir/all] Error 2
make: *** [all] Error 2
yudeMacBook-Air:tun2socks-by-wtdcode brite$

怎么解决?

@wtdcode
Copy link
Owner

wtdcode commented Jan 5, 2020

@luckypoem
Hi!
抱歉八月太忙了没注意到issue。
从报错来看该是C++17没有开启。
另外这边还在重构,应该会在近期发布,欢迎试用重构后的版本 :)

@wtdcode
Copy link
Owner

wtdcode commented Jan 29, 2020

可以试试全新版本 :)

@wtdcode wtdcode closed this as completed Jan 29, 2020
@luckypoem
Copy link
Author

hi.
还是不行:
make后,显示:
...
[ 95%] Building CXX object CMakeFiles/tun2socks.dir/connector/connector.cpp.o
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:30:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx_)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:35:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:40:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:45:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:50:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:55:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:60:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:65:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:70:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:75:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:80:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:88:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:95:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:100:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:105:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:110:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:115:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:120:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.cpp:1:
In file included from /Users/brite/tun2socks-by-wtdcode/connector/connector.h:11:
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:128:9: error: use of class
template 'std::lock_guard' requires template arguments
CORE_LOCK;
^
/Users/brite/tun2socks-by-wtdcode/./wrapper/lwip.hpp:10:24: note: expanded from
macro 'CORE_LOCK'
#define CORE_LOCK std::lock_guard gurad(this->core_mtx
)
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class _LIBCPP_TYPE_VIS_ONLY lock_guard
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [CMakeFiles/tun2socks.dir/connector/connector.cpp.o] Error 1
make[1]: *** [CMakeFiles/tun2socks.dir/all] Error 2
make: *** [all] Error 2
yudeMacBook-Air:tun2socks-by-wtdcode brite$

如何解决?

@wtdcode
Copy link
Owner

wtdcode commented Jan 30, 2020

看起来像是std::lock_guard的问题,另外你是在macos编译的吗?

@wtdcode wtdcode reopened this Jan 30, 2020
@luckypoem
Copy link
Author

是啊

@wtdcode
Copy link
Owner

wtdcode commented Jan 30, 2020 via email

@wtdcode
Copy link
Owner

wtdcode commented Jan 30, 2020

Fixed. See this.

不过 macos 支持的优先级可能很靠后了,得先解决一些其他问题。

@luckypoem
Copy link
Author

luckypoem commented Jan 31, 2020

hi.

make还是有问题:
[ 95%] Building CXX object CMakeFiles/tun2socks.dir/core/core.cpp.o
/Users/brite/tun2socks-by-wtdcode/core/core.cpp:18:14: error: use of class
template 'std::lock_guard' requires template arguments
std::lock_guard guard(wrapper::LwIP::Instance().GetLock());
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
/Users/brite/tun2socks-by-wtdcode/core/core.cpp:118:10: error: use of class
template 'std::lock_guard' requires template arguments
std::lock_guard guard(this->mtx
);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class LIBCPP_TYPE_VIS_ONLY lock_guard
^
/Users/brite/tun2socks-by-wtdcode/core/core.cpp:130:10: error: use of class
template 'std::lock_guard' requires template arguments
std::lock_guard guard(this->mtx
);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__mutex_base:72:29: note:
template is declared here
class _LIBCPP_TYPE_VIS_ONLY lock_guard
^
3 errors generated.
make[2]: *** [CMakeFiles/tun2socks.dir/core/core.cpp.o] Error 1
make[1]: *** [CMakeFiles/tun2socks.dir/all] Error 2
make: *** [all] Error 2
yudeMacBook-Air:build brite$

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

2 participants