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 error: missing binary operator before token "(" #1842

Closed
vvovvo opened this issue Mar 13, 2018 · 5 comments
Closed

compile error: missing binary operator before token "(" #1842

vvovvo opened this issue Mar 13, 2018 · 5 comments
Milestone

Comments

@vvovvo
Copy link

vvovvo commented Mar 13, 2018

I got missing binary operator before token "(" when running make. cmake successfully completed but it stuck at the make step. Any suggestion will be appreciated.

It is on a Ubuntu 14.04, GNU Make 3.18, cmake version 3.11.0-rc3.
Details of the error:

vv@pggis:~/pdal/build$ make 
Scanning dependencies of target pdal_boost
[  0%] Building CXX object vendor/pdalboost/CMakeFiles/pdal_boost.dir/libs/system/src/error_code.cpp.o
[  0%] Building CXX object vendor/pdalboost/CMakeFiles/pdal_boost.dir/libs/filesystem/src/codecvt_error_category.cpp.o
[  0%] Building CXX object vendor/pdalboost/CMakeFiles/pdal_boost.dir/libs/filesystem/src/operations.cpp.o
[  1%] Building CXX object vendor/pdalboost/CMakeFiles/pdal_boost.dir/libs/filesystem/src/path.cpp.o
[  1%] Building CXX object vendor/pdalboost/CMakeFiles/pdal_boost.dir/libs/filesystem/src/path_traits.cpp.o
[  1%] Building CXX object vendor/pdalboost/CMakeFiles/pdal_boost.dir/libs/filesystem/src/portability.cpp.o
[  2%] Building CXX object vendor/pdalboost/CMakeFiles/pdal_boost.dir/libs/filesystem/src/unique_path.cpp.o
[  2%] Building CXX object vendor/pdalboost/CMakeFiles/pdal_boost.dir/libs/filesystem/src/utf8_codecvt_facet.cpp.o
[  2%] Linking CXX static library ../../lib/libpdal_boost.a
[  2%] Built target pdal_boost
Scanning dependencies of target pdal_util
[  2%] Building CXX object pdal/util/CMakeFiles/pdal_util.dir/Bounds.cpp.o
[  2%] Building CXX object pdal/util/CMakeFiles/pdal_util.dir/Charbuf.cpp.o
[  3%] Building CXX object pdal/util/CMakeFiles/pdal_util.dir/FileUtils.cpp.o
[  3%] Building CXX object pdal/util/CMakeFiles/pdal_util.dir/Georeference.cpp.o
[  3%] Building CXX object pdal/util/CMakeFiles/pdal_util.dir/Utils.cpp.o
/home/vv/pdal/pdal/util/Utils.cpp:47:18: error: missing binary operator before token "("
 #if __has_include(<execinfo.h>)
                  ^
/home/vv/pdal/pdal/util/Utils.cpp:608:18: error: missing binary operator before token "("
 #if __has_include(<execinfo.h>)
                  ^
make[2]: *** [pdal/util/CMakeFiles/pdal_util.dir/Utils.cpp.o] Error 1
make[1]: *** [pdal/util/CMakeFiles/pdal_util.dir/all] Error 2
make: *** [all] Error 2
@abellgithub
Copy link
Contributor

You're going to need GCC 5. Install it or upgrade to Ubuntu 16.04.

Perhaps easier, you could also remove the __has_include directives around those header files, since they exist on your platform.

@abellgithub
Copy link
Contributor

I changed the code and checked that it builds with GCC 4.8 on Ubuntu 14.04. I'd still recommend getting an up-to-date compiler if you're going to build things from source. Hope that helps.

@vvovvo
Copy link
Author

vvovvo commented Mar 15, 2018

That's greatly helpful! Much thanks.

@hobu hobu added this to the 1.7 milestone Mar 15, 2018
@qiongqiong520
Copy link

i changed the code and checked that itbuildwithgcc4.8 on ubuntu 14.04 .I'd stillrecommendgetting an up-to-date compiler if you 're going to build things from source .Hope that helps.
meet the same problem.

@manmeet3591
Copy link

i changed the code and checked that itbuildwithgcc4.8 on ubuntu 14.04 .I'd stillrecommendgetting an up-to-date compiler if you 're going to build things from source .Hope that helps.
meet the same problem.

Thank you very much. Using an up-to-date compiler worked.

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

5 participants