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 03-15-2007 11:06 PM

Quote:

Originally Posted by gbowden
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

Thanks for the information. I tried that and I get the "htmerge failed" error. That's basically as far as I got on my own. It also appears that "Comment #6" should refer to the file "khc_htsearch.pl" instead of "khc_docbookdig.pl" since the variable referred to only exists in "hkc_htsearch.pl". I tried adding or changing it in both files with the same "htmerge failed" error. It seems the whole kde help indexing is dependant on the distro. I guess I'm going to have to wait until Slackware corrects the problem.

A few people have fixed problems with building the KDE help index, but none of them seem to "fix" all the problems in the Slackware distro. I can't easily use another distro because none of them will install on my RAID controller (or at least I can't figure out how to do that).

gbowden 03-16-2007 06:58 AM

I got it to work using the method I posted.

In /opt/kde/bin/khc_htdig.pl I have the following variables:

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

In /opt/kde/bin/khc_docbookdig.pl I have the following variables:

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

In /opt/kde/bin/hkc_htsearch.pl I have the following variables:

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

I have to change $htdigbin to /usr/bin because that is where I installed the htdig binary file when I compiled the latest htdig sources.

Hope this helps you.

Regards,

Greg

Erik_FL 03-16-2007 10:33 AM

Quote:

Originally Posted by gbowden
I got it to work using the method I posted.

In /opt/kde/bin/khc_htdig.pl I have the following variables:

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

In /opt/kde/bin/khc_docbookdig.pl I have the following variables:

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

In /opt/kde/bin/hkc_htsearch.pl I have the following variables:

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

I have to change $htdigbin to /usr/bin because that is where I installed the htdig binary file when I compiled the latest htdig sources.

Hope this helps you.

Regards,

Greg

Thanks Greg. Your suggestion helped me get a bit further. As it turns out, when I used "make install" for htdig it copied the binary files to "/opt/www/bin" instead of "/opt/www/htdig/bin"

I now get an indication of "success" building the index, but the search index is apparently empty. Attempts to search for anything obviously in the application manuals return no results.

There is still an error reported in the details.

Code:

htdig: Errors to take note of:
Unknown host or unable to contact server: help://kregexpeditor/index.docbook Ref: file:///root/.kde/share/apps/khelpcenter/index/kde_application_manuals.tmp/index.html


General Maximus 03-16-2007 10:37 AM

Quote:

Originally Posted by gbowden
I forgot..
and edit the file /opt/kde/bin/khc_docbookdig.pl

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

I can't find the variable my $htsearchpath in that file. Slack 11 here. Any ideas?

Erik_FL 03-16-2007 11:25 AM

IMPORTANT! There are two errors in the information that has been posted previously.
The file name and the direcotry name for "$htsearchpath" were both incorrect.


The file "/opt/kde/bin/khc_htsearch.pl" is where this change should be made.

Code:

my $htsearchpath="/opt/www/cgi-bin/htsearch";
The above search path is different than the ones previously posted.
If "$htsearchpath" is incorrect any attempts to search the help index will yeild no results (apparently reporting no error).

I had to make two more changes to resolve all the errors.

Rename the following directory.

/opt/kde/share/doc/HTML/en/KRegExpEditor

To this

/opt/kde/share/doc/HTML/en/kregexpeditor

The error that I got was because the file name matching is case sensitive.

I also had to add this at line 80 of /opt/kde/bin/khc_docbookdig.pl
Code:

elsif ( $lang eq "en" ) { $locale = "en_US"; }
The entire section of code around line 80 now looks like this.

Code:

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

After all of these changes I am now able to successfully search the help index and obtain results. Thanks to gbowden for providing the information to get me looking in the correct places.

Erik_FL 03-16-2007 12:22 PM

Complete solution
 
To avoid confusion, here are ALL the steps that I did to correct the problems with the KDE help index.

First, it was necessary to compile and install the most recent "htdig" source.
I downloaded "htdig-3.2.0b6.tar.gz" and extracted the files to "/usr/src/htdig-3.2.0b6".
Although this step might not be necessary, it does affect the rest of the instructions for correcting the problem.
If this step is NOT done then substitute "/opt/www/htdig/bin" instead of "/opt/www/bin" in subsequent instructions.
I have only tested with the latest "htdig" so I highy recommend using that.

To compile and install "htdig" use these commands

Code:

./configure
make
make install

Rename the following directory.

/opt/kde/share/doc/HTML/en/KRegExpEditor

To this

/opt/kde/share/doc/HTML/en/kregexpeditor

That corrects an error due to case sensitive file names.

Edit the following files as indicated.

File "/opt/kde/bin/khc_docbookdig.pl" change these variables to the values indicated.

Code:

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

File "/opt/kde/bin/khc_docbookdig.pl" change this (around line 79).

Code:

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

to this

Code:

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

File "/opt/kde/bin/khc_htdig.pl" change these variables to the values indicated.

Code:

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

File "/opt/kde/bin/khc_htdig.pl" change this variable to the value indicated.

Code:

my $htsearchpath="/opt/www/cgi-bin/htsearch";
NOTE: The above change isn't required to build the indexes, but is required for search to find any results when searching the indexes.

The "correct" location of the "htdig" binary files is not clear to me.
The "htdig" that comes with Slackware is located in "/opt/www/htdig/bin".
When I recompile and install "htdig" it is installed to "/opt/www/bin".
In any case, the variable "$htdigbin" in the scripts must specify the correct location.

I am not quite sure what to make of the "locale" problem. It may be due to some other problem and my "fix" may just be working around the other problem.

The other variables "$htdigdata" and "$kdeprefix" are dependent on the installation and distro in question.
These instructions should work for Slackware 11.0 but will probably not work with some other distros.
Substituting the correct directory names may work around the problem in other distros.


All times are GMT -5. The time now is 01:03 AM.