LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   hiphop on centos 6.3 - problems to translate a simple script (http://www.linuxquestions.org/questions/programming-9/hiphop-on-centos-6-3-problems-to-translate-a-simple-script-4175416387/)

eantoranz 07-12-2012 01:54 PM

hiphop on centos 6.3 - problems to translate a simple script
 
Hi!

I'm trying to give hiphop a test on a centos 6.3 box. I've been able to build it, now I'm trying to run it on a very "hello world" script. First I had to hack hiphop's files to set some locations of libraries and includes. Now when I try to pass it on my hello world script I see this:

Code:

$ LANG=en CMAKE_LIBRARY_PATH=/usr/local/libmemcached-0.39/lib/ /home/antoranz/hiphop-php/src/hphp/hphp --keep-tempdir=1 --log=6 test.php
running hphp...
creating temporary directory /tmp/hphp_ovDCOD ...
Analyzing Includes
Analyzing All
Corrected function return type Some -> Variant
Analyzing Includes
Analyzing All
Analyzing Includes
Analyzing All
parsing inputs...
parsing test.php ...
Analyzing Includes
Analyzing All
parsing inputs took 0'00" (14 ms) wall time
pre-optimizing...
pre-optimizing took 0'00" (1 ms) wall time
inferring types...
inferring types took 0'00" (1 ms) wall time
post-optimizing...
post-optimizing took 0'00" (1 ms) wall time
creating CPP files...
creating CPP files took 0'00" (97 ms) wall time
compiling and linking CPP files...
Status 2 running command: `/home/antoranz/hiphop-php/bin/run.sh'\n
  arg: `'\n
  arg: `/tmp/hphp_ovDCOD'\n
  arg: `program'\n
  arg: `'\n
-- The C compiler identification is GNU\n-- The CXX compiler identification is GNU\n-- Check for working C compiler: /usr/bin/gcc\n-- Check for working C compiler: /usr/bin/gcc -- works\n-- Detecting C compiler ABI info\n-- Detecting C compiler ABI info - done\n-- Check for working CXX compiler: /usr/bin/c++\n-- Check for working CXX compiler: /usr/bin/c++ -- works\n-- Detecting CXX compiler ABI info\n-- Detecting CXX compiler ABI info - done\n-- CMAKE_PREFIX_PATH was missing, proceeding anyway\n-- Performing Test HAVE_GCC_43\n-- Performing Test HAVE_GCC_43 - Success\n-- Boost version: 1.41.0\n-- Found the following Boost libraries:\n--  system\n--  program_options\n--  filesystem\n-- MySQL Include dir: /usr/include  library dir: /usr/lib64/mysql\n-- MySQL client libraries: mysqlclient_r\n-- Found LIBMEMCACHED: /usr/local/libmemcached-0.39/lib/libmemcached.so\n-- Found PCRE: /usr/lib64/libpcre.so\n-- Found libevent: /usr/local/libevent/lib/libevent.so\n-- Looking for evhttp_bind_socket_with_fd\n-- Looking for evhttp_bind_socket_with_fd - found\n-- Looking for gdImagePng in /usr/lib64/libgd.so\n-- Looking for gdImagePng in /usr/lib64/libgd.so - found\n-- Found ZLIB: /usr/lib64/libz.so\n-- Found PNG: /usr/lib64/libpng.so\n-- Looking for gdImageJpeg in /usr/lib64/libgd.so\n-- Looking for gdImageJpeg in /usr/lib64/libgd.so - found\n-- Found JPEG: /usr/lib64/libjpeg.so\n-- Looking for gdImageGif in /usr/lib64/libgd.so\n-- Looking for gdImageGif in /usr/lib64/libgd.so - found\n-- Found GD: /usr/lib64/libgd.so\n-- Found CURL: /usr/local/curl/lib/libcurl.so\n-- Looking for curl_multi_select\n-- Looking for curl_multi_select - found\n-- checking for module 'libxml-2.0'\n--  found libxml-2.0, version 2.7.6\n-- Found LibXml2: /usr/lib64/libxml2.so\n-- Found EXPAT: /usr/lib64/libexpat.so\n-- Found ICU header files in /usr/include\n-- Found ICU libraries: /usr/lib64/libicuuc.so\n-- Can't find jemalloc\n-- Can't find minimal tcmalloc\n-- [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]).\n-- Found Intel TBB\n-- Found mcrypt: /usr/lib64/libmcrypt.so\n-- Found OpenSSL: /usr/lib64/libssl.so\n-- Found BZip2: /usr/lib64/libbz2.so\n-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so\n-- Looking for BZ2_bzCompressInit in /usr/lib64/libbz2.so - found\n-- Found ONIGURUMA: /usr/lib64/libonig.so\n-- Found ldap: /usr/lib64/libldap.so;/usr/lib64/liblber.so\n-- Found Readline: /usr/include\n-- Configuring done\n-- Generating done\n-- Build files have been written to: /tmp/hphp_ovDCOD\nScanning dependencies of target program\n[  6%] Building CXX object CMakeFiles/program.dir/php/test.cpp.o\n
In file included from /home/antoranz/hiphop-php/src/runtime/ext/profile/extprofile_memcached.h:23,\n                from /home/antoranz/hiphop-php/src/runtime/ext/ext.h:58,\n                from /home/antoranz/hiphop-php/src/runtime/base/hphp.h:31,\n                from /tmp/hphp_ovDCOD/php/test.cpp:2:\n/home/antoranz/hiphop-php/src/runtime/ext/ext_memcached.h:202: error: expected identifier before '*' token\n/home/antoranz/hiphop-php/src/runtime/ext/ext_memcached.h:204: error: ISO C++ forbids declaration of 'memcached_return_t' with no type\n/home/antoranz/hiphop-php/src/runtime/ext/ext_memcached.h:204: error: 'memcached_return_t' declared as function returning a function\n/home/antoranz/hiphop-php/src/runtime/ext/ext_memcached.h:205: error: 'SetOperation' has not been declared\n/home/antoranz/hiphop-php/src/runtime/ext/ext_memcached.h:207: error: expected identifier before '*' token\n/home/antoranz/hiphop-php/src/runtime/ext/ext_memcached.h:208: error: ISO C++ forbids declaration of 'memcached_return_t' with no type\n/home/antoranz/hiphop-php/src/runtime/ext/ext_memcached.h:208: error: 'memcached_return_t' declared as function returning a function\n/home/antoranz/hiphop-php/src/runtime/ext/ext_memcached.h:209: error: 'IncDecOperation' has not been declared\nmake[2]: *** [CMakeFiles/program.dir/php/test.cpp.o] Error 1\nmake[1]: *** [CMakeFiles/program.dir/all] Error 2\nmake: *** [all] Error 2\n
compiling and linking CPP files took 0'15" (15108 ms) wall time
hphp failed
running hphp took 0'15" (15737 ms) wall time

What's going on?

eantoranz 07-12-2012 01:57 PM

Apparently, this is the line in question:

Code:

  typedef memcached_return_t (*SetOperation)(memcached_st *,
      const char *, size_t, const char *, size_t, const char *, size_t,
      time_t, uint32_t);

I see nothing wrong with it... or is there a problem?

eantoranz 07-12-2012 02:14 PM

I made it work... I was missing another CMAKE variable when calling hphp:

Code:

CMAKE_LIBRARY_PATH=/usr/local/libmemcached-0.39/lib/ CMAKE_INCLUDE_PATH=/usr/local/libmemcached-0.39/include/ /home/antoranz/hiphop-php/src/hphp/hphp test.php

eantoranz 07-12-2012 02:19 PM

I should be able to thank myself, don't you think? :-D


All times are GMT -5. The time now is 12:02 AM.