vipsoft / hhvm-ext-geoip

GeoIP extension for HipHop VM (HHVM HNI DSO)
Other
10 stars 8 forks source link

string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to command. #13

Closed paulm17 closed 10 years ago

paulm17 commented 10 years ago

Installed HHVM in Centos 7 via source and then trying to install this:

[root@localhost hhvm-ext-geoip]# sh build.sh \ hphpize complete, now run cmake . && make to build -- Configuring for HHVM API version 20140829 CMake Error at CMake/GeoIP.cmake:34 (string): string sub-command REGEX, mode MATCHALL needs at least 5 arguments total to command. Call Stack (most recent call first): config.cmake:11 (include) CMakeLists.txt:31 (include)

-- Configuring incomplete, errors occurred! make: *\ No targets specified and no makefile found. Stop.

robocoder commented 10 years ago

Looks like it couldn't find libGeoIP. Have you installed it? sudo yum install GeoIP-devel?

paulm17 commented 10 years ago

Thanks for replying, appreciate it.

Yes, both GeoIP and GeoIP-devel have been installed.

[root@localhost ~]# yum -y install GeoIP GeoIP-devel Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile

Package GeoIP-1.5.0-9.el7.x86_64 already installed and latest version Package GeoIP-devel-1.5.0-9.el7.x86_64 already installed and latest version Nothing to do

paulm17 commented 10 years ago

So I found out the issue:

Locate: libGeoIP

/usr/lib64/libGeoIP.so.1

Looking at the code:

execute_process(
    COMMAND ldconfig -p
    COMMAND awk -- "/libGeoIP[.]/ { print }"
    COMMAND sed -e "s/.*=> //"
    COMMAND head -1
    OUTPUT_VARIABLE GEOIP_LIB_PATH
)

shows: /lib64/libGeoIP.so.1

then

COMMAND dirname ${GEOIP_LIB_PATH}
OUTPUT_VARIABLE GEOIP_LIB_DIRECTORY

shows: /lib64

So

${GEOIP_LIB_DIRECTORY} is just /lib64 instead of /usr/lib64

Having this:

COMMAND find /usr/${GEOIP_LIB_DIRECTORY} -name "libGeoIP.*.*.*.*"

Resolves the issue for me.

If you can resolve this issue for CentOS 7 users, would be great!

paulm17 commented 10 years ago

Dude, you rock. Appreciate you resolving this issue! :+1: