LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   help building hiphop on centos 6.3 (https://www.linuxquestions.org/questions/programming-9/help-building-hiphop-on-centos-6-3-a-4175416201/)

eantoranz 07-11-2012 03:21 PM

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
-- CMAKE_PREFIX_PATH was missing, proceeding anyway
CMake Error at CMake/FindBoost.cmake:640 (if):
  if had incorrect arguments: ${Boost_MINOR_VERSION} GREATER 41 AND NOT WIN32
  AND NOT APPLE (Unknown arguments specified).
Call Stack (most recent call first):
  CMake/HPHPFindLibs.cmake:22 (find_package)
  CMake/HPHPSetup.cmake:46 (include)
  src/CMakeLists.txt:18 (include)


-- Configuring incomplete, errors occurred!

I have already set CMAKE_PREFIX_PATH to hphp's directory.

So.... what am I to do? Thanks in advance.

eantoranz 07-11-2012 03:32 PM

Seems like a problem with boost detection..... this is what I can show you about boost on the vm:

Code:

$ rpm -qa | grep boost
boost-filesystem-1.41.0-11.el6_1.2.x86_64
boost-thread-1.41.0-11.el6_1.2.x86_64
boost-graph-1.41.0-11.el6_1.2.x86_64
boost-signals-1.41.0-11.el6_1.2.x86_64
boost-test-1.41.0-11.el6_1.2.x86_64
boost-program-options-1.41.0-11.el6_1.2.x86_64
boost-system-1.41.0-11.el6_1.2.x86_64
boost-date-time-1.41.0-11.el6_1.2.x86_64
boost-regex-1.41.0-11.el6_1.2.x86_64
boost-wave-1.41.0-11.el6_1.2.x86_64
boost-python-1.41.0-11.el6_1.2.x86_64
boost-serialization-1.41.0-11.el6_1.2.x86_64
boost-iostreams-1.41.0-11.el6_1.2.x86_64
boost-1.41.0-11.el6_1.2.x86_64


eantoranz 07-11-2012 03:38 PM

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.

eantoranz 07-11-2012 03:46 PM

Ok.... another roadblock... now the problem is memcached:

Code:

$ ./configure
-- 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/lib64/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!

SO the problem is (apparently) libmemchached's version.... this is the one I have:
Code:

$ rpm -qa | grep memcached
memcached-1.4.4-3.el6.x86_64
libmemcached-devel-0.31-1.1.el6.x86_64
libmemcached-0.31-1.1.el6.x86_64

Well, well.... so I need version 0.39 and centos has 0.31 available through yum. What can I do to get a newer version?

eantoranz 07-11-2012 03:59 PM

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/
-- CMAKE_PREFIX_PATH was missing, proceeding anyway
-- MySQL Include dir: /usr/include  library dir: /usr/lib64/mysql
-- MySQL client libraries: mysqlclient_r
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!



---------- 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.

eantoranz 07-11-2012 04:09 PM

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!

unSpawn 07-11-2012 04:09 PM

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?

eantoranz 07-11-2012 04:13 PM

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.

eantoranz 07-11-2012 04:31 PM

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
So libmemcached's configure.h file is not checked for at the right location. The file is here:

Code:

$ find /usr/local/libmemcached-0.39/ -iname 'configure.h'
/usr/local/libmemcached-0.39/include/libhashkit/configure.h
/usr/local/libmemcached-0.39/include/libmemcached/configure.h

I could just hack the file and specify that path directly. Is there a more elegant way to do it? (I already tried setting CMAKE_INCLUDE_PATH but didn't work:

Code:

$ ./configure -DCMAKE_LIBRARY_PATH=/usr/local/libmemcached-0.39/lib/ -DCMAKE_INCLUDE_PATH=/usr/local/libmemcached-0.39/include/
-- CMAKE_PREFIX_PATH was missing, proceeding anyway
-- MySQL Include dir: /usr/include  library dir: /usr/lib64/mysql
-- MySQL client libraries: mysqlclient_r
CMake Error at CMake/FindLibmemcached.cmake:33 (message):
  File /usr/include/libmemcached/configure.h does not exist
Call Stack (most recent call first):
  CMake/HPHPFindLibs.cmake:41 (find_package)
  CMake/HPHPSetup.cmake:46 (include)
  src/CMakeLists.txt:18 (include)


-- Configuring incomplete, errors occurred!


eantoranz 07-11-2012 04:35 PM

I think I broke it with another -D parameter:

Code:

-DLIBMEMCACHED_INCLUDE_DIR=/usr/local/libmemcached-0.39/include/

eantoranz 07-11-2012 04:49 PM

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/
-- CMAKE_PREFIX_PATH was missing, proceeding anyway
-- MySQL Include dir: /usr/include  library dir: /usr/lib64/mysql
-- MySQL client libraries: mysqlclient_r
-- Found libevent: /usr/local/libevent/lib/libevent.so
-- Found GD: /usr/lib64/libgd.so
-- Found ICU header files in /usr/include
-- Found ICU libraries: /usr/lib64/libicuuc.so
-- Can't find jemalloc
-- Can't find minimal tcmalloc
ERROR: Unable to find Intel TBB install directory.
CMake Error at CMake/HPHPFindLibs.cmake:206 (if):
  if had incorrect arguments: ${TBB_INTERFACE_VERSION} LESS 3016 (Unknown
  arguments specified).
Call Stack (most recent call first):
  CMake/HPHPSetup.cmake:46 (include)
  src/CMakeLists.txt:18 (include)


-- Configuring incomplete, errors occurred!

I don't see it in yum:

Code:

# yum search tbb
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: centos-mirror.hostdime.com.br
 * extras: centos-mirror.hostdime.com.br
 * updates: centos-mirror.hostdime.com.br
Warning: No matches found for: tbb
No Matches found
# yum search libtbb
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: centos-mirror.hostdime.com.br
 * extras: centos-mirror.hostdime.com.br
 * updates: centos-mirror.hostdime.com.br
Warning: No matches found for: libtbb
No Matches found
# yum search tbb2
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: centos-mirror.hostdime.com.br
 * extras: centos-mirror.hostdime.com.br
 * updates: centos-mirror.hostdime.com.br
Warning: No matches found for: tbb2
No Matches found
# yum search libtbb2
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: centos-mirror.hostdime.com.br
 * extras: centos-mirror.hostdime.com.br
 * updates: centos-mirror.hostdime.com.br
Warning: No matches found for: libtbb2
No Matches found

And I checked in ubuntu and there is a package for it:

Code:

$ apt-cache search tbb
libtbb-dev - parallelism library for C++ - development files
libtbb-doc - parallelism library for C++ - documentation
libtbb2 - parallelism library for C++ - runtime files
libtbb2-dbg - parallelism library for C++ - debugging symbols
tbb-examples - parallelism library for C++ - example files


eantoranz 07-11-2012 06:42 PM

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
-- CMAKE_PREFIX_PATH was missing, proceeding anyway
-- MySQL Include dir: /usr/include  library dir: /usr/lib64/mysql
-- MySQL client libraries: mysqlclient_r
-- Found libevent: /usr/local/libevent/lib/libevent.so
-- Found GD: /usr/lib64/libgd.so
-- Found ICU header files in /usr/include
-- Found ICU libraries: /usr/lib64/libicuuc.so
-- Can't find jemalloc
-- Can't find minimal tcmalloc
-- [Warning] FindTBB.cmake: The use of TBB_ARCHITECTURE and TBB_COMPILER is deprecated and may not be supported in future versions. Please set  (using tbbvars.[bat|csh|sh]).
-- Found Intel TBB
-- Found mcrypt: /usr/lib64/libmcrypt.so
-- Looking for arpa/inet.h
-- Looking for arpa/inet.h - found
-- Looking for netinet/in.h
-- Looking for netinet/in.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for string.h
-- Looking for string.h - found
-- Looking for sys/socket.h
-- Looking for sys/socket.h - found
-- Looking for sys/time.h
-- Looking for sys/time.h - found
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of size_t
-- Check size of size_t - done
-- Check size of ssize_t
-- Check size of ssize_t - done
-- Check size of uint32_t
-- Check size of uint32_t - done
-- Check size of uint8_t
-- Check size of uint8_t - done
-- Looking for AF_LOCAL
-- Looking for AF_LOCAL - found
-- Looking for PF_LOCAL
-- Looking for PF_LOCAL - found
-- Looking for memset
-- Looking for memset - found
-- Looking for socket
-- Looking for socket - found
-- Looking for strerror
-- Looking for strerror - found
-- Found libevent: /usr/local/libevent/lib/libevent.so
-- Looking for event_get_version_number
-- Looking for event_get_version_number - not found.
-- Performing Test HAVE_LIBEVENT_145
-- Performing Test HAVE_LIBEVENT_145 - Failed
-- Performing Test HAVE_LIBEVENT_143
-- Performing Test HAVE_LIBEVENT_143 - Failed
CMake Error at src/third_party/libafdt/CMakeLists.txt:69 (message):
  Couldn't find at least libevent 1.4.3+


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PAM_INCLUDE_PATH (ADVANCED)
  used as include directory in directory /home/antoranz/hiphop-php/src
  used as include directory in directory /home/antoranz/hiphop-php/src/third_party/xhp/xhp
  used as include directory in directory /home/antoranz/hiphop-php/src/third_party/libafdt

-- Configuring incomplete, errors occurred!


eantoranz 07-11-2012 06:58 PM

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
I'm building at the moment.... let's see what happens.

eantoranz 07-11-2012 07:19 PM

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
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:11:19: error: event.h: No existe el fichero o el directorio
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:33: error: el campo ‘ev’ tiene tipo de dato incompleto
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c: En la función ‘server_handle_client_read’:
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:83: error: ‘EV_READ’ no se declaró aquí (primer uso en esta función)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:83: error: (Cada identificador no declarado solamente se reporta una vez
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:83: error: para cada funcion en la que aparece.)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c: En la función ‘server_handle_accept_read’:
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:134: error: ‘EV_READ’ no se declaró aquí (primer uso en esta función)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c: En la función ‘afdt_create_server’:
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:222: error: ‘EV_READ’ no se declaró aquí (primer uso en esta función)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:222: error: ‘EV_PERSIST’ no se declaró aquí (primer uso en esta función)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c: En la función ‘client_handle_read’:
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:267: error: ‘EV_TIMEOUT’ no se declaró aquí (primer uso en esta función)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:274: error: ‘EV_READ’ no se declaró aquí (primer uso en esta función)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c: En la función ‘afdt_create_client’:
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:338: error: ‘EV_READ’ no se declaró aquí (primer uso en esta función)
make[2]: *** [src/third_party/libafdt/CMakeFiles/afdt.dir/src/async.c.o] Error 1
make[1]: *** [src/third_party/libafdt/CMakeFiles/afdt.dir/all] Error 2
make: *** [all] Error 2

Is there a way I can tell make to include /usr/local/libevent/include/event.h in the compilation process? Perhaps setting another variable when calling ./configure?

---------- 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
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:11:19: error: event.h: No such file or directory
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:33: error: field 'ev' has incomplete type
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c: In function 'server_handle_client_read':
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:83: error: 'EV_READ' undeclared (first use in this function)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:83: error: (Each undeclared identifier is reported only once
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:83: error: for each function it appears in.)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c: In function 'server_handle_accept_read':
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:134: error: 'EV_READ' undeclared (first use in this function)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c: In function 'afdt_create_server':
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:222: error: 'EV_READ' undeclared (first use in this function)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:222: error: 'EV_PERSIST' undeclared (first use in this function)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c: In function 'client_handle_read':
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:267: error: 'EV_TIMEOUT' undeclared (first use in this function)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:274: error: 'EV_READ' undeclared (first use in this function)
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c: In function 'afdt_create_client':
/home/antoranz/hiphop-php/src/third_party/libafdt/src/async.c:338: error: 'EV_READ' undeclared (first use in this function)
make[2]: *** [src/third_party/libafdt/CMakeFiles/afdt.dir/src/async.c.o] Error 1
make[1]: *** [src/third_party/libafdt/CMakeFiles/afdt.dir/all] Error 2
make: *** [all] Error 2


unSpawn 07-12-2012 03:25 AM

Quote:

Originally Posted by eantoranz (Post 4725554)
Is there a way I can tell make to include /usr/local/libevent/include/event.h in the compilation process? Perhaps setting another variable when calling ./configure?

Usually the latter should have been the case if 'configure --help' shows it honors switches like "--with-libevent-includes=", else exporting export CFLAGS="-I/usr/local/libevent/include/" before running configure could work. FWIW from your thread it's not clear if most problems have been due to older software versions RHEL uses versus brand new software required by hphp or lack of distribution-agnostic approach of the hphp build process itself but it's kind of telling the build instructions its Github offers are only for Ubuntu and BSD.

eantoranz 07-12-2012 08:50 AM

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.

eantoranz 07-12-2012 09:28 AM

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'm already at 26% in the building process.

eantoranz 07-12-2012 10:12 AM

I think the name of the files is flags.make. I'll tell you when I finish.

eantoranz 07-12-2012 10:40 AM

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
mysql-devel
libmemcached-devel
pcre-devel
gd-devel
libxml2-devel
expat-devel
libicu-devel
bzip2-devel
oniguruma-devel
openldap-devel
readline-devel
libc-client-devel
libcap-devel
binutils-devel
pam-devel

Then, you have to get libmcrypt's current rpms. Use rpm directly agains the files in one of the mirrors... like:
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
Use the flags for ./configure, hack the flags.make files to add the libevent include (I'm sure there's one way to do that from ./configure but I don't want to spend more time on it) and you are done (or veeeeeeeeeeeeeeery close). Hope it does it for you.

I'll tell you what happens when I finish rebuilding.

eantoranz 07-12-2012 11:37 AM

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
HipHop Compiler for PHP Usage:

        hphp <options> <inputs>

Options:
  --help                        display this message
  --version                      display version number
  -t [ --target ] arg (=run)    lint | analyze | php | cpp | sep-ext-cpp |
                                filecache | run (default)
  -f [ --format ] arg            lint: (none);
                                analyze: (none);
                                php: trimmed (default) | inlined | pickled |
                                typeinfo | <any combination of them by any
                                separator>;
                                cpp: cluster (default) | file | sys | exe |
                                lib;
                                run: cluster (default) | file
  --cluster-count arg (=0)      Cluster by file sizes and output roughly these
                                many number of files. Use 0 for no clustering.
  --input-dir arg                input directory
  --program arg (=program)      final program name to use
  --args arg                    program arguments
  -i [ --inputs ] arg            input file names
  --input-list arg              file containing list of file names, one per
                                line
  --include-path arg            a list of full paths to search for files being
                                included in includes or requires but cannot be
                                found assuming relative paths
  --module arg                  directories containing all input files
  --exclude-dir arg              directories to exclude from the input
  --fmodule arg                  same with module, except no exclusion checking
                                is performed, so these modules are forced to
                                be included
  --ffile arg                    extra PHP files forced to include without
                                exclusion checking
  --exclude-file arg            files to exclude from the input, even if
                                parse-on-demand finds it
  --exclude-pattern arg          regex (in 'find' command's regex command line
                                option format) of files or directories to
                                exclude from the input, even if parse-on-deman
                                d finds it
  --exclude-static-pattern arg  regex (in 'find' command's regex command line
                                option format) of files or directories to
                                exclude from static content cache
  --exclude-static-dir arg      directories to exclude from static content
                                cache
  --exclude-static-file arg      files to exclude from static content cache
  --cfile arg                    extra static files forced to include without
                                exclusion checking
  --cmodule arg                  extra directories for static files without
                                exclusion checking
  --parse-on-demand arg (=1)    whether to parse files that are not specified
                                from command line
  --branch arg                  SVN branch
  --revision arg                SVN revision
  -o [ --output-dir ] arg        output directory
  --output-file arg              output file
  --sync-dir arg                Files will be created in this directory first,
                                then sync with output directory without overwr
                                iting identical files. Great for incremental
                                compilation and build.
  --optimize-level arg (=1)      optimization level
  --gen-stats arg (=0)          whether to generate code errors
  -k [ --keep-tempdir ] arg (=0) whether to keep the temporary directory
  --db-stats arg                database connection string to save code errors
                                : <username>:<password>@<host>:<port>/<db>
  --no-type-inference arg (=0)  turn off type inference for C++ code generatio
                                n
  --no-min-include arg (=0)      turn off minimium include analysis when target
                                is "analyze"
  --no-meta-info arg (=0)        do not generate class map, function jump table
                                and macros when generating code; good for demo
                                purposes
  -c [ --config ] arg            config file name
  --config-dir arg              root directory configuration is based on (for
                                example, excluded directories may be relative
                                path in configuration.
  -v [ --config-value ] arg      individual configuration string in a format of
                                name=value, where name can be any valid config
                                uration for a config file
  -l [ --log ] arg (=-1)        -1: (default); 0: no logging; 1: errors only;
                                2: warnings and errors; 3: informational as
                                well; 4: really verbose.
  --force arg (=1)              force to ignore code generation errors and
                                continue compilations
  --file-cache arg              if specified, generate a static file cache
                                with this file name
  --rtti-directory arg          the directory of rtti profiling data
  --java-root arg (=php)        the root package of generated Java FFI classes
  --generate-ffi arg (=0)        generate ffi stubs
  --dump arg (=0)                dump the program graph
  --docjson arg                  Filename to generate a JSON file for PHP docs
  --coredump arg (=0)            turn on coredump
  --nofork arg (=0)              forking is needed for large compilation to
                                release memory before g++compilation. turning
                                off forking can help gdb debugging.
  --fl-annotate arg (=0)        Annote emitted source with compiler file-line
                                info
  --opts arg (=none)            Set optimizations to enable/disable
  --ppp arg                      Preprocessed partition configuration. To speed
                                up distcc compilation, bin/ppp.php can pre-com
                                pute better partition between different .cpp
                                files according to preprocessed file sizes,
                                instead of original file sizes (default). Run
                                bin/ppp.php to generate an HDF configuration
                                file to specify here.
  --compiler-id                  display the git hash for the compiler id
  --taint-status                check if the compiler was built with taint
                                enabled

I think this is a "solved" thread. Hope it is helpful for other people.

knudfl 07-12-2012 12:24 PM

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

.

eantoranz 07-24-2012 12:05 PM

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,
                from /home/antoranz/hiphop-vm/src/runtime/base/resource_data.h:22,
                from /home/antoranz/hiphop-vm/src/runtime/base/execution_context.h:23,
                from /home/antoranz/hiphop-vm/src/runtime/base/builtin_functions.h:20,
                from /home/antoranz/hiphop-vm/src/runtime/base/program_functions.cpp:20:
/home/antoranz/hiphop-vm/src/runtime/vm/unit.h:20:42: error: tbb/concurrent_unordered_map.h: No such file or directory
In file included from /home/antoranz/hiphop-vm/src/runtime/base/program_functions.cpp:25:
/home/antoranz/hiphop-vm/src/runtime/base/compiler_id.h:1:1: warning: "COMPILER_ID" redefined
<command-line>: warning: this is the location of the previous definition
In file included from /home/antoranz/hiphop-vm/src/runtime/vm/debug/debug.h:22,
                from /home/antoranz/hiphop-vm/src/runtime/vm/translator/translator-x64.h:29,
                from /home/antoranz/hiphop-vm/src/runtime/base/program_functions.cpp:58:
/home/antoranz/hiphop-vm/src/runtime/vm/debug/dwarf.h:23:22: error: libdwarf.h: No such file or directory
In file included from /home/antoranz/hiphop-vm/src/runtime/vm/instance.h:26,
                from /home/antoranz/hiphop-vm/src/runtime/base/resource_data.h:22,
                from /home/antoranz/hiphop-vm/src/runtime/base/execution_context.h:23,
                from /home/antoranz/hiphop-vm/src/runtime/base/builtin_functions.h:20,
                from /home/antoranz/hiphop-vm/src/runtime/base/program_functions.cpp:20:
/home/antoranz/hiphop-vm/src/runtime/vm/unit.h:60: error: expected initializer before '<' token
/home/antoranz/hiphop-vm/src/runtime/vm/unit.h:880: error: 'NamedEntityMap' has not been declared
/home/antoranz/hiphop-vm/src/runtime/vm/unit.h:880: error: ISO C++ forbids declaration of 'iterator' with no type
/home/antoranz/hiphop-vm/src/runtime/vm/unit.h:880: error: expected ';' before 'm_next'
In file included from /home/antoranz/hiphop-vm/src/runtime/vm/debug/debug.h:22,
                from /home/antoranz/hiphop-vm/src/runtime/vm/translator/translator-x64.h:29,
                from /home/antoranz/hiphop-vm/src/runtime/base/program_functions.cpp:58:
/home/antoranz/hiphop-vm/src/runtime/vm/debug/dwarf.h:57: error: 'Dwarf_Unsigned' has not been declared
/home/antoranz/hiphop-vm/src/runtime/vm/debug/dwarf.h:58: error: 'Dwarf_Unsigned' has not been declared
/home/antoranz/hiphop-vm/src/runtime/vm/debug/dwarf.h:58: error: 'Dwarf_Unsigned' has not been declared
/home/antoranz/hiphop-vm/src/runtime/vm/debug/dwarf.h:58: error: 'Dwarf_Unsigned' has not been declared
/home/antoranz/hiphop-vm/src/runtime/vm/debug/dwarf.h:59: error: 'Dwarf_Unsigned' has not been declared
/home/antoranz/hiphop-vm/src/runtime/vm/debug/dwarf.h:59: error: 'Dwarf_Ptr' has not been declared
make[2]: *** [src/CMakeFiles/hphp_runtime_static.dir/runtime/base/program_functions.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/hphp_runtime_static.dir/all] Error 2
make: *** [all] Error 2

Any suggestions here?

knudfl 07-24-2012 03:27 PM

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.