Closed cuifox closed 3 years ago
configure阶段出错了
pecl install skywalking 如何能正常完成
我也遇到了同样的问题,我的是php7.4
@vallbuy 不正常的日志发一下。
/var/www/html # pecl install https://pecl.php.net/get/skywalking-4.1.2.tgz checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking how to run the C++ preprocessor... g++ -E checking the maximum length of command line arguments... 98304 checking command to parse /usr/bin/nm -B output from cc object... ok checking for objdir... .libs checking for ar... ar checking for ranlib... ranlib checking for strip... strip checking if cc supports -fno-rtti -fno-exceptions... no checking for cc option to produce PIC... -fPIC checking if cc PIC flag -fPIC works... yes checking if cc static flag -static works... yes checking if cc supports -c -o file.o... yes checking whether the cc linker (/usr/x86_64-alpine-linux-musl/bin/ld) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... no
creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/x86_64-alpine-linux-musl/bin/ld
checking if the linker (/usr/x86_64-alpine-linux-musl/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/x86_64-alpine-linux-musl/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/x86_64-alpine-linux-musl/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
(cached) (cached) checking how to hardcode library paths into programs... immediate
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /tmp/pear/temp/pear-build-defaultuserBHCpFI/skywalking-4.1.2/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/skywalking -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build
mkdir .libs
g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/skywalking -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserBHCpFI/skywalking-4.1.2/include -I/tmp/pear/temp/pear-build-defaultuserBHCpFI/s
In file included from /tmp/pear/temp/skywalking/src/sky_utils.h:19,
from /tmp/pear/temp/skywalking/skywalking.cc:23:
/tmp/pear/temp/skywalking/src/segment.h:23:10: fatal error: src/network/v3/language-agent/Tracing.pb.h: No such file or directory
23 | #include <src/network/v3/language-agent/Tracing.pb.h>
| ^~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:194: skywalking.lo] Error 1
ERROR: `make' failed
/var/www/html # pecl install skywalking downloading skywalking-4.1.3.tgz ... Starting to download skywalking-4.1.3.tgz (48,263 bytes) .............done: 48,263 bytes 86 source files, building running: phpize Configuring for: PHP Api Version: 20180731 Zend Module Api No: 20180731 Zend Extension Api No: 320180731 building in /tmp/pear/temp/pear-build-defaultuserOlCjEn/skywalking-4.1.3 running: /tmp/pear/temp/skywalking/configure --with-php-config=/usr/local/bin/php-config checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for a sed that does not truncate output... /bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-pc-linux-musl checking host system type... x86_64-pc-linux-musl checking target system type... x86_64-pc-linux-musl checking for PHP prefix... /usr/local checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20180731 checking for PHP installed headers prefix... /usr/local/include/php checking if debug is enabled... no checking if zts is enabled... no checking for re2c... re2c checking for re2c version... 1.3 (ok) checking for gawk... no checking for nawk... no checking for awk... awk checking if awk is broken... no checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking whether to enable skywalking support... yes, shared checking whether C++ compiler accepts -std=c++0x... yes checking for php_json.h... found in /usr/local/include/php configure: error: skywalking extension requires gRPC extension, add --with-grpc=DIR ERROR: `/tmp/pear/temp/skywalking/configure --with-php-config=/usr/local/bin/php-config' failed
请问一下,pecl install skywalking 如何配置 --with-grpc=DIR
FROM php:7.3-fpm-alpine
复制源
COPY ./repositories /etc/apk/repositories
RUN echo "https://mirrors.ustc.edu.cn/alpine/v.3.11/main" > /etc/apk/repositories RUN echo "https://mirrors.ustc.edu.cn/alpine/v.3.11/community" >> /etc/apk/repositories
RUN set -ex \ && apk add --update --no-cache autoconf g++ protobuf-dev grpc-dev curl-dev make re2c boost-dev
installing skywalking
running: make /bin/sh /tmp/pear/temp/pear-build-defaultuserCDhoam/skywalking-4.1.2/libtool --mode=compile g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/skywalking -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserCDhoam/skywalking-4.1.2/include -I/tmp/pear/temp/pear-build-defaultuserCDhoam/skywalking-4.1.2/main -I/tmp/pear/temp/skywalking -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/pear-build-defaultuserCDhoam/skywalking-4.1.2/src -I/tmp/pear/temp/pear-build-defaultuserCDhoam/skywalking-4.1.2/src/network/v3 -DHAVE_CONFIG_H -g -O2 -Wall -std=c++11 -Wno-deprecated-register -c /tmp/pear/temp/skywalking/skywalking.cc -o skywalking.lo mkdir .libs g++ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/skywalking -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserCDhoam/skywalking-4.1.2/include -I/tmp/pear/temp/pear-build-defaultuserCDhoam/skywalking-4.1.2/main -I/tmp/pear/temp/skywalking -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/pear/temp/pear-build-defaultuserCDhoam/skywalking-4.1.2/src -I/tmp/pear/temp/pear-build-defaultuserCDhoam/skywalking-4.1.2/src/network/v3 -DHAVE_CONFIG_H -g -O2 -Wall -std=c++11 -Wno-deprecated-register -c /tmp/pear/temp/skywalking/skywalking.cc -fPIC -DPIC -o .libs/skywalking.o In file included from /tmp/pear/temp/skywalking/src/sky_utils.h:19, from /tmp/pear/temp/skywalking/skywalking.cc:23: /tmp/pear/temp/skywalking/src/segment.h:23:10: fatal error: src/network/v3/language-agent/Tracing.pb.h: No such file or directory 23 | #include <src/network/v3/language-agent/Tracing.pb.h> | ^
~~~~~~~~~~~ compilation terminated. make: *** [Makefile:194: skywalking.lo] Error 1 ERROR: `make' failed