Помогите установить rar через pecl

S
На сайте с 05.06.2017
Offline
0
1130

Добрый день. Не получается установить rar через pecl

Centos 7 x64 php PHP 7.0.19

Нашел тему /ru/forum/834007 . Но рекомендации в ней не помогли

Вот файл с полным текстом процесса установки

https://www.dropbox.com/s/vox6od456a46x33/error.txt?dl=0

При установки выдает ошибку

pecl -v install rar

downloading rar-3.0.2.tgz ...

Starting to download rar-3.0.2.tgz (257,787 bytes)

....done: 197,328 bytes

md5sum ok: /usr/share/tests/pecl/rar/tests/001.phpt

md5sum ok: /usr/share/tests/pecl/rar/tests/002.phpt

............

дальше ok. ok. ok.

...........

md5sum ok: /var/tmp/rar/rar_navigation.c

renamed source file /var/tmp/rar/.tmprar_navigation.c to /var/tmp/rar/rar_navigation.c

125 source files, building

building in /var/tmp/rar

running: phpize

Configuring for:

PHP Api Version: 20151012

Zend Module Api No: 20151012

Zend Extension Api No: 320151012

building in /var/tmp/pear-build-rootPgR3Vp/rar-3.0.2

running: /var/tmp/rar/configure --with-php-config=/usr/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

.........

configure: creating ./config.status

config.status: creating config.h

config.status: executing libtool commands

running: make

/bin/sh /var/tmp/pear-build-rootPgR3Vp/rar-3.0.2/libtool --mode=compile cc -DRARDLL -DGUI -DSILENT -Wno-write-strings -Wno-logical-op-parentheses -I/var/tmp/rar/unrar -I. -I/var/tmp/rar -DPHP_ATOM_INC -I/var/tmp/pear-build-rootPgR3Vp/rar-3.0.2/include -I/var/tmp/pear-build-rootPgR3Vp/rar-3.0.2/main -I/var/tmp/rar -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/rar/rar.c -o rar.lo

libtool: compile: cc -DRARDLL -DGUI -DSILENT -Wno-write-strings -Wno-logical-op-parentheses -I/var/tmp/rar/unrar -I. -I/var/tmp/rar -DPHP_ATOM_INC -I/var/tmp/pear-build-rootPgR3Vp/rar-3.0.2/include -I/var/tmp/pear-build-rootPgR3Vp/rar-3.0.2/main -I/var/tmp/rar -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /var/tmp/rar/rar.c -fPIC -DPIC -o .libs/rar.o

In file included from /var/tmp/rar/rar.c:55:0:

/var/tmp/rar/php_rar.h:91:2: error: unknown type name 'zend_object_handle'

zend_object_handle id;

^

/var/tmp/rar/rar.c: In function '_rar_destroy_userdata':

/var/tmp/rar/rar.c:164:3: warning: passing argument 1 of '_zval_ptr_dtor' from incompatible pointer type [enabled by default]

zval_ptr_dtor(&udata->callable);

^

In file included from /usr/include/php/Zend/zend.h:39:0,

from /usr/include/php/main/php.h:35,

from /var/tmp/rar/rar.c:47:

/usr/include/php/Zend/zend_variables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'

ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);

^

/var/tmp/rar/rar.c: In function 'zif_rar_wrapper_cache_stats':

/var/tmp/rar/rar.c:406:31: error: macro "RETURN_STRINGL" passed 3 arguments, but takes just 2

RETURN_STRINGL(result, len, 0);

^

/var/tmp/rar/rar.c:406:2: error: 'RETURN_STRINGL' undeclared (first use in this function)

RETURN_STRINGL(result, len, 0);

^

/var/tmp/rar/rar.c:406:2: note: each undeclared identifier is reported only once for each function it appears in

/var/tmp/rar/rar.c: In function '_rar_unrar_volume_user_callback':

/var/tmp/rar/rar.c:449:39: error: macro "ZVAL_STRING" passed 3 arguments, but takes just 2

ZVAL_STRING(failed_vol, dst_buffer, 1);

^

/var/tmp/rar/rar.c:449:2: error: 'ZVAL_STRING' undeclared (first use in this function)

ZVAL_STRING(failed_vol, dst_buffer, 1);

^

/var/tmp/rar/rar.c:451:5: error: 'zend_fcall_info' has no member named 'retval_ptr_ptr'

fci->retval_ptr_ptr = &retval_ptr;

^

/var/tmp/rar/rar.c:452:14: warning: assignment from incompatible pointer type [enabled by default]

fci->params = &params;

^

/var/tmp/rar/rar.c:456:7: error: 'zend_fcall_info' has no member named 'retval_ptr_ptr'

fci->retval_ptr_ptr == NULL ||

^

/var/tmp/rar/rar.c:457:8: error: 'zend_fcall_info' has no member named 'retval_ptr_ptr'

