hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

ICC compile problem

Open anhel opened this issue 16 years ago • 5 comments

Can you please tell how to solve this problem with icc: /usr/include/c++/4.5.1/tr1/tuple(77): error: too few arguments for class template "std::tr1::_Tuple_impl" struct _Tuple_impl<_Idx> { }; ... compilation aborted for hiphop/hiphop-php/src/third_party/xhp/xhp/code_rope.cpp (code 4) Last time i did smth with this but don't remember. Icc can't compile gcc tuple sources. CC=icc CXX=icpc cmake .

anhel avatar Nov 04 '10 00:11 anhel

We don't support ICC yet, you can build xhp separately and install it into CMAKE_PREFIX_PATH as a test.

scottmac avatar Nov 04 '10 18:11 scottmac

I figured out some problems. icc 11 has very weak support of c++0x and produces errors with gcc 4.5 headers that supports lots of new things. Finally i got compiled both hiphop (except xhp) and php files with icc. And performance gain is about 5-10% to regular version. In order to compile by icc without problems gcc needs to be degraded to 4.4. Or soon intel releases 12 version and they promise to give full support of c++0x.

anhel avatar Nov 04 '10 21:11 anhel

So if everything works why not add icc support out of box? There is just couple of changings to be made to cmake files. You might force xhp cmakelist use g++ if intel compiler is set. Thats will solve all icc problems and compile goes great.

anhel avatar Nov 05 '10 00:11 anhel

You can install XHP manually and it will detect it in cmake

if it finds libxhp.so in ~/lib/ and xhp_preprocess.hpp in ~/include/ then it will skip the bundled copy.

scottmac avatar Nov 05 '10 01:11 scottmac

But this makes it shared. I've done modification to cmake to work with gcc, thats looks better. Anyway 21d9418e1544e575924f commit makes hiphop compiler not working because of using tr1. even with -std=c++0x.

anhel avatar Nov 05 '10 01:11 anhel