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

Build failure on clang/libc++ 4.0 #937

Closed
copumpkin opened this issue Apr 4, 2017 · 4 comments
Closed

Build failure on clang/libc++ 4.0 #937

copumpkin opened this issue Apr 4, 2017 · 4 comments

Comments

@copumpkin
Copy link

I'm attempting to build 2.8 against clang and libc++ 4.0 but am getting immediate build errors:

$ make
Scanning dependencies of target rtags
[  1%] Building CXX object src/CMakeFiles/rtags.dir/ClangIndexer.cpp.o
In file included from /private/var/folders/vv/17b_hycx691699h20v458fnh0000gn/T/nix-build-rtags-2.8-p1.drv-0/rtags-f85bd60/src/ClangIndexer.cpp:17:
In file included from /private/var/folders/vv/17b_hycx691699h20v458fnh0000gn/T/nix-build-rtags-2.8-p1.drv-0/rtags-f85bd60/src/ClangIndexer.h:20:
In file included from /private/var/folders/vv/17b_hycx691699h20v458fnh0000gn/T/nix-build-rtags-2.8-p1.drv-0/rtags-f85bd60/src/Token.h:19:
In file included from /private/var/folders/vv/17b_hycx691699h20v458fnh0000gn/T/nix-build-rtags-2.8-p1.drv-0/rtags-f85bd60/src/rct/rct/Serializer.h:12:
In file included from /private/var/folders/vv/17b_hycx691699h20v458fnh0000gn/T/nix-build-rtags-2.8-p1.drv-0/rtags-f85bd60/src/rct/rct/Hash.h:5:
In file included from /nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/unordered_map:369:
In file included from /nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/__hash_table:19:
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:313:9: error: no member named 'signbit' in the global namespace
using ::signbit;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:314:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:315:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
      ~~^
/nix/store/759w4ay4qf3lpmash8bglgsizz66n2gr-MacOS_SDK-10.10/include/math.h:718:12: note: 'finite' declared here
extern int finite(double) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
           ^
In file included from /private/var/folders/vv/17b_hycx691699h20v458fnh0000gn/T/nix-build-rtags-2.8-p1.drv-0/rtags-f85bd60/src/ClangIndexer.cpp:17:
In file included from /private/var/folders/vv/17b_hycx691699h20v458fnh0000gn/T/nix-build-rtags-2.8-p1.drv-0/rtags-f85bd60/src/ClangIndexer.h:20:
In file included from /private/var/folders/vv/17b_hycx691699h20v458fnh0000gn/T/nix-build-rtags-2.8-p1.drv-0/rtags-f85bd60/src/Token.h:19:
In file included from /private/var/folders/vv/17b_hycx691699h20v458fnh0000gn/T/nix-build-rtags-2.8-p1.drv-0/rtags-f85bd60/src/rct/rct/Serializer.h:12:
In file included from /private/var/folders/vv/17b_hycx691699h20v458fnh0000gn/T/nix-build-rtags-2.8-p1.drv-0/rtags-f85bd60/src/rct/rct/Hash.h:5:
In file included from /nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/unordered_map:369:
In file included from /nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/__hash_table:19:
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:316:9: error: no member named 'isinf' in the global namespace
using ::isinf;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:317:9: error: no member named 'isnan' in the global namespace
using ::isnan;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:318:9: error: no member named 'isnormal' in the global namespace
using ::isnormal;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:319:9: error: no member named 'isgreater' in the global namespace
using ::isgreater;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:320:9: error: no member named 'isgreaterequal' in the global namespace
using ::isgreaterequal;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:321:9: error: no member named 'isless' in the global namespace
using ::isless;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:322:9: error: no member named 'islessequal' in the global namespace
using ::islessequal;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:323:9: error: no member named 'islessgreater' in the global namespace
using ::islessgreater;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:324:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
/nix/store/cl5xf788rlhc290cx69vhw1jlm929jj9-libc++-4.0.0/include/c++/v1/cmath:325:9: error: no member named 'isunordered' in the global namespace
using ::isunordered;
      ~~^
13 errors generated.
make[2]: *** [src/CMakeFiles/rtags.dir/build.make:63: src/CMakeFiles/rtags.dir/ClangIndexer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:198: src/CMakeFiles/rtags.dir/all] Error 2
make: *** [Makefile:128: all] Error 2

I'm using Nix to provide clang and libc++ so there's a slight chance that it's something strange about my environment, but it seems to work for everything else so it seems unlikely. Happy to try on a more traditional setup if this proves difficult to reproduce.

@copumpkin
Copy link
Author

Oh I think it's actually a bug in my (wrapper) build script, not in this package. Sorry!

@hyc
Copy link

hyc commented Apr 12, 2017

What was your error and fix? I just hit the same problem, google led me here.

@copumpkin
Copy link
Author

@hyc in my case, I had some machinery that was inserting a traditional C-only math.h earlier in the search path than the same file from libc++. libc++ expects its "wrapper" math.h to come early so that it can #include_next the standard C math.h and wrap the functions in there properly.

@hyc
Copy link

hyc commented Apr 12, 2017

Thanks, that helps.

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