znaczacy > comp.lang.* > comp.lang.php

RM (29.10.2019, 14:24)
Przy instalacji PHP-GTK dowiedzialem sie ze potzrebuje miec
zainstalowane rozszerzenie php o nazwie cairo-0.3.2. Wydanie polecenia:
sudo pecl install cairo-0.3.2
wywala mi bledy, nie wiem co zrobic.

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 powiodly sie
make: *** [cairo.lo] Blad 1
ERROR: `make' failed
Borys Pogorelo (30.10.2019, 18:05)
Dnia Tue, 29 Oct 2019 13:24:55 +0100, RM napisal(a):

> Przy instalacji PHP-GTK dowiedzialem sie ze potzrebuje miec
> zainstalowane rozszerzenie php o nazwie cairo-0.3.2. Wydanie polecenia:
> sudo pecl install cairo-0.3.2
> wywala mi bledy, nie wiem co zrobic.


Wyglada jakbys potrzebowal pakietu w rodzaju php-dev.
RM (30.10.2019, 18:52)
W dniu 30.10.2019 o 17:05, Borys Pogorelo pisze:
> Dnia Tue, 29 Oct 2019 13:24:55 +0100, RM napisal(a):
>> Przy instalacji PHP-GTK dowiedzialem sie ze potzrebuje miec
>> zainstalowane rozszerzenie php o nazwie cairo-0.3.2. Wydanie polecenia:
>> sudo pecl install cairo-0.3.2
>> wywala mi bledy, nie wiem co zrobic.

> Wyglada jakbys potrzebowal pakietu w rodzaju php-dev.

Zainstalowalem php-dev, php-all-dev, php7.0-dev. Nie pomoglo. Jak
sprawdzic ktrego pakietu brakuje?
Borys Pogorelo (31.10.2019, 00:42)
Dnia Wed, 30 Oct 2019 17:52:23 +0100, RM napisal(a):

>> Wyglada jakbys potrzebowal pakietu w rodzaju php-dev.

> Zainstalowalem php-dev, php-all-dev, php7.0-dev. Nie pomoglo. Jak
> sprawdzic ktrego pakietu brakuje?


Wrzucilem ten blad w Google i wyglada jakbys prbowal skompilowac pakiet
dla PHP 5 pod PHP 7 albo odwrotnie.
RM (31.10.2019, 16:02)
W dniu 30.10.2019 o 23:42, Borys Pogorelo pisze:
> Dnia Wed, 30 Oct 2019 17:52:23 +0100, RM napisal(a):
>>> Wyglada jakbys potrzebowal pakietu w rodzaju php-dev.

>> Zainstalowalem php-dev, php-all-dev, php7.0-dev. Nie pomoglo. Jak
>> sprawdzic ktrego pakietu brakuje?

> Wrzucilem ten blad w Google i wyglada jakbys prbowal skompilowac pakiet
> dla PHP 5 pod PHP 7 albo odwrotnie. Sciagnalem zrdla 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 sa 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 skompilowac? Nie ma makefile.
RM (31.10.2019, 16:39)
W dniu 31.10.2019 o 15:02, RM pisze:
[..]
> font.c       pattern.c        recording_surface.c   win32_font.c
> font_face.c  pdf_surface.c    rectangle.c
> Jak mam to skompilowac? Nie ma makefile.

Poradzilem sobie: skompilowalem, zainstalowalem, przebootowealem. 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 zrobic.
RM (31.10.2019, 16:51)
W dniu 31.10.2019 o 15:39, RM pisze:
> Nie wiem co zrobic.


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 istnieja.
RM (06.11.2019, 10:13)
W dniu 29.10.2019 o 13:24, RM pisze:
> Przy instalacji PHP-GTK dowiedzialem sie ze potzrebuje miec
> zainstalowane rozszerzenie php o nazwie cairo-0.3.2. Wydanie polecenia:
>  sudo pecl install cairo-0.3.2
> wywala mi bledy, nie wiem co zrobic.


Czy istnieje alternatywa dla PHP-GTK ktra nie wymaga instalacji
niestandardowych rozszerzen PHP i umozliwia programowanie w Linuxie i
Windows?
Podobne wtki