From: <emp...@gm...> - 2005-03-23 07:31:47
|
----- Original Message ----- From: "Neal Richter" <ne...@ri...> To: <emp...@gm...> Cc: <htd...@li...> Sent: Monday, March 21, 2005 8:10 PM Subject: Re: [htdig-dev] configure in libhtdigphp looking for libhtdig_api.h > Roger, > This is not a required library to use HtDig. It's main use is if > you want to write a PHP page to query the index built with HtDig (or a > program which calls libhtdig functions). > Thank you Neal I learn a lot with contributions, you never know if it is what you were looking for until you try it. And probably developers get sharper when people run their codes. And PHP querying directly the index? that enough to make the test. > Basically the configure in libhtdigphp was altered from the > 'libbz' module that can be built in PHP. > > ./configure --with-htdig=xxxx > > Where xxx your-htdig-dir/libhtdig > I tried this and didn't work, anyway I put HTDIG_DIR=/path/to/libhtdig in configure and everything run ok. > After configure you will have to run 'make' which compile > htdigphp.c and fail onthe link. > > Edit relink.sh and change the references to your own directories > and run it. You should have a one-piece library libhtdigphp.so which you > can use from PHP code. It's basically a wrapper library for libhtdig. I edited relink.sh and I got htdigphp.so in /module ready for use. I copy htdigphp.so to /usr/lib/php4/ (where my php libs are) > > I haven't bothered to clean this up as you are the first person to > report trying to build it. > > I probably need to ditchthe configure and have a simple makefile > with clear instructions for various path strings to make the process > more friendly. > > htdig_search.php contains example code to query the index. > > Thanks > > Neal. Then when I run htdig.php I get this error: Warning: dl(): Unable to load dynamic library '/usr/lib/php4/htdigphp.so' - /usr/lib/php4/htdigphp.so: undefined symbol: htsearch_get_nth_match in /home/elsalvadorsearch/public_html/htdigphp/htdig.php on line 3 Can somebody help me with this? If anyone wants more server specs I'm willing to give all that you need. Thank you in advance > > On Sat, 19 Mar 2005 emp...@gm... wrote: > > > Hello htdig-devs, > > > > In configure of libhtdigphp I am having this error: > > > > <--screen dump begin--> > > > > [root@server libhtdigphp-2]# ./configure > > loading cache ./config.cache > > checking for gcc... (cached) gcc > > checking whether the C compiler (gcc ) works... yes > > checking whether the C compiler (gcc ) is a cross-compiler... no > > checking whether we are using GNU C... (cached) yes > > checking whether gcc accepts -g... (cached) yes > > checking whether gcc and cc understand -c and -o together... (cached) yes > > checking for PHP prefix... /usr > > checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Ze nd -I/usr/include/php/TSRM > > checking for PHP extension directory... /usr/lib/php4 > > checking for HtDig support... yes, shared > > checking for HtDig in default path... not found > > configure: error: Please reinstall the HtDig distribution > > [root@server libhtdigphp-2] > > > > <--screen dump end--> > > > > My HtDig distribution (htdig-3.2b5-libhtdig) is installed freshly and works smoothly (htdig indexing and htsearch giving results). > > > > I already 'make' libhtdig successfully with minor warnings (deprecated headers). > > > > now, configure in libhtdigphp-2 make this check: > > > > <--extracted code begin--> > > ... > > if test "$PHP_HTDIG" != "no"; then > > > > if test -r $PHP_HTDIG/include/libhtdig_api.h; then > > HTDIG_DIR=$PHP_HTDIG > > else > > echo $ac_n "checking for HtDig in default path""... $ac_c" 1>&6 > > echo "configure:1067: checking for HtDig in default path" >&5 > > for i in /usr/local /usr; do > > if test -r $i/include/libhtdig_api.h; then > > HTDIG_DIR=$i > > echo "$ac_t""found in $i" 1>&6 > > fi > > done > > fi > > > > if test -z "$HTDIG_DIR"; then > > echo "$ac_t""not found" 1>&6 > > { echo "configure: error: Please reinstall the HtDig distribution" 1>&2; exit 1; } > > fi > > ... > > <--extracted code end--> > > > > It's obvious that I have to have libhtdig_api.h in some /usr/local/include/ or /usr/inlcude directory > > Why is not there? Do I have to move it there manually ? What else do I have to copy from libhtdig dir to include or lib ? > > > > right now I have libhtdig_api.h only here: > > > > [root@server libhtdigphp-2]# locate libhtdig_api.h > > /src/htdig-3.2b5-libhtdig/libhtdig/libhtdig_api.h > > > > Readme doesn't say anything about this, and I want to have this libraries in the right place before continue. > > I would really appreciate your help. > > > > Roger Moreno > > -- > Neal Richter > Knowledgebase Developer > RightNow Technologies, Inc. > Customer Service for Every Web Site > Office: 406-522-1485 > > |