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

Traits.h std::* declarations conflicts #75

Closed
mcuelenaere opened this issue Jul 13, 2014 · 3 comments
Closed

Traits.h std::* declarations conflicts #75

mcuelenaere opened this issue Jul 13, 2014 · 3 comments

Comments

@mcuelenaere
Copy link

Traits.h defines classes std::{pair,basic_string,vector,deque,list,set,map,shared_ptr}, however when compiling HHVM on OS X 10.9 (using clang and libc++) this results in conflicts à la:

In file included from hphp.y:11:
In file included from /Users/mcuelenaere/Projects/hhvm/hphp/compiler/parser/parser.h:23:
In file included from /Users/mcuelenaere/Projects/hhvm/hphp/runtime/base/exceptions.h:25:
In file included from /Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/String.h:34:
In file included from /Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/Conv.h:27:
/Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/FBString.h:911:8: error: too few template arguments for class template 'basic_string'
  std::basic_string<Char> backend_;
       ^
/Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/Traits.h:245:9: note: template is declared here
  class basic_string;
        ^
In file included from hphp.y:11:
In file included from /Users/mcuelenaere/Projects/hhvm/hphp/compiler/parser/parser.h:23:
In file included from /Users/mcuelenaere/Projects/hhvm/hphp/runtime/base/exceptions.h:25:
In file included from /Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/String.h:34:
In file included from /Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/Conv.h:30:
In file included from /Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/Range.h:28:
/usr/local/include/glog/logging.h:1193:19: error: too few template arguments for class template 'vector'
             std::vector<std::string>* outvec);
                  ^
/Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/Traits.h:251:9: note: template is declared here
  class vector;
        ^
In file included from hphp.y:11:
In file included from /Users/mcuelenaere/Projects/hhvm/hphp/compiler/parser/parser.h:23:
In file included from /Users/mcuelenaere/Projects/hhvm/hphp/runtime/base/exceptions.h:25:
In file included from /Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/String.h:34:
In file included from /Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/Conv.h:30:
In file included from /Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/Range.h:28:
/usr/local/include/glog/logging.h:1433:33: error: too few template arguments for class template 'vector'
GOOGLE_GLOG_DLL_DECL const std::vector<std::string>& GetLoggingDirectories();
                                ^
/Users/mcuelenaere/Projects/hhvm/third-party/folly/folly/Traits.h:251:9: note: template is declared here
  class vector;
        ^

I hackfixed these with this diff:

iff --git a/folly/Traits.h b/folly/Traits.h
index 2b94df1..eaed2c3 100644
--- a/folly/Traits.h
+++ b/folly/Traits.h
@@ -235,6 +235,7 @@ template <class T> struct IsZeroInitializable
  * although that is not guaranteed by the standard.
  */

+#if 0
 FOLLY_NAMESPACE_STD_BEGIN

 template <class T, class U>
@@ -260,6 +261,16 @@ template <class T>
   class shared_ptr;

 FOLLY_NAMESPACE_STD_END
+#else
+#include <utility>
+#include <string>
+#include <vector>
+#include <deque>
+#include <list>
+#include <set>
+#include <map>
+#include <memory>
+#endif

 namespace boost {

however, I'm unsure if this is the right approach.

facebook-github-bot pushed a commit to facebook/hhvm that referenced this issue Jul 26, 2014
Summary: These commits allow compiling HHVM on OS X 10.9 with its native clang compiler.

This also requires #3159, facebook/folly#75 and hhvm/hhvm-third-party#18.

CMake config:
```bash
cmake .. \
    -DLIBIBERTY_LIB=$(brew --prefix binutilsfb)/lib/x86_64/libiberty.a \
    -DLIBEVENT_LIB=$(brew --prefix libevent)/lib/libevent.dylib \
    -DLIBEVENT_INCLUDE_DIR=$(brew --prefix libevent)/include \
    -DICU_INCLUDE_DIR=$(brew --prefix icu4c)/include \
    -DICU_LIBRARY=$(brew --prefix icu4c)/lib/libicuuc.dylib \
    -DICU_I18N_LIBRARY=$(brew --prefix icu4c)/lib/libicui18n.dylib \
    -DICU_DATA_LIBRARY=$(brew --prefix icu4c)/lib/libicudata.dylib \
    -DREADLINE_INCLUDE_DIR=$(brew --prefix readline)/include \
    -DREADLINE_LIBRARY=$(brew --prefix readline)/lib/libreadline.dylib \
    -DCURL_INCLUDE_DIR=$(brew --prefix curl)/include \
    -DCURL_LIBRARY=$(brew --prefix curl)/lib/libcurl.dylib \
    -DBOOST_INCLUDE

Closes #3182

Reviewed By: @ptarjan

Differential Revision: D1432897

Pulled By: svcscm
@mcuelenaere
Copy link
Author

@denji thanks, I've opened #81

@ghost
Copy link

ghost commented Apr 7, 2015

Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.

@ghost
Copy link

ghost commented May 7, 2015

Thank you for your patience. After 30 days with no updates from the core team, we're closing out the issue. If you're still experiencing the problem described, please reopen the issue - thanks!

This issue was 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

No branches or pull requests

1 participant