You are here: Foswiki>Tasks Web>Item1360 (05 Apr 2009, GeorgeClark)Edit Attach

Item1360: DirectedGraphPlugin makes configure script die

pencil
Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: DirectedGraphPlugin
Branches:
Reported By: GilmarSantosJr
Waiting For: Main.GeorgeClark
Last Change By: GeorgeClark
I just installed DirectedGraphPlugin last weekend and configure script always dies whit the following message:

Attempt to reload Scalar/Util.pm aborted.
Compilation failed in require at /usr/share/perl/5.10/overload.pm line 94, <DATA> line 1.

I'm using perl 5.10.0 (debian package 5.10.0-19) and this error doesn't happen with perl 5.8.8

The problem is in Config.spec: $Foswiki::cfg{DirectedGraphPlugin}{toolsPath} value is not surrounded by quotes. If I put single (or double) quotes the error disappears.

-- GilmarSantosJr - 24 Mar 2009

Also, the parameter is currently coded to do a directory traversal from bin up to tools $Foswiki::cfg{PubDir}/../tools This isn't safe or supported in all environments.

In addressing this issue I'll also include:
  • Add trailing slash on the path variables if needed
  • If GraphViz, ImageMagick, and perl are on the system path, the corresponding configuration parameters are not required
  • If tools path is not provided, try to make a usable guess based upon the current directory (typically bin).
  • Also fix an issue - tainted dot error file can't be unlinked

Note: This is a duplicate of Item1201

-- GeorgeClark - 24 Mar 2009

The /tools problem needs a proper solution, but I do not know what that solution is. I had the same problem with MathModePlugin (see Tasks.Item1234).

On my Ubuntu system, foswiki/pub and foswiki/bin are both links, so neither $Foswiki::cfg{PubDir}/../tools nor $FindBin::Bin/../tools works. SvenDowideit suggested $Foswiki::cfg{LocalesDir}/../tools, which does work on my system.

-- MichaelTempest - 24 Mar 2009

My intention is to default the toolsPath setting to '' in configure. If the plugin finds the field empty, it will take the string returned by CWD abs_path and replace the final /bin (or whatever is there) with tools. On most systems this should let the plugin work without any configuration. If for whatever reason the tools and bin are not in the same parent path, configure would be used to explicitly configure the location.

For enginePath and magickPath I'll also default them to ''. And perlCmd will default simply to 'perl'. If those tools are in the default system path, then they work without intervention as well. At this point in my testing the plugin works on my Gentoo system with no configuration needed. I've got to build and test on Windows as well.

For all of the parameters, the code now also takes care of the trailing slash if needed and not provided.

-- GeorgeClark - 25 Mar 2009

ItemTemplate edit

Summary DirectedGraphPlugin makes configure script die
ReportedBy GilmarSantosJr
Codebase
SVN Range Foswiki-1.0.0, Thu, 08 Jan 2009, build 1878
AppliesTo Extension
Component DirectedGraphPlugin
Priority Normal
CurrentState Closed
WaitingFor GeorgeClark
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r6 - 05 Apr 2009, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy