pecl install rrd на Ma c OS X Mojave завершается с ошибкой "ожидаемый"; после выражения "длинный шаг" - PullRequest
0 голосов
/ 21 марта 2020

Я пробовал как установить с net, так и загрузить rrd-2.0.1.tgz и установить, но все они выдают ошибку:

ошибка: ожидается ';' после выражения ulong step,

, за которым следует многократная

ошибка: использование необъявленного идентификатора ulong

Я собираюсь сохранить пытаюсь решить это, но задаюсь вопросом, относится ли это к текущим версиям всего, что я установил, и сталкивался ли кто-то еще с этим. Версии:

Mac OSX Mojave (10.14.8)
PEAR Version: 1.10.10
PHP Version: 7.4.2
Zend Engine Version: 3.4.0
Running on: Darwin JumperClown 18.7.0 Darwin Kernel Version 18.7.0: Thu Jan 23 06:52:12 PST 2020; root:xnu-4903.278.25~1/RELEASE_X86_64 x86_64

pecl install rrd выводит следующее:

JumperClown:~ davis$ pecl install rrd
downloading rrd-2.0.1.tgz ...
Starting to download rrd-2.0.1.tgz (18,880 bytes)
......done: 18,880 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
building in /private/tmp/pear/temp/pear-build-davisEzgCf9/rrd-2.0.1
running: /private/tmp/pear/temp/rrd/configure --with-php-config=/usr/local/opt/php/bin/php-config
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
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 for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... x86_64-apple-darwin18.7.0
checking target system type... x86_64-apple-darwin18.7.0
checking for PHP prefix... /usr/local/Cellar/php/7.4.2
checking for PHP includes... -I/usr/local/Cellar/php/7.4.2/include/php -I/usr/local/Cellar/php/7.4.2/include/php/main -I/usr/local/Cellar/php/7.4.2/include/php/TSRM -I/usr/local/Cellar/php/7.4.2/include/php/Zend -I/usr/local/Cellar/php/7.4.2/include/php/ext -I/usr/local/Cellar/php/7.4.2/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php/7.4.2/pecl/20190902
checking for PHP installed headers prefix... /usr/local/Cellar/php/7.4.2/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for rrdtool support... yes, shared
checking for rrdtool... /usr/local/bin/rrdtool
checking for pkg-config... /usr/local/bin/pkg-config
checking for librdd... found
checking for rrd_lastupdate_r in -lrrd... yes
checking for rrdc_disconnect in -lrrd... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for ld used by cc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
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 the maximum length of command line arguments... 196608
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 for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if cc supports -fno-rtti -fno-exceptions... yes
checking for cc option to produce PIC... -fno-common
checking if cc PIC flag -fno-common works... yes
checking if cc static flag -static works... no
checking if cc supports -c -o file.o... yes
checking whether the cc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin18.7.0 dyld
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
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/sh /private/tmp/pear/temp/pear-build-davisEzgCf9/rrd-2.0.1/libtool --mode=compile cc  -I. -I/private/tmp/pear/temp/rrd -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-davisEzgCf9/rrd-2.0.1/include -I/private/tmp/pear/temp/pear-build-davisEzgCf9/rrd-2.0.1/main -I/private/tmp/pear/temp/rrd -I/usr/local/Cellar/php/7.4.2/include/php -I/usr/local/Cellar/php/7.4.2/include/php/main -I/usr/local/Cellar/php/7.4.2/include/php/TSRM -I/usr/local/Cellar/php/7.4.2/include/php/Zend -I/usr/local/Cellar/php/7.4.2/include/php/ext -I/usr/local/Cellar/php/7.4.2/include/php/ext/date/lib -I/usr/local/Cellar/rrdtool/1.7.2/include  -DHAVE_CONFIG_H  -g -O2   -c /private/tmp/pear/temp/rrd/rrd.c -o rrd.lo
mkdir .libs
 cc -I. -I/private/tmp/pear/temp/rrd -DPHP_ATOM_INC -I/private/tmp/pear/temp/pear-build-davisEzgCf9/rrd-2.0.1/include -I/private/tmp/pear/temp/pear-build-davisEzgCf9/rrd-2.0.1/main -I/private/tmp/pear/temp/rrd -I/usr/local/Cellar/php/7.4.2/include/php -I/usr/local/Cellar/php/7.4.2/include/php/main -I/usr/local/Cellar/php/7.4.2/include/php/TSRM -I/usr/local/Cellar/php/7.4.2/include/php/Zend -I/usr/local/Cellar/php/7.4.2/include/php/ext -I/usr/local/Cellar/php/7.4.2/include/php/ext/date/lib -I/usr/local/Cellar/rrdtool/1.7.2/include -DHAVE_CONFIG_H -g -O2 -c /private/tmp/pear/temp/rrd/rrd.c  -fno-common -DPIC -o .libs/rrd.o
