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

cmake ../zendapidevel/ 报错(ZAPI_OPT_PHPCFG_PATH) #6

Open
robbinhan opened this issue Dec 25, 2017 · 3 comments
Open

cmake ../zendapidevel/ 报错(ZAPI_OPT_PHPCFG_PATH) #6

robbinhan opened this issue Dec 25, 2017 · 3 comments

Comments

@robbinhan
Copy link

Running with debug output on.
/usr/lib
   Called from: [2]	/home/vagrant/workspace/zendapidevel/cmake/modules/DetectPhpInfo.cmake
                [1]	/home/vagrant/workspace/zendapidevel/CMakeLists.txt
CMake Error at cmake/modules/DetectPhpInfo.cmake:34 (message):
  php library is not found automatic, maybe your php is not in system
  standard path you can specify ZAPI_OPT_PHPCFG_PATH and try again, good
  luck!
Call Stack (most recent call first):
  CMakeLists.txt:138 (include)


   Called from: [2]	/home/vagrant/workspace/zendapidevel/cmake/modules/DetectPhpInfo.cmake
                [1]	/home/vagrant/workspace/zendapidevel/CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "/home/vagrant/workspace/build-zendapi/CMakeFiles/CMakeOutput.log".
See also "/home/vagrant/workspace/build-zendapi/CMakeFiles/CMakeError.log".

我在macosx和ubuntu都尝试了编译,都卡在了这里,我设置了ZAPI_OPT_PHPCFG_PATH变量,但是find_library总是找不到库,不清楚是什么原因,我message(${ZAPI_PHP_LIB_PATH})打印是正常指定到了lib目录,手动ll了下lib目录下是有 php目录的

@yushuailiu
Copy link

官网上的文字存在编码问题,不要直接复制,你把编译命令手动输入下应该就可以了。
例如: cmake -DZAPI_OPT_PHPCFG_PATH=/usr/local/php-7.1.5/bin/php-config ../zendapidevel

@robbinhan
Copy link
Author

还是没什么用

@viest
Copy link

viest commented Mar 26, 2018

@robbinhan

我也遇到了相同的问题,不过看了一下是message提示写错了;

if (NOT ZAPI_LIBPHP_PATH)
        message(FATAL_ERROR "php library is not found automatic, maybe your php is not in system standard path "
            "you can specify ZAPI_OPT_PHPCFG_PATH and try again, good luck!")
    endif()

加上-DZAPI_LIBPHP_PATH=/usr/local/php-7.1.5/lib就可以了。

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

3 participants