krakjoe / ui

Cross platform UI development in PHP
Other
518 stars 39 forks source link

Unable to install on linux #43

Closed matheusfaustino closed 6 years ago

matheusfaustino commented 6 years ago

Hello guys, first of all, thank you very much for your work and time to create this. But sadly, I'm getting an error when I tried to install it in my linux, could you help me with that?

I'm following the tutorial of installation from here http://php.net/manual/en/ui.setup.php. I installed the last version of Libui.

Thank you in advance.

Error message:

downloading UI-2.0.0.tgz ...
Starting to download UI-2.0.0.tgz (49,498 bytes)
.............done: 49,498 bytes
79 source files, building
running: phpize
Configuring for:
PHP Api Version:         20170718
Zend Module Api No:      20170718
Zend Extension Api No:   320170718
building in /tmp/pear/temp/pear-build-root48Co5t/UI-2.0.0
running: /tmp/pear/temp/UI/configure --with-php-config=/usr/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-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/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20170718
checking for PHP installed headers prefix... /usr/include/php/20170718
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.0.1 (ok)
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for ui support... yes, shared
checking for ui threads... no
checking for ui files in default path... found in /usr/local
checking for uiInit in -lui... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/x86_64-linux-gnu-ld
checking if the linker (/usr/bin/x86_64-linux-gnu-ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/x86_64-linux-gnu-ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) nawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
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 for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/x86_64-linux-gnu-ld -m elf_x86_64) 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
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-root48Co5t/UI-2.0.0/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/UI -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root48Co5t/UI-2.0.0/include -I/tmp/pear/temp/pear-build-root48Co5t/UI-2.0.0/main -I/tmp/pear/temp/UI -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /tmp/pear/temp/UI/ui.c -o ui.lo
libtool: compile:  cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/UI -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root48Co5t/UI-2.0.0/include -I/tmp/pear/temp/pear-build-root48Co5t/UI-2.0.0/main -I/tmp/pear/temp/UI -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/UI/ui.c  -fPIC -DPIC -o .libs/ui.o
In file included from /tmp/pear/temp/UI/ui.c:76:0:
/tmp/pear/temp/UI/classes/descriptor.h:27:2: error: unknown type name ‘uiDrawTextFontDescriptor’
  uiDrawTextFontDescriptor d;
  ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/pear/temp/UI/ui.c:77:0:
/tmp/pear/temp/UI/classes/font.h:24:2: error: unknown type name ‘uiDrawTextFont’
  uiDrawTextFont* f;
  ^~~~~~~~~~~~~~
/tmp/pear/temp/UI/classes/font.h:25:2: error: unknown type name ‘uiDrawTextFontMetrics’
  uiDrawTextFontMetrics m;
  ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/php/20170718/main/php.h:40:0,
                 from /tmp/pear/temp/UI/ui.c:25:
/tmp/pear/temp/UI/ui.c: In function ‘zm_startup_ui’:
/usr/include/php/20170718/Zend/zend_API.h:131:45: warning: implicit declaration of function ‘zm_startup_UI_EditableCombo’; did you mean ‘zm_startup_UI_Ecombo’? [-Wimplicit-function-declaration]
 #define ZEND_MODULE_STARTUP_N(module)       zm_startup_##module
                                             ^
/usr/include/php/20170718/main/php.h:442:20: note: in expansion of macro ‘ZEND_MODULE_STARTUP_N’
 #define PHP_MINIT  ZEND_MODULE_STARTUP_N
                    ^~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/UI/ui.c:151:2: note: in expansion of macro ‘PHP_MINIT’
  PHP_MINIT(UI_EditableCombo)(INIT_FUNC_ARGS_PASSTHRU);
  ^~~~~~~~~
/usr/include/php/20170718/Zend/zend_API.h:131:45: warning: implicit declaration of function ‘zm_startup_UI_MenuItem’; did you mean ‘zm_startup_UI_Item’? [-Wimplicit-function-declaration]
 #define ZEND_MODULE_STARTUP_N(module)       zm_startup_##module
                                             ^
/usr/include/php/20170718/main/php.h:442:20: note: in expansion of macro ‘ZEND_MODULE_STARTUP_N’
 #define PHP_MINIT  ZEND_MODULE_STARTUP_N
                    ^~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/UI/ui.c:155:2: note: in expansion of macro ‘PHP_MINIT’
  PHP_MINIT(UI_MenuItem)(INIT_FUNC_ARGS_PASSTHRU);
  ^~~~~~~~~
/usr/include/php/20170718/Zend/zend_API.h:131:45: warning: implicit declaration of function ‘zm_startup_UI_DrawMatrix’; did you mean ‘zm_startup_UI_DrawPath’? [-Wimplicit-function-declaration]
 #define ZEND_MODULE_STARTUP_N(module)       zm_startup_##module
                                             ^
/usr/include/php/20170718/main/php.h:442:20: note: in expansion of macro ‘ZEND_MODULE_STARTUP_N’
 #define PHP_MINIT  ZEND_MODULE_STARTUP_N
                    ^~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/UI/ui.c:163:2: note: in expansion of macro ‘PHP_MINIT’
  PHP_MINIT(UI_DrawMatrix)(INIT_FUNC_ARGS_PASSTHRU);
  ^~~~~~~~~
/tmp/pear/temp/UI/ui.c:169:2: warning: implicit declaration of function ‘php_ui_control_finalize’; did you mean ‘php_ui_control_fetch’? [-Wimplicit-function-declaration]
  php_ui_control_finalize();
  ^~~~~~~~~~~~~~~~~~~~~~~
  php_ui_control_fetch
/tmp/pear/temp/UI/ui.c: In function ‘zif_fontFamilies’:
/tmp/pear/temp/UI/ui.c:320:2: error: unknown type name ‘uiDrawFontFamilies’; did you mean ‘uiDrawTextAlign’?
  uiDrawFontFamilies* families;
  ^~~~~~~~~~~~~~~~~~
  uiDrawTextAlign
/tmp/pear/temp/UI/ui.c:329:13: warning: implicit declaration of function ‘uiDrawListFontFamilies’; did you mean ‘zif_fontFamilies’? [-Wimplicit-function-declaration]
  families = uiDrawListFontFamilies();
             ^~~~~~~~~~~~~~~~~~~~~~
             zif_fontFamilies
/tmp/pear/temp/UI/ui.c:329:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  families = uiDrawListFontFamilies();
           ^