/private/tmp/pear/temp/rrd/rrd.c:58:7: error: expected ';' after expression
        ulong step,
             ^
             ;
/private/tmp/pear/temp/rrd/rrd.c:58:2: error: use of undeclared identifier 'ulong'
        ulong step,
        ^
/private/tmp/pear/temp/rrd/rrd.c:58:8: error: use of undeclared identifier 'step'
        ulong step,
              ^
/private/tmp/pear/temp/rrd/rrd.c:59:2: error: use of undeclared identifier 'ds_cnt'
        ds_cnt; /* count of data sources */
        ^
/private/tmp/pear/temp/rrd/rrd.c:79:64: error: use of undeclared identifier 'step'
        if (rrd_fetch(argv->count - 1, &argv->args[1], &start, &end, &step, &ds_cnt,
                                                                      ^
/private/tmp/pear/temp/rrd/rrd.c:79:71: error: use of undeclared identifier 'ds_cnt'
        if (rrd_fetch(argv->count - 1, &argv->args[1], &start, &end, &step, &ds_cnt,
                                                                             ^
/private/tmp/pear/temp/rrd/rrd.c:89:39: error: use of undeclared identifier 'step'
        add_assoc_long(return_value, "step", step);
                                             ^
/private/tmp/pear/temp/rrd/rrd.c:94:31: error: use of undeclared identifier 'ds_cnt'
        if (!ds_data || !ds_namv || !ds_cnt) {
                                     ^
/private/tmp/pear/temp/rrd/rrd.c:107:37: error: use of undeclared identifier 'ds_cnt'
                for (ds_counter = 0; ds_counter < ds_cnt; ds_counter++) {
                                                  ^
/private/tmp/pear/temp/rrd/rrd.c:114:28: error: use of undeclared identifier 'step'
                for (timestamp = start + step; timestamp <= end; timestamp += step) {
                                         ^
/private/tmp/pear/temp/rrd/rrd.c:114:65: error: use of undeclared identifier 'step'
                for (timestamp = start + step; timestamp <= end; timestamp += step) {
                                                                              ^
/private/tmp/pear/temp/rrd/rrd.c:119:38: error: use of undeclared identifier 'ds_cnt'
                        for (ds_counter = 0; ds_counter < ds_cnt; ds_counter++) {
                                                          ^
/private/tmp/pear/temp/rrd/rrd.c:137:37: error: use of undeclared identifier 'ds_cnt'
                for (ds_counter = 0; ds_counter < ds_cnt; ds_counter++) {
                                                  ^
/private/tmp/pear/temp/rrd/rrd.c:399:7: error: expected ';' after expression
        ulong step, outvar_count;
             ^
             ;
/private/tmp/pear/temp/rrd/rrd.c:399:2: error: use of undeclared identifier 'ulong'
        ulong step, outvar_count;
        ^
/private/tmp/pear/temp/rrd/rrd.c:399:8: error: use of undeclared identifier 'step'
        ulong step, outvar_count;
              ^
/private/tmp/pear/temp/rrd/rrd.c:399:14: error: use of undeclared identifier 'outvar_count'
        ulong step, outvar_count;
                    ^
/private/tmp/pear/temp/rrd/rrd.c:403:7: error: expected ';' after expression
        ulong outvar_index;
             ^
             ;
/private/tmp/pear/temp/rrd/rrd.c:403:2: error: use of undeclared identifier 'ulong'
        ulong outvar_index;
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [rrd.lo] Error 1
ERROR: `make' failed
...