Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

błedy polecenia pecl install cairo-0.3.2

39 views
Skip to first unread message

RM

unread,
Oct 29, 2019, 8:24:57 AM10/29/19
to
Przy instalacji PHP-GTK dowiedziałem się że potzrebuję mieć
zainstalowane rozszerzenie php o nazwie cairo-0.3.2. Wydanie polecenia:
sudo pecl install cairo-0.3.2
wywala mi błędy, nie wiem co zrobić.


In file included from /tmp/pear/temp/Cairo/cairo.c:34:0:
/tmp/pear/temp/Cairo/php_cairo.h:536:8: error: unknown type name
‘zend_object_value’
extern zend_object_value cairo_surface_object_new(zend_class_entry *ce
TSRMLS_DC);
^
In file included from /tmp/pear/temp/Cairo/cairo.c:34:0:
/tmp/pear/temp/Cairo/php_cairo.h:544:8: error: unknown type name
‘zend_object_value’
extern zend_object_value cairo_font_face_object_new(zend_class_entry
*ce TSRMLS_DC);
^
/tmp/pear/temp/Cairo/php_cairo.h: In function ‘cairo_context_object_get’:
/tmp/pear/temp/Cairo/php_cairo.h:601:34: warning: implicit declaration
of function ‘zend_object_store_get_object’ [-Wimplicit-function-declaration]
cairo_context_object *pobj = zend_object_store_get_object(zobj
TSRMLS_CC);
^
/tmp/pear/temp/Cairo/php_cairo.h:601:34: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
/tmp/pear/temp/Cairo/php_cairo.h: In function ‘cairo_path_object_get’:
/tmp/pear/temp/Cairo/php_cairo.h:610:31: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
cairo_path_object *pobj = zend_object_store_get_object(zobj
TSRMLS_CC);
^
/tmp/pear/temp/Cairo/php_cairo.h: In function ‘cairo_pattern_object_get’:
/tmp/pear/temp/Cairo/php_cairo.h:619:34: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
cairo_pattern_object *pobj = zend_object_store_get_object(zobj
TSRMLS_CC);
^
/tmp/pear/temp/Cairo/php_cairo.h: In function ‘cairo_matrix_object_get’:
/tmp/pear/temp/Cairo/php_cairo.h:628:33: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
cairo_matrix_object *mobj = zend_object_store_get_object(zobj
TSRMLS_CC);
^
/tmp/pear/temp/Cairo/php_cairo.h: In function ‘cairo_surface_object_get’:
/tmp/pear/temp/Cairo/php_cairo.h:637:34: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
cairo_surface_object *pobj = zend_object_store_get_object(zobj
TSRMLS_CC);
^
/tmp/pear/temp/Cairo/php_cairo.h: In function ‘cairo_font_face_object_get’:
/tmp/pear/temp/Cairo/php_cairo.h:646:36: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
cairo_font_face_object *pobj = zend_object_store_get_object(zobj
TSRMLS_CC);
^
/tmp/pear/temp/Cairo/php_cairo.h: In function
‘cairo_scaled_font_object_get’:
/tmp/pear/temp/Cairo/php_cairo.h:655:38: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
cairo_scaled_font_object *pobj = zend_object_store_get_object(zobj
TSRMLS_CC);
^
/tmp/pear/temp/Cairo/php_cairo.h: In function
‘cairo_font_options_object_get’:
/tmp/pear/temp/Cairo/php_cairo.h:664:39: warning: initialization makes
pointer from integer without a cast [-Wint-conversion]
cairo_font_options_object *pobj =
zend_object_store_get_object(zobj TSRMLS_CC);
^
/tmp/pear/temp/Cairo/cairo.c: In function ‘php_cairo_get_ft_error’:
/tmp/pear/temp/Cairo/cairo.c:618:38: warning: initialization discards
‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
php_cairo_ft_error *current_error = php_cairo_ft_errors;
^
/tmp/pear/temp/Cairo/cairo.c: In function ‘zif_cairo_version_string’:
/tmp/pear/temp/Cairo/cairo.c:666:41: error: macro "RETURN_STRING" passed
2 arguments, but takes just 1
RETURN_STRING(cairo_version_string(), 1);
^
/tmp/pear/temp/Cairo/cairo.c:666:2: error: ‘RETURN_STRING’ undeclared
(first use in this function)
RETURN_STRING(cairo_version_string(), 1);
^
/tmp/pear/temp/Cairo/cairo.c:666:2: note: each undeclared identifier is
reported only once for each function it appears in
/tmp/pear/temp/Cairo/cairo.c: In function ‘zim_Cairo_versionString’:
/tmp/pear/temp/Cairo/cairo.c:681:41: error: macro "RETURN_STRING" passed
2 arguments, but takes just 1
RETURN_STRING(cairo_version_string(), 1);
^
/tmp/pear/temp/Cairo/cairo.c:681:2: error: ‘RETURN_STRING’ undeclared
(first use in this function)
RETURN_STRING(cairo_version_string(), 1);
^
/tmp/pear/temp/Cairo/cairo.c: In function ‘zif_cairo_available_surfaces’:
/tmp/pear/temp/Cairo/cairo.c:694:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"IMAGE",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:696:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"PNG",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:699:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"PDF",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:702:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"PS",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:705:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"SVG",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:708:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"XLIB",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c: In function ‘zim_Cairo_availableSurfaces’:
/tmp/pear/temp/Cairo/cairo.c:731:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"IMAGE",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:733:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"PNG",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:736:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"PDF",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:739:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"PS",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:742:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"SVG",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:745:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"XLIB",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:754:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"RECORDING",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c: In function ‘zif_cairo_available_fonts’:
/tmp/pear/temp/Cairo/cairo.c:769:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"FREETYPE",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:778:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"USER",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c: In function ‘zim_Cairo_availableFonts’:
/tmp/pear/temp/Cairo/cairo.c:796:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"FREETYPE",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c:805:2: error: too many arguments to
function ‘add_next_index_string’
add_next_index_string(return_value,"USER",1);
^
In file included from /usr/include/php/20151012/main/php.h:40:0,
from /tmp/pear/temp/Cairo/cairo.c:32:
/usr/include/php/20151012/Zend/zend_API.h:433:14: note: declared here
ZEND_API int add_next_index_string(zval *arg, const char *str);
^
/tmp/pear/temp/Cairo/cairo.c: In function ‘zif_cairo_status_to_string’:
/tmp/pear/temp/Cairo/cairo.c:820:49: error: macro "RETURN_STRING" passed
2 arguments, but takes just 1
RETURN_STRING(cairo_status_to_string(status), 1);
^
/tmp/pear/temp/Cairo/cairo.c:820:2: error: ‘RETURN_STRING’ undeclared
(first use in this function)
RETURN_STRING(cairo_status_to_string(status), 1);
^
/tmp/pear/temp/Cairo/cairo.c: In function ‘zim_Cairo_statusToString’:
/tmp/pear/temp/Cairo/cairo.c:838:49: error: macro "RETURN_STRING" passed
2 arguments, but takes just 1
RETURN_STRING(cairo_status_to_string(status), 1);
^
/tmp/pear/temp/Cairo/cairo.c:838:2: error: ‘RETURN_STRING’ undeclared
(first use in this function)
RETURN_STRING(cairo_status_to_string(status), 1);
^
/tmp/pear/temp/Cairo/cairo.c: In function ‘zm_startup_cairo’:
/tmp/pear/temp/Cairo/cairo.c:1220:65: error: ‘ZEND_ACC_FINAL_CLASS’
undeclared (first use in this function)
cairo_ce_cairo->ce_flags |= ZEND_ACC_EXPLICIT_ABSTRACT_CLASS |
ZEND_ACC_FINAL_CLASS;
^
Makefile:194: polecenia dla obiektu 'cairo.lo' nie powiodły się
make: *** [cairo.lo] Błąd 1
ERROR: `make' failed

Borys Pogoreło

unread,
Oct 30, 2019, 12:08:47 PM10/30/19
to
Dnia Tue, 29 Oct 2019 13:24:55 +0100, RM napisał(a):

> Przy instalacji PHP-GTK dowiedziałem się że potzrebuję mieć
> zainstalowane rozszerzenie php o nazwie cairo-0.3.2. Wydanie polecenia:
> sudo pecl install cairo-0.3.2
> wywala mi błędy, nie wiem co zrobić.

Wygląda jakbyś potrzebował pakietu w rodzaju php-dev.

--
Borys Pogoreło
borys(#)leszno,edu,pl

RM

unread,
Oct 30, 2019, 12:52:25 PM10/30/19
to
W dniu 30.10.2019 o 17:05, Borys Pogoreło pisze:
> Dnia Tue, 29 Oct 2019 13:24:55 +0100, RM napisał(a):
>
>> Przy instalacji PHP-GTK dowiedziałem się że potzrebuję mieć
>> zainstalowane rozszerzenie php o nazwie cairo-0.3.2. Wydanie polecenia:
>> sudo pecl install cairo-0.3.2
>> wywala mi błędy, nie wiem co zrobić.
>
> Wygląda jakbyś potrzebował pakietu w rodzaju php-dev.
>
Zainstalowałem php-dev, php-all-dev, php7.0-dev. Nie pomogło. Jak
sprawdzić którego pakietu brakuje?

Borys Pogoreło

unread,
Oct 30, 2019, 6:41:30 PM10/30/19
to
Dnia Wed, 30 Oct 2019 17:52:23 +0100, RM napisał(a):

>> Wygląda jakbyś potrzebował pakietu w rodzaju php-dev.
>>
> Zainstalowałem php-dev, php-all-dev, php7.0-dev. Nie pomogło. Jak
> sprawdzić którego pakietu brakuje?

Wrzuciłem ten błąd w Google i wygląda jakbyś próbował skompilować pakiet
dla PHP 5 pod PHP 7 albo odwrotnie.

--
Borys Pogoreło
borys(#)leszno,edu,pl

RM

unread,
Oct 31, 2019, 10:02:20 AM10/31/19
to
W dniu 30.10.2019 o 23:42, Borys Pogoreło pisze:
> Dnia Wed, 30 Oct 2019 17:52:23 +0100, RM napisał(a):
>
>>> Wygląda jakbyś potrzebował pakietu w rodzaju php-dev.
>>>
>> Zainstalowałem php-dev, php-all-dev, php7.0-dev. Nie pomogło. Jak
>> sprawdzić którego pakietu brakuje?
>
> Wrzuciłem ten błąd w Google i wygląda jakbyś próbował skompilować pakiet
> dla PHP 5 pod PHP 7 albo odwrotnie.
>
Ściągnąłem źródła cairo-php7 i mam w katalogu cairo-php7:

appveyor.yml config.m4 CREDITS examples README.md tests
CHANGELOG config.w32 docs LICENSE src

W katalogu cairo-php7/src są pliki:

cairo.c font_options.c php_cairo_api.h region.c
cairo_jpg.c ft_font.c php_cairo.h scaled_font.c
cairo_jpg.h image_surface.c php_cairo_internal.h sub_surface.c
context.c matrix.c ps_surface.c surface.c
exception.c path.c quartz_font.c svg_surface.c
font.c pattern.c recording_surface.c win32_font.c
font_face.c pdf_surface.c rectangle.c

Jak mam to skompilować? Nie ma makefile.

RM

unread,
Oct 31, 2019, 10:39:56 AM10/31/19
to
W dniu 31.10.2019 o 15:02, RM pisze:
Poradziłem sobie: skompilowałem, zainstalowałem, przebootoweałem. Mam
cairo w phpinfo.
Jednak przy configure dla PHP-GTK mam:

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-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20151012
-I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM
-I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext
-I/usr/include/php/20151012/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20151012
checking for PHP installed headers prefix... /usr/include/php/20151012
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.16 (ok)
checking for gawk... gawk
checking for PHP-GTK support... yes, shared
checking for PHP executable... found version 7.0.33-0ubuntu0.16.04.6
checking for gawk... (cached) gawk
checking whether to include debugging symbols... no
checking for pkg-config... /usr/bin/pkg-config
checking for GLIB - version >= 2.6.0... yes (version 2.48.2)
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GTK+ - version >= 2.6.0... yes (version 2.24.30)
checking for atk >= 1.9.0... yes
checking ATK_CFLAGS... -I/usr/include/atk-1.0 -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include
checking ATK_LIBS... -latk-1.0 -lgobject-2.0 -lglib-2.0
checking for pango >= 1.8.0... yes
checking PANGO_CFLAGS... -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
checking PANGO_LIBS... -lpango-1.0 -lgobject-2.0 -lglib-2.0
checking for cairo >= 1.4.0... yes
checking CAIRO_CFLAGS... -I/usr/include/cairo -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1
-I/usr/include/freetype2 -I/usr/include/libpng12
checking CAIRO_LIBS... -lcairo
checking for cairo php extension... no
configure: error: cairo php extension not found.

Nie wiem co zrobić.

RM

unread,
Oct 31, 2019, 10:51:52 AM10/31/19
to
W dniu 31.10.2019 o 15:39, RM pisze:
> Nie wiem co zrobić.

W /etc/php/7.0/apache2/php.ini mam:

extension=/usr/lib/php/20151012/eos_datastructures.so
extension=/usr/lib/php/20151012/cairo.so

i takie pliki istnieją.

RM

unread,
Nov 6, 2019, 3:13:59 AM11/6/19
to
W dniu 29.10.2019 o 13:24, RM pisze:
> Przy instalacji PHP-GTK dowiedziałem się że potzrebuję mieć
> zainstalowane rozszerzenie php o nazwie cairo-0.3.2. Wydanie polecenia:
>  sudo pecl install cairo-0.3.2
> wywala mi błędy, nie wiem co zrobić.

Czy istnieje alternatywa dla PHP-GTK która nie wymaga instalacji
niestandardowych rozszerzeń PHP i umożliwia programowanie w Linuxie i
Windows?
0 new messages