LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-12-2012, 01:54 PM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Rep: Reputation: 83
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?
 
Old 07-12-2012, 01:57 PM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
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?
 
Old 07-12-2012, 02:14 PM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
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
 
1 members found this post helpful.
Old 07-12-2012, 02:19 PM   #4
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Colombia
Distribution: Kubuntu, Debian, Knoppix
Posts: 1,982
Blog Entries: 1

Original Poster
Rep: Reputation: 83
I should be able to thank myself, don't you think? :-D
 
  


Reply

Tags
6.3, centos, hiphop


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please translate this PHP script to BASH protorox Programming 8 03-28-2014 12:09 PM
help building hiphop on centos 6.3 eantoranz Programming 22 07-24-2012 03:27 PM
BASH/No X: Using google translate to convert TXT files (translate) frenchn00b Programming 10 09-13-2009 10:55 PM
Problems with simple script.... jong357 Programming 6 12-20-2004 06:08 AM
Simple script problems... king_nothingzzz Programming 3 06-18-2004 10:04 PM


All times are GMT -5. The time now is 01:45 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration