Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Fail to build with current folly #34

Open
hfxunlp opened this issue Jan 14, 2017 · 7 comments
Open

Fail to build with current folly #34

hfxunlp opened this issue Jan 14, 2017 · 7 comments

Comments

@hfxunlp
Copy link

hfxunlp commented Jan 14, 2017

Some error reported and seems it happened because of folly:
[ 40%] Building CXX object CMakeFiles/thpp.dir/thpp/if/gen-cpp2/Tensor_types.cpp.o
In file included from /usr/local/include/folly/io/async/Request.h:27:0,
from /usr/local/include/folly/io/async/EventBase.h:45,
from /usr/local/include/folly/io/async/AsyncSocketBase.h:19,
from /usr/local/include/folly/io/async/AsyncTransport.h:22,
from /usr/local/include/folly/io/async/AsyncSocket.h:26,
from /usr/local/include/thrift/lib/cpp/async/TAsyncSocket.h:19,
from /usr/local/include/thrift/lib/cpp2/server/Cpp2ConnContext.h:20,
from /home/ano/workspace/thpp/thpp/build/thpp/if/gen-cpp2/Tensor_types.tcc:14,
from /home/ano/workspace/thpp/thpp/build/thpp/if/gen-cpp2/Tensor_types.cpp:9:
/usr/local/include/folly/Synchronized.h:157:37: error: ‘withWLock’ function uses ‘aut’ type specifier without trailing return type
auto withWLock(Function&& function) {
^
/usr/local/include/folly/Synchronized.h:157:37: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:163:39: error: ‘withWLock’ function uses ‘aut’ type specifier without trailing return type
auto withWLock(Function&& function) const {
^
/usr/local/include/folly/Synchronized.h:163:39: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:179:40: error: ‘withWLockPtr’ function uses ‘auto’ type specifier without trailing return type
auto withWLockPtr(Function&& function) {
^
/usr/local/include/folly/Synchronized.h:179:40: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:183:42: error: ‘withWLockPtr’ function uses ‘auto’ type specifier without trailing return type
auto withWLockPtr(Function&& function) const {
^
/usr/local/include/folly/Synchronized.h:183:42: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:194:39: error: ‘withRLock’ function uses ‘aut’ type specifier without trailing return type
auto withRLock(Function&& function) const {
^
/usr/local/include/folly/Synchronized.h:194:39: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:201:42: error: ‘withRLockPtr’ function uses ‘auto’ type specifier without trailing return type
auto withRLockPtr(Function&& function) const {
^
/usr/local/include/folly/Synchronized.h:201:42: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:275:39: error: ‘withULock’ function uses ‘aut’ type specifier without trailing return type
auto withULock(Function&& function) const {
^
/usr/local/include/folly/Synchronized.h:275:39: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:293:40: error: ‘withULockPtr’ function uses ‘auto’ type specifier without trailing return type
auto withULockPtr(Function&& function) {
^
/usr/local/include/folly/Synchronized.h:293:40: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:297:42: error: ‘withULockPtr’ function uses ‘auto’ type specifier without trailing return type
auto withULockPtr(Function&& function) const {
^
/usr/local/include/folly/Synchronized.h:297:42: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:370:36: error: ‘withLock’ function uses ‘auto’ type specifier without trailing return type
auto withLock(Function&& function) {
^
/usr/local/include/folly/Synchronized.h:370:36: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:376:38: error: ‘withLock’ function uses ‘auto’ type specifier without trailing return type
auto withLock(Function&& function) const {
^
/usr/local/include/folly/Synchronized.h:376:38: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:392:39: error: ‘withLockPtr’ function uses ‘auto’ type specifier without trailing return type
auto withLockPtr(Function&& function) {
^
/usr/local/include/folly/Synchronized.h:392:39: note: deduced return type only available with -std=c++14 or -std=gnu++14
/usr/local/include/folly/Synchronized.h:396:41: error: ‘withLockPtr’ function uses ‘auto’ type specifier without trailing return type
auto withLockPtr(Function&& function) const {
^
/usr/local/include/folly/Synchronized.h:396:41: note: deduced return type only available with -std=c++14 or -std=gnu++14
CMakeFiles/thpp.dir/build.make:228: recipe for target 'CMakeFiles/thpp.dir/thpp/if/gen-cpp2/Tensor_types.cpp.o' failed
make[2]: *** [CMakeFiles/thpp.dir/thpp/if/gen-cpp2/Tensor_types.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/thpp.dir/all' failed
make[1]: *** [CMakeFiles/thpp.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

@albertyou2
Copy link

@anoidgit
hi ,have you found the resolution?I also met the problem and have no idea how to solve it
Need help!

@hfxunlp
Copy link
Author

hfxunlp commented Jan 22, 2017

sorry, I still can not install it now. @albertyou2

@albertyou2
Copy link

@facebook

@lillekemiker
Copy link

Just a thought: have you tried changing this line:
https://github.com/facebook/thpp/blob/master/thpp/CMakeLists.txt#L45
to
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")?
(i.e. gnu++14 instead of gnu++11)
I don't know if it will work but it seems worth a shot.

@hfxunlp
Copy link
Author

hfxunlp commented Jan 25, 2017

Thank you for your help And I will try after my vocation. @lillekemiker

@albertyou2
Copy link

@lillekemiker
I can not make this change "SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")" in folly because i did not intend to install folly but 'fblualib' did. When i was runing the install_all.sh which is included in fblualib's project , it clone and install ‘folly’ automatically and the error occurred.

in this case , I do not know how to make "SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14")" in folly.

Do you have any suggestion? Thank you very much

@goldstar111
Copy link

goldstar111 commented Jun 8, 2018

Ok what version of compiler are you using here? I am getting these errors because I am trying with gcc 4.8.5 and I need higher. I just commented it out of the makefile and it proceeded.

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

No branches or pull requests

4 participants