#18 Missing treeexpand

closed
5
2013-03-19
2012-03-27
tarela_v
No

After I installed lxr 0.9.11 I can not start it and in Apache log found:

[Mon Mar 26 19:58:38 2012] fatal: LXR::Common, line 516: Can't find config for http://localhost/mytest/source at lib/LXR/Common.pm line 516.

[@INC /usr/local/lib/perl5/site_perl/5.12.3/i686-linux /usr/local/lib/perl5/site_perl/5.12.3 /usr/local/lib/perl5/5.12.3/i686-linux /usr/local/lib/perl5/5.12.3 /etc/httpd . ./lib $0 /usr/local/lxr/source
[Mon Mar 26 19:59:18 2012] fatal: LXR::Template, line 422: Undefined subroutine &LXR::Template::treeexpand called at lib/LXR/Template.pm line 422, <CONFIG>line 5.

[@INC /usr/local/lib/perl5/site_perl/5.12.3/i686-linux /usr/local/lib/perl5/site_perl/5.12.3 /usr/local/lib/perl5/5.12.3/i686-linux /usr/local/lib/perl5/5.12.3 /etc/httpd . ./lib $0 /usr/local/lxr/source

Discussion

  • Andre-Littoz

    Andre-Littoz - 2012-03-27

    I think you mean LXR 0.11 instead of 0.9.11.

    Oops! I forgot an occurrence in Template.pm. This is a bug, thanks for reporting. While waiting for it to be corrected, you can fix it in your copy:
    - open file lib/LXR/Template.pm with any text editor,
    - go to line 422,
    - change 'treeexpand' into 'targetexpand',
    - save change and exit editor,
    - restart your web server (for Apache, run as root or sudo 'apachectl restart')

    You're done.

    Best regards,

    ajl

     
  • Andre-Littoz

    Andre-Littoz - 2012-03-27

    Hi Val,
    As an afterthought, you also have a configuration problem as shown by the first message.
    Check parameters 'host_names' and 'virtroot'. They should contain something like:

    , 'host_names' => [ 'http://localhost' ] or [ '//localhost' ]

    Don't forget the [ ] even if there is a single name. // is also mandatory to make it appear like an URL.

    , 'virtroot' => '/mytest'

    The patch given in the previous comment cures the second error, not the first. If you can't find out what's going on, send your lxr.conf. Was the genxref stage OK?

    ajl

     
  • Andre-Littoz

    Andre-Littoz - 2012-03-27

    Patch is now in 0.11.1 release available for download.

     
  •  tarela_v

    tarela_v - 2012-03-27

    Hi Andrew,

    thanks for quick fix. Installed 0.11.1 with less pain. But still have couple of notes. Nothing major.

    1) [Tue Mar 27 12:13:23 2012] fatal: LXR::Config, line 200: Couldn't open configuration file /usr/local/lxr/templates/filetype.conf at /usr/local/lxr/lib/LXR/Config.pm line 200, <CONFIG> chunk 1.

    Not sure why 'templates' directory and subdirectories mode changed to 0444. I had to change it back to 0755.

    2) By default we have in lxr.conf: , 'stylesheet' => 'templates/html/lxr.css'

    [Tue Mar 27 12:16:00 2012] [error] [client 127.0.0.1] File does not exist: /usr/local/lxr/templates/html/lxr.css, referer: http://localhost/mytest/source/test.c

    Not sure if lxr.conf should be changed or file should be copied/moved, but it should be done automatically during installation.

    3) [Tue Mar 27 12:28:20 2012] [error] [client 127.0.0.1] File does not exist: /var/www/html/LXRimages

    I had to copy this directory to /var/www/html. Probably automatically should be created symbolic link.

    4) In installation notes it is specified: "The the exuberant ctags program version 5.10 or later."

    Maybe I missed something, but latest version is 5.8.5, even on their site. Not a big deal, but I like all latest version and wasted some time trying to find it.

    5) Very often I see this message and do not understand what's wrong:

    [Tue Mar 27 12:22:54 2012] [warn] /ife/source did not send an HTTP header

    Thanks,
    Val

     
  • Andre-Littoz

    Andre-Littoz - 2012-03-28
    • assigned_to: nobody --> ajlittoz
     
  • Andre-Littoz

    Andre-Littoz - 2012-03-28

    Hello Val,

    1) templates/ directory permissions are changed to 0444 by initial-config.sh script to discourage people from storing modified templates in it. All modified stuff should go to the lxrconf.d/ directory.

    You did not say if LXR could read "filetype.conf" after changing permissions.

    2) 3) These errors come from a bad Apache configuration. Have you checked file "lxrconf.d/apache-lxrserver.conf"? This file must be copied into /etc/conf.d/ directory. It tells Apache that the directory where you installed LXR is an alternate /var/www/html/.

    If the file is misconfigured or not copied, Apache tries to fetch HTML pages and HTML-described files only from /var/www/html/.

    A work around is, of course, symbolic links in /var/www/html/ pointing to the desired files.

    See http://lxr.sourceforge.net/en/0-11-InstallSteps/0-11-install.shtml and related pages or the chapter on webserver configuration in the downloadable PDF manual (it extensively covers different configuration situations).

    4) Sorry to have mixed the caveats about Perl and ctags. I'll fix the documentation. Happily enough, checks in genxref are correct.

    5) I also have these but not only on source. The spurious message appears also with ident, diff and search. It is difficult to track its cause because it is not systematic. Since it can happen with all scripts, I think it comes from Common.pm.

    A common cause is something gets sent before the HTTP headers. I'll have a serious look at it.

    Regardds,
    ajl

     
  • Andre-Littoz

    Andre-Littoz - 2012-10-24
    • status: open --> closed
     
  • Andre-Littoz

    Andre-Littoz - 2012-10-24

    Closing the request because release 1.0 should solve all mentioned issues but for "did not send HTTP header"

     
  • Yimin Li

    Yimin Li - 2013-03-19

    Not sure if this is helpful, but I got following messages:

    [Mon Mar 18 16:57:05 2013] warning: LXR::Index::SQLite, line 239: DBI::db=HASH(0x17d1798)->disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) at /srv/http/lxr/lib/LXR/Index/SQLite.pm line 239.

    [Mon Mar 18 17:36:24 2013] warning: LXR::Common, line 887: Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/media/data/lxr/test.db at /srv/http/lxr/lib/LXR/Common.pm line 887, <FILETYPE> line 52.

    [Mon Mar 18 16:40:36 2013] fatal: LXR::Template, line 1597: :Apache2 IO write: (103) Software caused connection abort at /srv/http/lxr/lib/LXR/Template.pm line 1597

     

Log in to post a comment.