diff --git a/README.md b/README.md index 63e75dacb4106ed0dbb033cda250d9701c0e87c5..265dd05b7b52c38a397f85df0a8aad679c328ed9 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ SkyWalking APM : https://github.com/apache/incubator-skywalking * You need to add business codes to monnitor. # Dep +* libuuid +* gcc 4.9+ * pkg-config * grpc * protoc diff --git a/sky-php7ext/config.m4 b/sky-php7ext/config.m4 index 48b2f385ad1d8c17e06e81843419d1211552a7c3..93c9b8c40efe8406456a189510b33ece5ed29ed3 100644 --- a/sky-php7ext/config.m4 +++ b/sky-php7ext/config.m4 @@ -29,51 +29,11 @@ if test -z "$PHP_DEBUG"; then fi if test "$PHP_SKYWALKING" != "no"; then - dnl Write more examples of tests here... - - dnl # --with-skywalking -> check with-path - dnl SEARCH_PATH="/usr/local /usr" # you might want to change this - dnl SEARCH_FOR="/include/skywalking.h" # you most likely want to change this - dnl if test -r $PHP_SKYWALKING/$SEARCH_FOR; then # path given as parameter - dnl SKYWALKING_DIR=$PHP_SKYWALKING - dnl else # search default path list - dnl AC_MSG_CHECKING([for skywalking files in default path]) - dnl for i in $SEARCH_PATH ; do - dnl if test -r $i/$SEARCH_FOR; then - dnl SKYWALKING_DIR=$i - dnl AC_MSG_RESULT(found in $i) - dnl fi - dnl done - dnl fi - dnl - dnl if test -z "$SKYWALKING_DIR"; then - dnl AC_MSG_RESULT([not found]) - dnl AC_MSG_ERROR([Please reinstall the skywalking distribution]) - dnl fi - - dnl # --with-skywalking -> add include path - dnl PHP_ADD_INCLUDE($SKYWALKING_DIR/include) - - dnl # --with-skywalking -> check for lib and symbol presence - dnl LIBNAME=skywalking # you may want to change this - dnl LIBSYMBOL=skywalking # you most likely want to change this - - dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, - dnl [ - dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SKYWALKING_DIR/$PHP_LIBDIR, SKYWALKING_SHARED_LIBADD) - dnl AC_DEFINE(HAVE_SKYWALKINGLIB,1,[ ]) - dnl ],[ - dnl AC_MSG_ERROR([wrong skywalking lib version or lib not found]) - dnl ],[ - dnl -L$SKYWALKING_DIR/$PHP_LIBDIR -lm - dnl ]) - dnl - dnl PHP_SUBST(SKYWALKING_SHARED_LIBADD) + CXXFLAGS+=" -std=c++11 " PHP_REQUIRE_CXX() - KYWALKING_LIBS=" -L/usr/local/lib " - KYWALKING_LIBS+=`pkg-config --libs protobuf grpc++ grpc` + KYWALKING_LIBS=`pkg-config --cflags --libs uuid protobuf grpc++ grpc` KYWALKING_LIBS+=" -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed -ldl " AC_OUTPUT_COMMANDS( diff --git a/sky-php7ext/src/report/report_client.cpp b/sky-php7ext/src/report/report_client.cpp index c7cb54e4f7f0eb271c4e0fe8330117690edfb915..6386b19406e0a7e25325e59f77b0f312fb8ca4af 100644 --- a/sky-php7ext/src/report/report_client.cpp +++ b/sky-php7ext/src/report/report_client.cpp @@ -85,7 +85,7 @@ int main(int argc, char **argv) { } } - if (argc == 0) { + if (argc == 1) { std::cout << "report_client grpc log_path" << std::endl; std::cout << "e.g. report_client 120.0.0.1:11800 /tmp" << std::endl; return 0;