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

Issue building with cmake [C++, gcc 5.2.1, RHEL7.2, 1.10.2] #5238

Closed
kentkolze opened this issue Mar 15, 2019 · 2 comments
Closed

Issue building with cmake [C++, gcc 5.2.1, RHEL7.2, 1.10.2] #5238

kentkolze opened this issue Mar 15, 2019 · 2 comments

Comments

@kentkolze
Copy link

Hi, I am new at compiling open source libraries so maybe I am doing something stupid! I ran into this build error attempting to build the flatc binary:

[ 95%] Building CXX object CMakeFiles/flattests.dir/tests/test.cpp.o
In file included from /devsandbox/enrgy/kkolze/compiled/flatbuffers-master/tests/test.cpp:19:0:
/devsandbox/enrgy/kkolze/compiled/flatbuffers-master/include/flatbuffers/minireflect.h: In constructor 'flatbuffers::ToStringVisitor::ToStringVisitor(std::string, bool, std::string, bool)':
/devsandbox/enrgy/kkolze/compiled/flatbuffers-master/include/flatbuffers/minireflect.h:293:7: error: declaration of 'vector_delimited' shadows a member of 'flatbuffers::ToStringVisitor' [-Werror=shadow]
: d(delimiter),
^
/devsandbox/enrgy/kkolze/compiled/flatbuffers-master/include/flatbuffers/minireflect.h:290:8: note: shadowed declaration is here
bool vector_delimited;
^
cc1plus: all warnings being treated as errors
make[2]: *** [CMakeFiles/flattests.dir/tests/test.cpp.o] Error 1
make[1]: *** [CMakeFiles/flattests.dir/all] Error 2
make: *** [all] Error 2

Attempted to follow: https://google.github.io/flatbuffers/flatbuffers_guide_building.html and ran:

CC=/opt/rh/devtoolset-4/root/usr/bin/cc CXX=/opt/rh/devtoolset-4/root/usr/bin/c++ cmake3 -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
CC=/opt/rh/devtoolset-4/root/usr/bin/cc CXX=/opt/rh/devtoolset-4/root/usr/bin/c++ make

Full system information:

Red Hat Enterprise Linux Server 7.2 (Maipo)
cmake3 version 3.5.2
GNU Make 3.82
gcc (GCC) 5.2.1

Thanks ahead of time for the help!

@llongi
Copy link
Contributor

llongi commented Mar 15, 2019

PR #5242 should fix this. Same issue as #5240.

@llongi llongi mentioned this issue Mar 15, 2019
@aardappel
Copy link
Collaborator

Has been fixed on master, thanks for reporting!

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

3 participants