/tmp/pear/temp/UI/ui.c:330:30: warning: implicit declaration of function ‘uiDrawFontFamiliesNumFamilies’ [-Wimplicit-function-declaration]
  for (familiy = 0; familiy < uiDrawFontFamiliesNumFamilies(families); familiy++) {
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/UI/ui.c:331:39: warning: implicit declaration of function ‘uiDrawFontFamiliesFamily’; did you mean ‘zif_fontFamilies’? [-Wimplicit-function-declaration]
   add_next_index_string(return_value, uiDrawFontFamiliesFamily(families, familiy));
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
                                       zif_fontFamilies
/tmp/pear/temp/UI/ui.c:331:39: warning: passing argument 2 of ‘add_next_index_string’ makes pointer from integer without a cast [-Wint-conversion]
In file included from /usr/include/php/20170718/main/php.h:40:0,
                 from /tmp/pear/temp/UI/ui.c:25:
/usr/include/php/20170718/Zend/zend_API.h:450:14: note: expected ‘const char *’ but argument is of type ‘int’
 ZEND_API int add_next_index_string(zval *arg, const char *str);
              ^~~~~~~~~~~~~~~~~~~~~
/tmp/pear/temp/UI/ui.c:334:2: warning: implicit declaration of function ‘uiDrawFreeFontFamilies’; did you mean ‘zif_fontFamilies’? [-Wimplicit-function-declaration]
  uiDrawFreeFontFamilies(families);
  ^~~~~~~~~~~~~~~~~~~~~~
  zif_fontFamilies
Makefile:195: recipe for target 'ui.lo' failed
make: *** [ui.lo] Error 1
ERROR: `make' failed
petk commented 6 years ago

If it helps, I've followed the following procedure (this is for PHP 7.2):

mkdir -p /opt/ && cd /opt
# Install libui dependency
git clone git://github.com/andlabs/libui
cd libui
# ui extension currently only works with alpha3.5 version of libui
git checkout alpha3.5 
mkdir -p build
cd build
cmake ..
make
cd ..
# Copy/install header and generated shared object files to system folders, this is for Ubuntu/Debian:
install ui.h /usr/include/
install ui_unix.h /usr/include/
install build/out/libui.so /usr/lib/
install build/out/libui.so.0 /usr/lib/

Then the ui extension installation:

/opt
git clone git://github.com/krakjoe/ui
cd ui
patch -p1 < ../box.patch
phpize
./configure
make
cp /opt/ui/modules/ui.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718/
echo 'extension=ui' > /usr/local/etc/php/conf.d/ui.ini

Patch file (already sent as a pull request):

--- a/classes/box.c
+++ b/classes/box.c
@@ -185,7 +185,7 @@
 } /* }}} */

 #if PHP_VERSION_ID >= 70200
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(php_ui_box_is_padded_info, 0, 0, _IS_BOOL, NULL, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(php_ui_box_is_padded_info, 0, 0, _IS_BOOL, 0)
 #else
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(php_ui_box_is_padded_info, 0, 0, _IS_BOOL, NULL, 0)
 #endif

And the following should output the ini configs:

php --ri ui

Output:

ui
ui support => enabled
matheusfaustino commented 6 years ago

Hi @petk, thanks for your help and for your time. The libui installation worked well on your way, but the extension, sadly, no :( .

I forgot to mention the env I'm trying to do that. It's basically a fresh install of Ubuntu 18.04.

PHP Version (it's 7.2.5):

PHP 7.2.5-0ubuntu0.18.04.1 (cli) (built: May  9 2018 17:21:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.5-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

Even after all your tutorial I still getting the same error and I run make in the extension folder, after the ./configure.

/bin/bash /opt/ui/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/opt/ui -DPHP_ATOM_INC -I/opt/ui/include -I/opt/ui/main -I/opt/ui -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /opt/ui/ui.c -o ui.lo 
libtool: compile:  cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/opt/ui -DPHP_ATOM_INC -I/opt/ui/include -I/opt/ui/main -I/opt/ui -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /opt/ui/ui.c  -fPIC -DPIC -o .libs/ui.o
In file included from /opt/ui/ui.c:76:0:
./classes/descriptor.h:27:2: error: unknown type name ‘uiDrawTextFontDescriptor’
  uiDrawTextFontDescriptor d;
  ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ui/ui.c:77:0:
./classes/font.h:24:2: error: unknown type name ‘uiDrawTextFont’
  uiDrawTextFont* f;
  ^~~~~~~~~~~~~~
./classes/font.h:25:2: error: unknown type name ‘uiDrawTextFontMetrics’
  uiDrawTextFontMetrics m;
  ^~~~~~~~~~~~~~~~~~~~~
/opt/ui/ui.c: In function ‘zif_fontFamilies’:
/opt/ui/ui.c:385:2: error: unknown type name ‘uiDrawFontFamilies’; did you mean ‘uiDrawTextAlign’?
  uiDrawFontFamilies* families;
  ^~~~~~~~~~~~~~~~~~
  uiDrawTextAlign
/opt/ui/ui.c:394:13: warning: implicit declaration of function ‘uiDrawListFontFamilies’; did you mean ‘zif_fontFamilies’? [-Wimplicit-function-declaration]
  families = uiDrawListFontFamilies();
             ^~~~~~~~~~~~~~~~~~~~~~
             zif_fontFamilies
/opt/ui/ui.c:394:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  families = uiDrawListFontFamilies();
           ^
/opt/ui/ui.c:395:30: warning: implicit declaration of function ‘uiDrawFontFamiliesNumFamilies’ [-Wimplicit-function-declaration]
  for (familiy = 0; familiy < uiDrawFontFamiliesNumFamilies(families); familiy++) {
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/ui/ui.c:396:39: warning: implicit declaration of function ‘uiDrawFontFamiliesFamily’; did you mean ‘zif_fontFamilies’? [-Wimplicit-function-declaration]
   add_next_index_string(return_value, uiDrawFontFamiliesFamily(families, familiy));
                                       ^~~~~~~~~~~~~~~~~~~~~~~~
                                       zif_fontFamilies
/opt/ui/ui.c:396:39: warning: passing argument 2 of ‘add_next_index_string’ makes pointer from integer without a cast [-Wint-conversion]
In file included from /usr/include/php/20170718/main/php.h:40:0,
                 from /opt/ui/ui.c:25:
/usr/include/php/20170718/Zend/zend_API.h:450:14: note: expected ‘const char *’ but argument is of type ‘int’
 ZEND_API int add_next_index_string(zval *arg, const char *str);
              ^~~~~~~~~~~~~~~~~~~~~
/opt/ui/ui.c:399:2: warning: implicit declaration of function ‘uiDrawFreeFontFamilies’; did you mean ‘zif_fontFamilies’? [-Wimplicit-function-declaration]
  uiDrawFreeFontFamilies(families);
  ^~~~~~~~~~~~~~~~~~~~~~
  zif_fontFamilies
Makefile:195: recipe for target 'ui.lo' failed
make: *** [ui.lo] Error 1
petk commented 6 years ago

I think this is the issue of not checking out the Alpha 3.5 version of libui from the Git repository. There are removed uiDrawText* things so maybe that's the reason.

Or another reason, try also checking out the latest release v2.0.0 of the ui extension...

youyoubao commented 6 years ago

@petk
You are right, my problem has been solved

matheusfaustino commented 6 years ago

I can't get it done :/ Could you say what you did @dormscript , please?

Jerry-Shaw commented 6 years ago

@matheusfaustino , using the way @petk said. Check out https://github.com/andlabs/libui/releases/tag/alpha3.5, do not use the latest commit.

Just tried, and successed.

matheusfaustino commented 6 years ago

sadly, I could not make it. I don't know what more I can try :/

Here is the error (it's the same of before):

/bin/bash /opt/ui/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/opt/ui -DPHP_ATOM_INC -I/opt/ui/include -I/opt/ui/main -I/opt/ui -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /opt/ui/ui.c -o ui.lo 
libtool: compile:  cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/opt/ui -DPHP_ATOM_INC -I/opt/ui/include -I/opt/ui/main -I/opt/ui -I/usr/include/php/20170718 -I/usr/include/php/20170718/main -I/usr/include/php/20170718/TSRM -I/usr/include/php/20170718/Zend -I/usr/include/php/20170718/ext -I/usr/include/php/20170718/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /opt/ui/ui.c  -fPIC -DPIC -o .libs/ui.o
In file included from /opt/ui/ui.c:76:0:
./classes/descriptor.h:27:2: error: unknown type name ‘uiDrawTextFontDescriptor’
  uiDrawTextFontDescriptor d;
  ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ui/ui.c:77:0:
./classes/font.h:24:2: error: unknown type name ‘uiDrawTextFont’
  uiDrawTextFont* f;
  ^~~~~~~~~~~~~~
./classes/font.h:25:2: error: unknown type name ‘uiDrawTextFontMetrics’
  uiDrawTextFontMetrics m;
  ^~~~~~~~~~~~~~~~~~~~~
/opt/ui/ui.c: In function ‘zif_fontFamilies’:
/opt/ui/ui.c:385:2: error: unknown type name ‘uiDrawFontFamilies’; did you mean ‘uiDrawTextAlign’?
  uiDrawFontFamilies* families;

But the types are there, in the files inside /usr/include/: /usr/include: sudo grep -r 'uiDrawTextFontDescriptor' .

./ui.h:typedef struct uiDrawTextFontDescriptor uiDrawTextFontDescriptor;
./ui.h:struct uiDrawTextFontDescriptor {
./ui.h:_UI_EXTERN uiDrawTextFont *uiDrawLoadClosestFont(const uiDrawTextFontDescriptor *desc);
./ui.h:_UI_EXTERN void uiDrawTextFontDescribe(uiDrawTextFont *font, uiDrawTextFontDescriptor *desc)

I already tried libui@alpha3.5 and libui@alpha3.1 with ui@v2.0.0 and ui@develop (with and without patch). I don't know if it's a problem with ubuntu... I think I'll try with arch.

Thank you all for the time and patience.

matheusfaustino commented 6 years ago

I just tested what @petk told to do on Arch and it worked like a charm. Maybe the problem is related with ubuntu or debian, I dunno know.

matheusfaustino commented 6 years ago

I test the build on a fresh ubuntu 18.04 installation and it worked too. :/ Well, probably is something about my machine.

Jerry-Shaw commented 6 years ago

I built it under window 10 without problem.

matheusfaustino commented 6 years ago

Hi, I'm gonna close it. The build worked on my osx and that is fine. Sadly, on my ubuntu it didn't. Maybe a problem with ubuntu, ubuntu is a little weird. But, thanks everyone and thanks @petk for tutorial.

devnix commented 5 years ago

@matheusfaustino For me, the problem on my Ubuntu based distro was the location of the header files when installing libui.

Try to store them in /usr/local/include:

install ui.h /usr/local/include            
install ui_unix.h /usr/local/include
install build/out/libui.so /usr/lib/
install build/out/libui.so.0 /usr/lib/
devnix commented 5 years ago

Note: to run the snake demo on Elementary 0.4.1 Loki (based on Ubuntu 16.04) I had to compile the HarfBuzz library by myself.

When I tried to run it, I've get the following message:

php: symbol lookup error: /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined symbol: hb_glib_script_to_script

Following the clue that I found here, I've downlaoded the 1.0.6 version as my system was using the 1.0.* branch, then compiled and installed with the following commands:

./configure --prefix=/usr --with-gobject &&
make
sudo make install

And, voilà!

wenzhizhong commented 4 years ago
box.patch

Hello @petk, I want to know where is box.patch? Thanks!

petk commented 4 years ago

@wenzhizhong it was the diff in the next code section above. This one:

--- a/classes/box.c
+++ b/classes/box.c
@@ -185,7 +185,7 @@
 } /* }}} */

 #if PHP_VERSION_ID >= 70200
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(php_ui_box_is_padded_info, 0, 0, _IS_BOOL, NULL, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(php_ui_box_is_padded_info, 0, 0, _IS_BOOL, 0)
 #else
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(php_ui_box_is_padded_info, 0, 0, _IS_BOOL, NULL, 0)
 #endif