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

Fix building with clang and c++ headers from gcc-4.9 #11

Closed

Conversation

azat
Copy link
Contributor

@azat azat commented Jun 12, 2014

@ogoffart
Copy link
Contributor

Hi, I don't really understand the problem. I have no problem compiling with gcc 4.9 headers. (with clang 3.4.1)

What is the error you are getting?

@azat
Copy link
Contributor Author

azat commented Jun 13, 2014

On Fri, Jun 13, 2014 at 05:31:39AM -0700, Olivier Goffart wrote:

Hi, I don't really understand the problem. I have no problem compiling with gcc 4.9 headers. (with clang 3.4.1)

What is the error you are getting?

Hi Olivier,

Here is an example:
Scanning dependencies of target codebrowser_generator
Scanning dependencies of target codebrowser_generator
[ 12%] Building CXX object generator/CMakeFiles/codebrowser_generator.dir/annotator.cpp.o
[ 25%] Building CXX object generator/CMakeFiles/codebrowser_generator.dir/generator.cpp.o
In file included from /src/oss/woboq_codebrowser/generator/generator.cpp:22:
In file included from /src/oss/woboq_codebrowser/generator/generator.h:27:
In file included from /usr/lib/llvm-3.4/include/llvm/ADT/SmallString.h:17:
In file included from /usr/lib/llvm-3.4/include/llvm/ADT/SmallVector.h:17:
In file included from /usr/lib/llvm-3.4/include/llvm/Support/AlignOf.h:19:
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/cstddef:51:11: error: no member named 'max_align_t' in the global namespace
using ::max_align_t;

$ clang --version
Debian clang version 3.3-16 (branches/release_33) (based on LLVM 3.3)
Target: x86_64-pc-linux-gnu
Thread model: posix
$ g++ --version
g++ (Debian 4.8.3-2) 4.8.3
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

As you can see I have g++ 4.8, while headers from 4.9
(Partially my bad, I must write "with libstdc++ 4.9" not "gcc 4.9")

$ apt-file search 4.9/cstddef
libstdc++-4.9-dev: /usr/include/c++/4.9/cstddef


Reply to this email directly or view it on GitHub:
#11 (comment)

Respectfully
Azat Khuzhin

@azat
Copy link
Contributor Author

azat commented Jun 13, 2014

Seems that github are quote some part of new message, so be aware.

…efined

And when this header will be loaded before the one that have typedef of
max_align_t, then we will get an error, since in original place there is
no #ifdef only #define
@azat
Copy link
Contributor Author

azat commented Feb 24, 2015

I guess that this could be closed.

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

Successfully merging this pull request may close these issues.

None yet

2 participants