krakjoe / ui

Cross platform UI development in PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

configure: error: Please reinstall the ui distribution

RyanNerd opened this issue · comments

I'm trying to get this to work but when I run configure I get the output below. I've already compiled the libui.so from master on github, and added this to php.ini as an extention. Made sure this file could also be found in my path. What ui distribution does configure want?

ᐅ ./configure               
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-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -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
checking for PHP extension directory... /usr/lib/php/extensions/no-debug-zts-20160303
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... yes
checking for re2c... re2c
checking for re2c version... 0.16 (ok)
checking for gawk... gawk
checking for ui support... yes, shared
checking for ui threads... no
checking for ui files in default path... not found
configure: error: Please reinstall the ui distribution

@Stricted Thanks. I thought something like this was the answer.

I think this issue should remain open. I spent a bit of time looking through the configure files and it looks like you can specify a path to libui using --with-ui=path/to/libui

config.m4

PHP_ARG_WITH(ui,           for ui support,
[  --with-ui               Include ui support])

PHP_ARG_ENABLE(ui-threads, for ui threads,
[  --enable-ui-threads     Initialize X11 threads], no, no)

if test "$PHP_UI" != "no"; then
  SEARCH_PATH="/usr/local /usr"
  SEARCH_FOR="/include/ui.h"  # you most likely want to change this
  if test -r $PHP_UI/$SEARCH_FOR; then # path given as parameter
    UI_DIR=$PHP_UI
  else
    AC_MSG_CHECKING([for ui files in default path])
    for i in $SEARCH_PATH ; do
      if test -r $i/$SEARCH_FOR; then
        UI_DIR=$i
        AC_MSG_RESULT(found in $i)
      fi
    done
  fi

But it is broken. This needs to be fixed. Not everyone that uses PHP extensions is a C developer (myself included) and not being able to do:

phpize
./configure --with-ui=/where/libui/lives
make

is a buzz kill. I installed the sodium extension which also relies on the sodium external library, and I could select where the includes were located...

What's broken ?

commented

checking for ui threads... no

should i have to install pthreads first and use PHP Thread Safe?

FWIW, the following libui patch adds make install to libui and doing that is one way to fix this issue.

andlabs/libui#232

Since I can't determine what is broken, I'm closing this ... if something is broken, please open a new issue and be as clear as possible ...

Note that you can specify the path to libui files, if you have a problem it's that libui itself does not have a make install, and there's not much I can do about that ...