help building hiphop on centos 6.3
Hi!
I have a virtual machine were I installed centos 6.3 (64 bits). I want to build hiphop on it. I didn't specify the exact problem I'm facing at the time because I'm sure I will be facing one problem after the other until I get to actually build it / run it successfully.... plus I think it could be a useful guide for anyone attempting to do it. So.... where am I? I got the source from github, I have already built (with hiphop patches) libevent and curl. They are installed in /usr/local/libevent and /usr/local/curl. Now, when I try to run hphp's configure, this is what I get: Code:
$ ./configure So.... what am I to do? Thanks in advance. |
Seems like a problem with boost detection..... this is what I can show you about boost on the vm:
Code:
$ rpm -qa | grep boost |
Apparently, I was missing a different package: boost-devel. I installed it and now I'm seeing a different kind of error (that I think I can handle myself). I'll let you know if I hit another brickwall so stay tuned.
|
Ok.... another roadblock... now the problem is memcached:
Code:
$ ./configure Code:
$ rpm -qa | grep memcached |
By the way, I downloaded libmemcached 0.39 sources, compiled it and installed it in /usr/local/memcached (I used memcached instead of libmemcached for the prefix but anyways....).
I instructed ./configure to use it to find libraries but still says that it's an old version.... I'll double check it but just so you know how to set it: Code:
$ ./configure -DCMAKE_LIBRARY_PATH=/usr/local/memcached/lib/ ---------- Post added 07-11-12 at 06:00 PM ---------- I just checked and sources are 0.49. What the hell? I'll download 0.39 exactly and see what happens. |
Nope.... still not working.
$ ./configure -DCMAKE_LIBRARY_PATH=/usr/local/libmemcached-0.39/lib/ -- CMAKE_PREFIX_PATH was missing, proceeding anyway -- MySQL Include dir: /usr/include library dir: /usr/lib64/mysql -- MySQL client libraries: mysqlclient_r -- Found LIBMEMCACHED: /usr/local/libmemcached-0.39/lib/libmemcached.so CMake Error at CMake/HPHPFindLibs.cmake:46 (message): libmemcache is too old, found and we need 0.39 Call Stack (most recent call first): CMake/HPHPSetup.cmake:46 (include) src/CMakeLists.txt:18 (include) -- Configuring incomplete, errors occurred! |
Isn't that a path isue? Copy or link the new development lib versions to /usr/lib64/ if nothing else depends on memcache-devel-0.39?
|
Well well.... this is very interesting.... I checked inside the cmake script. When the libmemcached problem is reported "libmemcache is too old, found and we need 0.39", between "found" and "and", the libmemcached version that is actually found is reported.... and nothing is shown.... so I think the problem is in setting that variable (which is empty as you can see), don't you think? Let's try to see what's going on.
|
I hacked the CMake file that checks for libmemcached and this is where the config file is being searched:
Code:
File /usr/include/libmemcached/configure.h does not exist Code:
$ find /usr/local/libmemcached-0.39/ -iname 'configure.h' Code:
$ ./configure -DCMAKE_LIBRARY_PATH=/usr/local/libmemcached-0.39/lib/ -DCMAKE_INCLUDE_PATH=/usr/local/libmemcached-0.39/include/ |
I think I broke it with another -D parameter:
Code:
-DLIBMEMCACHED_INCLUDE_DIR=/usr/local/libmemcached-0.39/include/ |
Where can I find tbb for centos 6.3?
Code:
$ ./configure -DLIBMEMCACHED_LIBRARY_DIR=/usr/local/libmemcached-0.39/lib/ -DLIBMEMCACHED_INCLUDE_DIR=/usr/local/libmemcached-0.39/include/ -DLIBEVENT_LIB=/usr/local/libevent/lib/libevent.so -DCURL_LIBRARY=/usr/local/curl/lib/libcurl.so -DCURL_INCLUDE_DIR=/usr/local/curl/include/ Code:
# yum search tbb Code:
$ apt-cache search tbb |
Well well.... quite a journey so far. I have had to install a lot of packages (I'll list them later on).
I think I'm about to finish running ./configure and this is the error I see at the time: Code:
$ ./configure -DLIBMEMCACHED_LIBRARY_DIR=/usr/local/libmemcached-0.39/lib/ -DLIBMEMCACHED_INCLUDE_DIR=/usr/local/libmemcached-0.39/include/ -DLIBEVENT_LIB=/usr/local/libevent/lib/libevent.so -DCURL_LIBRARY=/usr/local/curl/lib/libcurl.so -DCURL_INCLUDE_DIR=/usr/local/curl/include/ -DTBB_INSTALL_DIR=/home/antoranz/tbb22_20090809oss -DTBB_INCLUDE_DIR=/home/antoranz/tbb22_20090809oss/include/ -DTBB_LIBRARY=/home/antoranz/tbb22_20090809oss/build/linux_intel64_gcc_cc4.4.6_libc2.12_kernel2.6.32_release/libtbb.so |
From last messages, I had to install pam-devel and specify the exact location of TBB_MALLOC_LIBRARY:
Code:
$ ./configure -DLIBMEMCACHED_LIBRARY_DIR=/usr/local/libmemcached-0.39/lib/ -DLIBMEMCACHED_INCLUDE_DIR=/usr/local/libmemcached-0.39/include/ -DLIBEVENT_LIB=/usr/local/libevent/lib/libevent.so -DCURL_LIBRARY=/usr/local/curl/lib/libcurl.so -DCURL_INCLUDE_DIR=/usr/local/curl/include/ -DTBB_INSTALL_DIR=/home/antoranz/tbb22_20090809oss -DTBB_INCLUDE_DIR=/home/antoranz/tbb22_20090809oss/include/ -DTBB_LIBRARY=/home/antoranz/tbb22_20090809oss/build/linux_intel64_gcc_cc4.4.6_libc2.12_kernel2.6.32_release/libtbb.so -DTBB_MALLOC_LIBRARY=/home/antoranz/tbb22_20090809oss/build/linux_intel64_gcc_cc4.4.6_libc2.12_kernel2.6.32_release/libtbbmalloc.so |
Ok... so it wasn't long before I hit a brickwall.
Code:
[ 2%] Building C object src/third_party/libafdt/CMakeFiles/afdt.dir/src/async.c.o ---------- Post added 07-11-12 at 09:19 PM ---------- in english, just in case: Code:
[ 2%] Building C object src/third_party/libafdt/CMakeFiles/afdt.dir/src/async.c.o |
Quote:
|
Which, by the way, doesn't make much sense because they were building it on centos and fedora (according to wikipedia). Anyway.... I'll keep on trying to find a way to build it and will post the method/hack once I find it.
|
The way I was able to move forward is check the corresponding cmake.flags were the build process is breaking and add this flag to C_FLAGS and CXX_FLAGS:
Code:
-I/usr/local/libevent/include |
I think the name of the files is flags.make. I'll tell you when I finish.
|
Well.... it finished compiling (great!) and I don't know what I did that was like doing a clean (damn!) so I'm building again.
Build libevent/curl with hiphop's patches (I placed them in /usr/local/libevent and /usr/local/curl). This is the list of things you have to install with yum: Code:
boost-devel http://www.nic.funet.fi/pub/mirrors/...epel/6/x86_64/ Code:
rpm -Uvh http://www.nic.funet.fi/pub/mirrors/fedora.redhat.com/pub/epel/6/x86_64/libmcrypt-2.5.8-9.el6.x86_64.rpm http://www.nic.funet.fi/pub/mirrors/fedora.redhat.com/pub/epel/6/x86_64/libmcrypt-devel-2.5.8-9.el6.x86_64.rpm I'll tell you what happens when I finish rebuilding. |
Oh, forgot to mention. tbb has to be built from src (not installed). Locations for tbb files are passed with configure variables as documented earlier in the thread.
Code:
$ src/hphp/hphp --help |
Comments : 1)
libmemcached-devel/libmemcached, a modified version 0.43 : The hiphop repo. rpm -ivh http://pkg.tag1consulting.com/hphp/x...el5.noarch.rpm Ref. https://github.com/facebook/hiphop-p...PM-on-CentOS-5 # yum install libmemcached-devel.x86_64 oniguruma-devel.x86_64 ( Don't know if the packages are too old ? ) 2) # yum install tbb-devel.x86_64 The tbb packages are in the EPEL.repo https://fedoraproject.org/wiki/EPEL Links https://github.com/facebook/hiphop-php/wiki/_pages . |
Ok, guys.... I've had a lot of fun with hiphop. Given a certain requirement in our project I was adviced to give hhvm a look so now I'm trying to compile the vm branch of hiphop (https://github.com/facebook/hiphop-php/tree/vm).
When configuring I had problems because libdwarf is not found. As far as I can tell, it should be included in elfutils-devel, right? this package is already installed but configure fails to see it. What I did was create a symlink to /usr/lib64/libdw-0.152.so (which contains a lot of dwarf symbols) named /usr/lib/libdwarf.so and then configure was able to move on and finish, however when I try to build I get this: Code:
In file included from /home/antoranz/hiphop-vm/src/runtime/vm/instance.h:26, |
libdwarf.so , Debian, Ubuntu : package name = libdwarf-dev
( Source code package = dwarfutils http://packages.ubuntu.com/precise/libdwarf-dev ). Fedora etc. : package name = libdwarf-devel ( Source code package = libdwarf-<version>.src.rpm ). . |
All times are GMT -5. The time now is 04:00 AM. |