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

compile problem in centos 7.6 #40

Open
youngerking1985 opened this issue Jul 22, 2021 · 2 comments
Open

compile problem in centos 7.6 #40

youngerking1985 opened this issue Jul 22, 2021 · 2 comments

Comments

@youngerking1985
Copy link
Contributor

when make project, display this problem. my enviroment is centos 7.6_x64;
r/local/pgsql/include/internal -D_GNU_SOURCE -c -o src/server/kv_storage.o src/server/kv_storage.cc
In file included from /usr/include/c++/4.8.2/unordered_map:35:0,
from /usr/local/include/rocksdb/db.h:16,
from src/server/kv_storage.cc:26:
/usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

@youngerking1985
Copy link
Contributor Author

youngerking1985 commented Jul 22, 2021

I modify makefile, modify

ifeq ($(shell uname -s),Darwin)
COMPILE.cc   = $(CXX) $(CXXFLAGS) -std=c++11 $(CPPFLAGS) -c
PG_CPPFLAGS += -Wno-deprecated-declarations
SHLIB_LINK  += -lstdc++
endif

to

COMPILE.cc   = $(CXX) $(CXXFLAGS) -std=c++11 $(CPPFLAGS) -c
ifeq ($(shell uname -s),Darwin)
COMPILE.cc   = $(CXX) $(CXXFLAGS) -std=c++11 $(CPPFLAGS) -c
PG_CPPFLAGS += -Wno-deprecated-declarations
SHLIB_LINK  += -lstdc++
endif

it is ok in compile in centos. maybe there is a better way but i am not familar with makefile.

@jsc0218
Copy link
Member

jsc0218 commented Jul 22, 2021

Thanks for your report. I think the issue might come from the compiler version with 4.8. A newer version would be okay.

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