-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to install on linux #43
Comments
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 |
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):
Even after all your tutorial I still getting the same error and I run make in the extension folder, after the ./configure.
|
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... |
@petk |
I can't get it done :/ |
@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. |
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):
But the types are there, in the files inside
I already tried [email protected] and [email protected] with [email protected] and ui@develop (with and without patch). Thank you all for the time and patience. |
I just tested what @petk told to do on Arch and it worked like a charm. |
I test the build on a fresh ubuntu 18.04 installation and it worked too. :/ |
I built it under window 10 without problem. |
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. |
@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
|
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:
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:
And, voilà! |
Hello @petk, I want to know where is box.patch? Thanks! |
@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 |
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:
The text was updated successfully, but these errors were encountered: