You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@bugzilla.spamassassin.org on 2007/08/20 17:11:17 UTC

[Bug 5617] New: sa-compile fails when run from cron - can't find re2c

http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5617

           Summary: sa-compile fails when run from cron - can't find re2c
           Product: Spamassassin
           Version: 3.2.3
          Platform: Other
        OS/Version: FreeBSD
            Status: NEW
          Severity: minor
          Priority: P5
         Component: sa-compile
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: sandys@boreal.org


I have a nightly cron set up to run this command:
/usr/local/bin/sa-update && /usr/local/bin/sa-compile

When sa-compile is run this way via cron, the sa-compile portion of this fails 
with the following error:

re2c -i -b -o scanner1.c scanner1.re
Can't exec "re2c": No such file or directory at /usr/local/bin/sa-compile line 
281, <$fh> line 2622.
command failed! at /usr/local/bin/sa-compile line 282, <$fh> line 2622.

This appears to be caused by the following line in the sa-compile code: 'my 
$cmd = "re2c -i -b -o scanner$_.c scanner$_.re";'.  When jobs are run from 
cron under our FreeBSD setup (and I suspect on most others), they require the 
full path to commands to be specified - ex. /usr/local/bin/re2c rather than 
just re2c.  

I've resolved this issue locally by updating that line in sa-compile to 
read "my $cmd = "/usr/local/bin/re2c -i -b -o scanner$_.c scanner$_.re";

Please change future release of Spamassassin to include the full path to re2c 
in the code for sa-compile.

Thanks!



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5617] sa-compile fails when run from cron - can't find re2c

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5617


jm@jmason.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




------- Additional Comments From jm@jmason.org  2007-08-20 09:43 -------
cool, closing



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5617] sa-compile fails when run from cron - can't find re2c

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5617





------- Additional Comments From felicity@apache.org  2007-08-20 08:33 -------
We can't really do that since people would have re2c installed in various locations.

Perhaps you just need to set your PATH appropriately in the crontab.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

[Bug 5617] sa-compile fails when run from cron - can't find re2c

Posted by bu...@bugzilla.spamassassin.org.
http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5617





------- Additional Comments From sandys@boreal.org  2007-08-20 08:42 -------
(In reply to comment #1)
> We can't really do that since people would have re2c installed in various 
locations.
> Perhaps you just need to set your PATH appropriately in the crontab.

Boy do I feel stupid!  I never even noticed that PATH command at the top of my 
cron file.  I will fix it there and thanks for your prompt response!



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.