LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Unable to build KDE Application Manuals search index (https://www.linuxquestions.org/questions/slackware-14/unable-to-build-kde-application-manuals-search-index-369531/)

Erik_FL 10-03-2005 08:32 PM

Unable to build KDE Application Manuals search index
 
I'm getting an error whenever I try to create the seach index for the KDE Application Manuals in the KDE Help Utility. Because of this I can't search for anything in KDE help.

Here is the error I get.

INDEXDIR: /home/erik/.kde/share/apps/khelpcenter/index/
Creating index for 'kde_application_manuals'
FINDCMD: find /opt/kde/share/doc/HTML/en/ -name index.docbook
htdig failed

I checked and "htdig" is installed.

I also noticed that some of the index files are created in "/home/erik/.kde/share/apps/khelpcenter/index/".
In that directory I have a file called "kde_application_manuals.conf" with the following contents:

# htdig configuration for doc 'kde_application_manuals'
#
# This file has been automatically created by KHelpcenter
common_dir: /srv/www/htdig/common/
locale: en
database_dir: /home/erik/.kde/share/apps/khelpcenter/index/
database_base: ${database_dir}/kde_application_manuals
local_urls: help://=/opt/kde/share/doc/HTML/en/ file://=/
local_urls_only: true
limit_urls_to: file:// help:/
ignore_noindex: true
max_hop_count: 4
robotstxt_name: kdedig
compression_level: 6
template_map: Long long /opt/kde/share/apps/khelpcenter/searchhandlers/htdig/htdig_long.html
search_algorithm: exact:1 prefix:0.8
maximum_pages: 1
matches_per_page: 10
start_url: file:///home/erik/.kde/share/apps/khelpcenter/index//kde_application_manuals.tmp/index.html
external_parsers: text/docbook /home/erik/.kde/share/apps/khelpcenter/index//kde_application_manuals.tmp/docbookparser
valid_extensions: .docbook .html
mime_types: /home/erik/.kde/share/apps/khelpcenter/index//kde_application_manuals.tmp/htdig_mime

The interesting thing is I don't have a "/srv/www/htdig/common/" directory. I'm wondering if that's the problem, but how to I correct the problem?

There are a few other files created in the directory "/home/erik/.kde/share/apps/khelpcenter/index/kde_application_manuals.tmp/":

docbookparser
htdig.mime
index.html

If I look at "index.html" it appears to contain references to all of the "index.docbook" files that were found.

I would appreciate any suggestions. Since I'm new to KDE, not being able to search the help is a major handicap for me.

freakyg 10-04-2005 08:23 PM

khelpcenter is part of the kdebase package..........you might re-install it using pkgtool and see if the problem goes away..........

Erik_FL 10-07-2005 11:50 AM

I tried reinstalling the kdebase package, and also the htdig package, but it didn't solve the problem.

I also tried creating the directory " /srv/www/htdig/common" with read write permissions for everyone. That also did not correct the problem. I looked for a directory with a similar name (anything ending in "htdig/common") but found no directories like that.

Does anyone have some other ideas? Do any of you know a way for me to get more information about what error occurred. The "htdig failed" message doesn't tell me much.

Erik_FL 10-08-2005 05:01 PM

Well, I've about given up on this one.

I tried completely reinstalling Slackware 10.2 from scratch, and ended up with exactly the same problem. Any time I try to create the seach index for the KDE documentation, I get the error "htdig failed".

I also tried creating a symbolic link for "/srv/www/htdig" to "/opt/www/htdig", which is actually the correct location for "htdig" on Slackware. I tried giving all users permission to write to the various directories under "htdig". I also tried to run "htdig" manually using the "-c" option to specify the configuration file that was left over from the partially completed indexing operation.

There is a bug report from someone else (Bug #112518) on the KDE site about the same problem. It's about a month old, and has a status of "Unconfirmed" and severity "Normal". It has no other information. Does that mean I am just going to have to live with the problem until someone takes a look at the bug?

I would appreciate suggestions or help from anyone.

ntallen 10-13-2005 09:59 AM

For what it's worth, I can confirm the behavior. I just installed Slackware 10.2 yesterday and see exactly the same thing and tried the same fixes as you did to no avail. I guess the /srv/ reference is a bit of a red herring. I found where that was generated, and I changed it to point to /opt/ to no effect. (generated in /opt/kde/bin/khc_docbookdig.pl and also appears in a couple other scripts there) Let me know if you find anything!

Erik_FL 10-13-2005 11:02 AM

Thanks, your post helped a lot, since you found the PERL script.
I'll take a look at the problem more when I have some time.
If I do find a solution, I'm make sure to post it here.

b_zebra 10-13-2005 06:32 PM

khelpcenter - build index
 
Hi. I've been searching and probing also with no luck. I have printed the files that I will list below and will look through them over the weekend.

/usr/share/apps/khelpcenter/searchhandlers/docbook.desktop
/usr/share/apps/khelpcenter/searchhandlers/htdig.desktop
/usr/share/apps/khelpcenter/searchhandlers/man.desktop

~/.kde/share/apps/khelpcenter/index/kde_application_manuals.tmp/docbookparser
~/.kde/share/apps/khelpcenter/index/kde_application_manuals.tmp/htdig_mime
~/.kde/share/apps/khelpcenter/index/kde_application_manuals.tmp/index.html (when i found it non-empty)

And obviously, I've glanced at the other files in that index folder.


/usr/bin/khc_docbookdig.pl
/usr/bin/khc_htdig.pl
/usr/bin/khc_htsearch.pl

/usr/share/apps/khelpcenter/khelpcenterui.rc

I think I found something in the rc file. I don't know if I can find where it leads, as I don't know exactly how to read XML code, though I have programmed in several languages. (I'm gonna learn quick though!!) On line 36 of my khelpcenterui.rc, I see:
<Action name="build_index" append="save_merge"/>
I assume this is where the help center instructs some other program/file to build the index, but I've tried to find that file with no luck. I forget the name of it now, but there was one file I found (I think .so file) that I suspect may hold something useful. I was unable to read the file because I don't have anything installed that will allow me to view/edit it.

I have customized htdig.conf and put it in my home directory to run:
htdig -c ~/htdig.conf
Really, it's just there so i can change the database directory from index to index5 (since I've tried several approaches.

I have installed htdig and all the docbook stuff. I even installed the newer htdig. I have apache running at startup. I have installed Knoppix 3.9 (May 2005 version) to my harddrive SEVERAL times. I am using khelpcenter version 3.4 (using KDE 3.4.0). Each time, I have this problem. I probably won't reinstall again, since that has not helped, even with changing the way I've done things.

I do wonder if you guys also find that the help for things you have recently installed (I used apt-get) do actually look and function as they should. For instance, I have help available for kcpuload but not for ksysv.

I really believe that I did get it working but it didn't stick after reboot. Maybe I'm just hopeful (or crazy - too many late nights and my eyes are badly strained), but I genuinely believe I got it to work but don't remember how - even if I did, it didn't stick so it's not exactly useful. But it does give me hope that we can fix this somehow. I've been looking everywhere for an answer and keep coming back to Erik_FL's postings.

Unfortunately, I may not be able to be online much this weekend (re: family), but I can still try stuff without internet and check daily for any insight you guys can provide. I'll let you know if I find anything at all.

ntallen 10-13-2005 07:12 PM

I found another hint at the following link:

http://lists.kde.org/?l=kde-usabilit...6344302854&w=2

It's a long discussion of various things, but the last paragraph alludes to a problem that might be this one, and the comment appears to be from someone who ought to know.

Erik_FL 10-13-2005 07:39 PM

This looks like a possibility.

http://mirrors.atn.ro/htdig/htdig-pa...mmandParsing.0

Patch to allow spaces to be separators for htdig command parsing.
Apparently it only accepts tab as a separator character.

ntallen 10-13-2005 07:51 PM

Sounds like it's worth a try!

Erik_FL 10-13-2005 10:57 PM

I got a little bit further, but I am still getting an error.

To get past the "htdig failed" error, I had to edit the file "/opt/kde/bin/khc_docbookdig.pl".

I changed the following lines.
Code:

my $htdigdata = "/srv/www/htdig/common/";
my $htdigbin = "/usr/bin";

The correct information is as follows.
Code:

my $htdigdata = "/opt/www/htdig/common/";
my $htdigbin = "/opt/www/htdig/bin";

After doing that I now get an error from "htmerge", which I have not been able to solve.

Here is the error.

Code:

INDEXDIR: /home/erik/.kde/share/apps/khelpcenter/index/
FINDCMD: find /opt/kde/share/doc/HTML/en/ -name index.docbook
Creating index for 'kde_application_manuals'
Warning: unknown locale!

New server: home, 80
Unknown host: home
0:0:0:file://home/erik/.kde/share/apps/khelpcenter/index/kde_application_manuals.tmp/index.html: -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- size = 25622
htdig: Run complete
htdig: 1 server seen:
htdig:    home:80 1 document
htmerge: Document database has no URLs. Check your config file and try running htdig again.

htmerge failed

The error doesn't make sense, since I do see the document database files, and they appear to have valid information.

Here is the "kde_application_manuals.conf" file being used by "htdig" and "htmerge".

Code:

# htdig configuration for doc 'kde_application_manuals'
#
# This file has been automatically created by KHelpcenter
common_dir:                /opt/www/htdig/common/
locale:                en
database_dir:          /home/erik/.kde/share/apps/khelpcenter/index/
database_base:                ${database_dir}/kde_application_manuals
local_urls:            help://=/opt/kde/share/doc/HTML/en/ file://=/
local_urls_only:        true
limit_urls_to:          file:// help:/
ignore_noindex:        true
max_hop_count:          4
robotstxt_name:        kdedig
compression_level:      6
template_map:          Long long /opt/kde/share/apps/khelpcenter/searchhandlers/htdig/htdig_long.html
search_algorithm:      exact:1 prefix:0.8
maximum_pages:          1
matches_per_page:      10
start_url:              file:///home/erik/.kde/share/apps/khelpcenter/index//kde_application_manuals.tmp/index.html
external_parsers:      text/docbook /home/erik/.kde/share/apps/khelpcenter/index//kde_application_manuals.tmp/docbookparser
valid_extensions:      .docbook .html
mime_types:            /home/erik/.kde/share/apps/khelpcenter/index//kde_application_manuals.tmp/htdig_mime

I noticed that "limit_urls_to" has only one slash after "help". I tried changing that to "help://".
That had no effect.
I also tried getting rid of the double slash after "index//".
That had no effect.

Erik_FL 10-14-2005 09:27 PM

I am still trying to get "htmerge" to work.
I fixed the "Warning: unknown locale!" problem by making this change in the file "/opt/kde/bin/khc_docbookdig.pl".

Old script.
Code:

my $locale;
if ( $lang eq "de" ) { $locale = "de_DE"; }
else { $locale = $lang; }

New script.
Code:

my $locale;
if ( $lang eq "de" ) { $locale = "de_DE"; }
elsif ( $lang eq "en" ) { $locale = "en_US"; }
else { $locale = $lang; }

I was hoping that would solve the "htmerge" problem, but it didn't.

Erik_FL 12-14-2005 10:26 AM

Ubuntu and KDE 3.5 have the same problem
 
This is just a bit of an update about the problem.
I installed Ubuntu Linux and found that it has the same problem building the KDE Application help index.
I also compiled the KDE 3.5 release from sources, and had the same problem.
Someone did report this bug to the KDE developers, but I wonder if anyone has looked into the bug.

Erik_FL 03-14-2007 10:14 AM

Slackware 11.0 still can't build help index
 
I just recently tested this with Slackware 11.0 and discovered that it is still a problem.
Also I tested with the version 2.6.17 kernel and had the same results.
If anyone has information on a way to correct this problem please post it.

gbowden 03-15-2007 04:50 PM

KDE bug report.
 
You can find the KDE bugzilla entry here.

------- Additional Comment #5 From giuseppe 2007-01-14 09:02 -------
This bug is solved on slackware
you need to edit
2 files /opt/kde/bin/khc_htdig.pl
and /opt/kde/bin/khc_docbookdig.pl
and edit the variables,should be like this

my $htdigdata = "/opt/www/htdig/common/";
my $htdigbin = "/opt/www/htdig/bin";
my $kdeprefix = "/opt/kde";


------- Additional Comment #6 From giuseppe 2007-01-19 20:17 -------
I forgot..
and edit the file /opt/kde/bin/khc_docbookdig.pl

my $htsearchpath="/opt/www/htdig/cgi-bin/htsearch";

Htdig MUST BE the latest 3.20b6


All times are GMT -5. The time now is 04:12 PM.