*fci->retval_ptr_ptr == NULL) {

^

/var/tmp/rar/rar.c:502:2: warning: passing argument 1 of '_zval_ptr_dtor' from incompatible pointer type [enabled by default]

zval_ptr_dtor(&failed_vol);

^

In file included from /usr/include/php/Zend/zend.h:39:0,

from /usr/include/php/main/php.h:35,

from /var/tmp/rar/rar.c:47:

/usr/include/php/Zend/zend_variables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'

ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);

^

/var/tmp/rar/rar.c:504:3: warning: passing argument 1 of '_zval_ptr_dtor' from incompatible pointer type [enabled by default]

zval_ptr_dtor(&retval_ptr);

^

In file included from /usr/include/php/Zend/zend.h:39:0,

from /usr/include/php/main/php.h:35,

from /var/tmp/rar/rar.c:47:

/usr/include/php/Zend/zend_variables.h:112:15: note: expected 'struct zval *' but argument is of type 'struct zval **'

ZEND_API void _zval_ptr_dtor(zval *zval_ptr ZEND_FILE_LINE_DC);

^

/var/tmp/rar/rar.c: In function '_rar_contents_cache_put':

/var/tmp/rar/rar.c:633:3: warning: passing argument 2 of 'zend_hash_apply' from incompatible pointer type [enabled by default]

zend_hash_apply(cc->data, _rar_array_apply_remove_first TSRMLS_CC);

^

In file included from /usr/include/php/Zend/zend.h:36:0,

from /usr/include/php/main/php.h:35,

from /var/tmp/rar/rar.c:47:

/usr/include/php/Zend/zend_hash.h:132:29: note: expected 'apply_func_t' but argument is of type 'int (*)(void *)'

ZEND_API void ZEND_FASTCALL zend_hash_apply(HashTable *ht, apply_func_t apply_func);

^

/var/tmp/rar/rar.c:636:2: warning: passing argument 1 of 'zval_add_ref' from incompatible pointer type [enabled by default]

zval_add_ref(&zv);

^

In file included from /usr/include/php/Zend/zend.h:39:0,

from /usr/include/php/main/php.h:35,

from /var/tmp/rar/rar.c:47:

/usr/include/php/Zend/zend_variables.h:141:15: note: expected 'struct zval *' but argument is of type 'struct zval **'

ZEND_API void zval_add_ref(zval *p);

^

/var/tmp/rar/rar.c:637:64: error: macro "zend_hash_update" passed 6 arguments, but takes just 3

zend_hash_update(cc->data, key, key_len, &zv, sizeof(zv), NULL);

^

/var/tmp/rar/rar.c:637:2: error: 'zend_hash_update' undeclared (first use in this function)

zend_hash_update(cc->data, key, key_len, &zv, sizeof(zv), NULL);

^

/var/tmp/rar/rar.c: In function '_rar_contents_cache_get':

/var/tmp/rar/rar.c:645:2: warning: passing argument 2 of 'zend_hash_find' from incompatible pointer type [enabled by default]

zend_hash_find(cc->data, key, key_len, (void **) &element);

^

In file included from /usr/include/php/Zend/zend.h:36:0,

from /usr/include/php/main/php.h:35,

from /var/tmp/rar/rar.c:47:

/usr/include/php/Zend/zend_hash.h:154:30: note: expected 'struct zend_string *' but argument is of type 'const char *'

ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);

^

/var/tmp/rar/rar.c:645:2: error: too many arguments to function 'zend_hash_find'

zend_hash_find(cc->data, key, key_len, (void **) &element);

^

In file included from /usr/include/php/Zend/zend.h:36:0,

from /usr/include/php/main/php.h:35,

from /var/tmp/rar/rar.c:47:

/usr/include/php/Zend/zend_hash.h:154:30: note: declared here

ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);

^

/var/tmp/rar/rar.c:649:3: warning: passing argument 1 of 'zval_add_ref' from incompatible pointer type [enabled by default]

zval_add_ref(element);

^

In file included from /usr/include/php/Zend/zend.h:39:0,

from /usr/include/php/main/php.h:35,

from /var/tmp/rar/rar.c:47:

/usr/include/php/Zend/zend_variables.h:141:15: note: expected 'struct zval *' but argument is of type 'struct zval **'

ZEND_API void zval_add_ref(zval *p);

^

/var/tmp/rar/rar.c: At top level:

cc1: warning: unrecognized command line option "-Wno-logical-op-parentheses" [enabled by default]

make: *** [rar.lo] Error 1

rolling back 391 file operations

ERROR: `make' failed

Заранее благодарен

Andreyka
На сайте с 19.02.2005
Offline
822
#1

Пробуйте другие версии rar

Не стоит плодить сущности без необходимости
V
На сайте с 18.03.2013
Offline
90
#2

pecl-rar не обновляется с 2013 года.

эта инструкция безнадежно устарела.

попробуйте вот это

https://github.com/esminis/php_pecl_rar/tree/PhpNg

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий