Doggetto.com

September 11, 2010

Compiling HipHop on Ubuntu 10.04

Filed under: Technology — NoCoolName_Tom @ 11:41 pm

So I wanted to give HipHop a run-through. It seems like an awesome project to be able to write PHP and compile to C++ code (nice for me when I spend most of my non-school life in PHP). However, while following the Ubuntu build instructions I couldn’t make the project due to errors with ~/hiphop/hiphop-php/src/runtime/base/server/
libevent_server.cpp
on line 98 (evhttp_is_connection_ssl was undeclared I think). Sorry for the lack of more precision on the error – I’ve solved it and I’ve lost the display of the error on my terminal so I’m writing this post based on my bash history).

So I’m just writing this quick post for anyone else who is running into the same error: the way I got past the problem was to edit the file in question (~/hiphop/hiphop-php/src/runtime/base/server/
libevent_server.cpp
). I noticed that every other reference in the file to evhttp_is_connection_ssl was wrapped in a make ifdef instruction, so I copied the same instructions to surround line 98:

...
  LibEventTransport transport(server, request, m_id);
  #ifdef _EVENT_USE_OPENSSL
  if (evhttp_is_connection_ssl(job->request->evcon)) {
    transport.setSSL();
  }
  #endif
  bool error = true;
  std::string errorMsg;
...

After making that change the make operation, while incredibly long, went just fine. Now to see how well HipHop itself works!

2 Comments »

  1. Also unnoted on the build instructions are that the hphp executable is location at ~/hiphop/hiphop-php/src/hphp/hphp. That would have been nice to have known on the build page.

    Also if I sound like a Linux newb, it’s because when it comes to the real world of compiling complex stuff like this I am a total and complete newb. I’ve been raised on a steady died of yum and apt. I just hope this sort of post helps other people at the same level as me.

    Comment by NoCoolName_Tom — September 12, 2010 @ 12:04 am

  2. AND… it’s already been fixed in the source. So this is all out of date already. Thanks for reading! :-)

    Comment by NoCoolName_Tom — September 13, 2010 @ 6:01 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress