Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any plans for Binaries? #12

Closed
steelbrain opened this issue Jul 28, 2014 · 9 comments
Closed

Any plans for Binaries? #12

steelbrain opened this issue Jul 28, 2014 · 9 comments

Comments

@steelbrain
Copy link

Do you have any plans for pre-built binaries for Ubuntu, I've downloaded the HHVM binaries and don't have the source, upon executing ./build.sh of this extension, it gives me HPHP_HOME environment variable must be set!, is there a way to install it without source?

@robocoder
Copy link
Member

No, I don't plan to build binary packages -- there are too many platforms to support.

In general, to build this extension without the hhvm source, after you install the hhvm package, you'll need to:

sudo apt-get install hhvm-dev libgeoip-dev
sudo chmod +x /usr/bin/hphpize
git clone https://github.com/vipsoft/hhvm-ext-geoip.git
cd hhvm-ext-geoip
hphpize
cmake .
make

(However, I just tried this, and make fails...I suspect due to some missing dependencies.)

@robocoder
Copy link
Member

Looks like hhvm-dev is the problem. When building this extension on 14.04 using packages, g++ fails with an internal compiler error:

In file included from /usr/include/hphp/third-party/folly/Portability.h:184:0,
                 from /usr/include/hphp/third-party/folly/FBString.h:47,
                 from /usr/include/hphp/third-party/folly/Conv.h:27,
                 from /usr/include/hphp/third-party/folly/String.h:34,
                 from /usr/include/hphp/util/thread-local.h:23,
                 from /usr/include/hphp/runtime/base/types.h:33,
                 from /usr/include/hphp/runtime/base/zend-functions.h:21,
                 from /usr/include/hphp/runtime/base/hphp-system.h:27,
                 from /usr/include/hphp/runtime/base/base-includes.h:24,
                 from ext_geoip.cpp:21:
/usr/include/hphp/third-party/folly/detail/Clock.h:37:17: error: conflicting declaration ‘typedef uint8_t clockid_t’
 typedef uint8_t clockid_t;
                 ^
In file included from /usr/include/pthread.h:24:0,
                 from /usr/include/hphp/util/mutex.h:20,
                 from /usr/include/hphp/util/lock.h:20,
                 from /usr/include/hphp/runtime/base/base-includes.h:23,
                 from ext_geoip.cpp:21:
/usr/include/time.h:91:21: error: ‘clockid_t’ has a previous declaration as ‘typedef __clockid_t clockid_t’
 typedef __clockid_t clockid_t;
                     ^
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.

@steelbrain
Copy link
Author

I don't know what's the problem on your side, but the method you told works for me, Ubuntu 14.04 (Kernel v3.15 (dev one))

@robocoder
Copy link
Member

Ok, good to know. Maybe it's a problem with the 3.13 header files.

@steelbrain
Copy link
Author

I've been trying to load the extension to hhvm with no luck, can you please tell me what do I need to add into my ini files to make this extension load? Cheers.

@robocoder
Copy link
Member

add to your config.hdf:

DynamicExtensions {
  geoip = /path/to/geoip.so
}

@steelbrain
Copy link
Author

steelbrain commented Aug 3, 2014

I am sorry, I was not able to explain correctly what I was asking for,
the latest version of hhvm don't have config.hdf mate, they now have
ini files, I am confused what to add there, as there's no example
online about dynamic extensions in hhvm configuration

On 03/08/2014, Anthon Pang notifications@github.com wrote:

add to your config.hdf:

DynamicExtensions {
  Geoip = /path/to/geoip.so
}

Reply to this email directly or view it on GitHub:
#12 (comment)

@robocoder
Copy link
Member

AFAIK Not all the hdf settings have been ported to INI format.

hhvm can load multiple config files though:
hhvm --config A.hdf --config B.ini

@steelbrain
Copy link
Author

Woot! Works, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants