You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by James Hsieh <jh...@stickman-computing.org> on 2018/09/17 20:37:16 UTC

SpamAssassin 3.4.2. - err.h requirement

So this isn't a complaint.  I think the SA team has done a great job getting this release out and yes, it works fine for me under Linux.

However, any creative ways for getting around the fact that err.h is now part of spamc/getopt.c?  This breaks older OSes (which admittedly I probably shouldn't care about or use anymore) such as Solaris 10.  For a double dot release, this seems a bit unfortunate though I agree, really need to get this system on to something more modern.

make -f spamc/Makefile spamc/spamc
/usr/local/bin/gcc  -g spamc/spamc.c spamc/getopt.c spamc/libspamc.c spamc/utils.c \
        -o spamc/spamc -L/usr/lib -L/usr/ccs/lib -L/opt/solarisstudio12.3/prod/lib/sparc -L/opt/solarisstudio12.3/prod/lib -L/lib -L/usr/local/lib  -ldl -lz -lnsl -lsocket
spamc/getopt.c:24:17: fatal error: err.h: No such file or directory
compilation terminated.
*** Error code 1
make: Fatal error: Command failed for target `spamc/spamc'
Current working directory /export/src/Mail-SpamAssassin-3.4.2
*** Error code 1
make: Fatal error: Command failed for target `spamc/spamc'

--James


Re: SpamAssassin 3.4.2. - err.h requirement

Posted by Bill Cole <sa...@billmail.scconsult.com>.
On 17 Sep 2018, at 22:03 (-0400), Kevin A. McGrail wrote:

> Interesting I think Bill added that code.

Nope. From svn:

3042	mmartinec	810883	    die sprintf("child process [%s] exited or 
timed out ".
3043	 	 	                "without signaling production of a PID file: 
%s",
3044	 	 	                $pid, exit_status_str($child_stat,0)) unless 
$serverstarted;

>
> On 9/17/2018 9:16 PM, James Hsieh wrote:
>> This does help things to build.  I can build successfully.  I now 
>> have a problem where spamd seems to be jumping out of the startup 
>> wait loop.
>>
>> I keep hitting this code:
>>
>>     die sprintf("child process [%s] exited or timed out ".
>>                 "without signaling production of a PID file: %s",
>>                 $pid, exit_status_str($child_stat,0)) unless 
>> $serverstarted;
>>
>> However, there's no waiting for things to start.  I'm investigating 
>> this now.
>>
>> --James
>>
>>> On Sep 17, 2018, at 4:53 PM, Kevin A. McGrail <km...@apache.org> 
>>> wrote:
>>>
>>> This patch was added for windows.  Does it help you?  It switches to 
>>> errno.h
>>>
>>> --- getopt.c    2018-09-13 21:27:52.000000000 -0400
>>> +++ ../../3.4/spamc/getopt.c    2018-09-17 07:12:38.758722882 -0400
>>> @@ -21,7 +21,7 @@
>>>  #include <string.h>
>>>  #include <assert.h>
>>>  #include <stdlib.h>
>>> -#include <err.h>
>>> +#include <errno.h>
>>>  #include "getopt.h"
>>>
>>>  #ifdef WIN32
>>> @@ -246,7 +246,8 @@
>>>        if((bp = strchr(longopt, '='))) {
>>>           opt = strdup(bp+1);
>>>           if (opt == NULL) {
>>> -            err(1, NULL);
>>> +            fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
>>> +            exit(1);
>>>           }
>>>           longoptlen -= strlen(bp);
>>>        }
>>>
>>> On 9/17/2018 4:37 PM, James Hsieh wrote:
>>>> So this isn't a complaint.  I think the SA team has done a great 
>>>> job getting this release out and yes, it works fine for me under 
>>>> Linux.
>>>>
>>>> However, any creative ways for getting around the fact that err.h 
>>>> is now part of spamc/getopt.c?  This breaks older OSes (which 
>>>> admittedly I probably shouldn't care about or use anymore) such as 
>>>> Solaris 10.  For a double dot release, this seems a bit unfortunate 
>>>> though I agree, really need to get this system on to something more 
>>>> modern.
>>>>
>>>> make -f spamc/Makefile spamc/spamc
>>>> /usr/local/bin/gcc  -g spamc/spamc.c spamc/getopt.c 
>>>> spamc/libspamc.c spamc/utils.c \
>>>>        -o spamc/spamc -L/usr/lib -L/usr/ccs/lib 
>>>> -L/opt/solarisstudio12.3/prod/lib/sparc 
>>>> -L/opt/solarisstudio12.3/prod/lib -L/lib -L/usr/local/lib  -ldl -lz 
>>>> -lnsl -lsocket
>>>> spamc/getopt.c:24:17: fatal error: err.h: No such file or directory
>>>> compilation terminated.
>>>> *** Error code 1
>>>> make: Fatal error: Command failed for target `spamc/spamc'
>>>> Current working directory /export/src/Mail-SpamAssassin-3.4.2
>>>> *** Error code 1
>>>> make: Fatal error: Command failed for target `spamc/spamc'
>>>>
>>>> --James
>>>>
>>> -- 
>>> Kevin A. McGrail
>>> VP Fundraising, Apache Software Foundation
>>> Chair Emeritus Apache SpamAssassin Project
>>> https://www.linkedin.com/in/kmcgrail - 703.798.0171
>>>
>
> -- 
> Kevin A. McGrail
> VP Fundraising, Apache Software Foundation
> Chair Emeritus Apache SpamAssassin Project
> https://www.linkedin.com/in/kmcgrail - 703.798.0171



-- 
Bill Cole
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Currently Seeking Steadier Work: https://linkedin.com/in/billcole

Re: ***UNCHECKED*** Re: SpamAssassin 3.4.2. - err.h requirement

Posted by "Kevin A. McGrail" <km...@apache.org>.
Thanks for the feedback!

On Sep 19, 2018 03:14, "Groach" <gr...@yahoo.com> wrote:

Thanks Kevin

Both of my installations had stopped updating since 11th September due to
this.  Now the updates are working again.

From this:

11th Sep

20:00:26.57 Performing Spamassassin Update check...
Update available for channel updates.spamassassin.org: 1840397 -> 1840441
http: (lwp) GET http://spamassassin.apache.org/updates/MIRRORED.BY, 500 SSL
negotiation failed:
Update failed, exiting with code 4

to this:

20:00:35.98 Performing Spamassassin Update check...
Update available for channel updates.spamassassin.org: 1840397 -> 1841055
http: (lwp) GET http://spamassassin.apache.org/updates/MIRRORED.BY, 200 OK
http: (lwp) GET http://sa-update.verein-clean.net/1841055.tar.gz, 200 OK
http: (lwp) GET http://sa-update.verein-clean.net/1841055.tar.gz.sha1, 200 OK
Update was available, and was downloaded and installed successfully

Im sure many others would have been suffering too.

Thanks again.



On 18/09/2018 18:24, Kevin A. McGrail wrote:

Thanks.  Had to add the path but now
http://spamassassin.apache.org/updates/MIRRORED.BY is exempted from SSL
redirection.  This will help with older clients.
--
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


On Tue, Sep 18, 2018 at 8:22 AM Henrik K <he...@hege.li> wrote:

>
> On Tue, Sep 18, 2018 at 07:41:09AM -0400, Kevin A. McGrail wrote:
> > Hi Bill, I think it might be an older wget or LWP or what not that can't
> > deal with MIRRORED.BY being https.  Michael from linuxmagic also
> > reported a similar issue.
> >
> > Can anyone help with a .htaccess that exempts the MIRRORED.BY?
> >
> > Current lines:
> >
> > RewriteEngine On
> > RewriteCond %{SERVER_PORT} 80
>
> Add here
> RewriteCond %{REQUEST_URI} !^/MIRRORED\.BY$
>
> > RewriteRule ^(.*)$ https://spamassassin.apache.org/$1 [R,L]
>

***UNCHECKED*** Re: SpamAssassin 3.4.2. - err.h requirement

Posted by Groach <gr...@yahoo.com>.
Thanks Kevin

Both of my installations had stopped updating since 11th September due 
to this.  Now the updates are working again.

 From this:

11th Sep

20:00:26.57 Performing Spamassassin Update check...
Update available for channel updates.spamassassin.org: 1840397 -> 1840441
http: (lwp) GET http://spamassassin.apache.org/updates/MIRRORED.BY, 500 
SSL negotiation failed:
Update failed, exiting with code 4

to this:

20:00:35.98 Performing Spamassassin Update check...
Update available for channel updates.spamassassin.org: 1840397 -> 1841055
http: (lwp) GEThttp://spamassassin.apache.org/updates/MIRRORED.BY, 200 OK
http: (lwp) GEThttp://sa-update.verein-clean.net/1841055.tar.gz, 200 OK
http: (lwp) GEThttp://sa-update.verein-clean.net/1841055.tar.gz.sha1, 200 OK
Update was available, and was downloaded and installed successfully

Im sure many others would have been suffering too.

Thanks again.



On 18/09/2018 18:24, Kevin A. McGrail wrote:
> Thanks.  Had to add the path but now 
> http://spamassassin.apache.org/updates/MIRRORED.BY is exempted from 
> SSL redirection.  This will help with older clients.
> --
> Kevin A. McGrail
> VP Fundraising, Apache Software Foundation
> Chair Emeritus Apache SpamAssassin Project
> https://www.linkedin.com/in/kmcgrail - 703.798.0171
>
>
> On Tue, Sep 18, 2018 at 8:22 AM Henrik K <hege@hege.li 
> <ma...@hege.li>> wrote:
>
>
>     On Tue, Sep 18, 2018 at 07:41:09AM -0400, Kevin A. McGrail wrote:
>     > Hi Bill, I think it might be an older wget or LWP or what not
>     that can't
>     > deal with MIRRORED.BY <http://MIRRORED.BY> being https.  Michael
>     from linuxmagic also
>     > reported a similar issue.
>     >
>     > Can anyone help with a .htaccess that exempts the MIRRORED.BY
>     <http://MIRRORED.BY>?
>     >
>     > Current lines:
>     >
>     > RewriteEngine On
>     > RewriteCond %{SERVER_PORT} 80
>
>     Add here
>     RewriteCond %{REQUEST_URI} !^/MIRRORED\.BY$
>
>     > RewriteRule ^(.*)$ https://spamassassin.apache.org/$1 [R,L]
>


Re: SpamAssassin 3.4.2. - err.h requirement

Posted by "Kevin A. McGrail" <km...@apache.org>.
Thanks.  Had to add the path but now
http://spamassassin.apache.org/updates/MIRRORED.BY is exempted from SSL
redirection.  This will help with older clients.
--
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


On Tue, Sep 18, 2018 at 8:22 AM Henrik K <he...@hege.li> wrote:

>
> On Tue, Sep 18, 2018 at 07:41:09AM -0400, Kevin A. McGrail wrote:
> > Hi Bill, I think it might be an older wget or LWP or what not that can't
> > deal with MIRRORED.BY being https.  Michael from linuxmagic also
> > reported a similar issue.
> >
> > Can anyone help with a .htaccess that exempts the MIRRORED.BY?
> >
> > Current lines:
> >
> > RewriteEngine On
> > RewriteCond %{SERVER_PORT} 80
>
> Add here
> RewriteCond %{REQUEST_URI} !^/MIRRORED\.BY$
>
> > RewriteRule ^(.*)$ https://spamassassin.apache.org/$1 [R,L]
>

Re: SpamAssassin 3.4.2. - err.h requirement

Posted by Henrik K <he...@hege.li>.
On Tue, Sep 18, 2018 at 07:41:09AM -0400, Kevin A. McGrail wrote:
> Hi Bill, I think it might be an older wget or LWP or what not that can't
> deal with MIRRORED.BY being https.  Michael from linuxmagic also
> reported a similar issue.
> 
> Can anyone help with a .htaccess that exempts the MIRRORED.BY?
> 
> Current lines:
> 
> RewriteEngine On
> RewriteCond %{SERVER_PORT} 80

Add here
RewriteCond %{REQUEST_URI} !^/MIRRORED\.BY$

> RewriteRule ^(.*)$ https://spamassassin.apache.org/$1 [R,L]

Re: SpamAssassin 3.4.2. - err.h requirement

Posted by "Kevin A. McGrail" <km...@apache.org>.
Hi Bill, I think it might be an older wget or LWP or what not that can't
deal with MIRRORED.BY being https.  Michael from linuxmagic also
reported a similar issue.

Can anyone help with a .htaccess that exempts the MIRRORED.BY?

Current lines:

Redirect /favicon.ico https://spamassassin.apache.org/images/favicon.ico
Redirect /downloads.html https://spamassassin.apache.org/downloads.cgi

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://spamassassin.apache.org/$1 [R,L]

RewriteBase /
RewriteRule ^doc/(.*)$ https://spamassassin.apache.org/full/3.4.x/doc/$1
[R=permanent]
RewriteRule ^doc.html/(.*)$
https://spamassassin.apache.org/full/3.4.x/doc/$1 [R=permanent]
RewriteRule ^dist/(.*)$
https://svn.apache.org/repos/asf/spamassassin/tags/spamassassin_current_release_3.4.x/$1
[R=permanent]
RewriteRule ^full/3.4.x/dist/doc/(.*)$
https://spamassassin.apache.org/full/3.4.x/doc/$1 [R=permanent]
RewriteRule ^full/3.4.x/dist/(.*)$
https://svn.apache.org/repos/asf/spamassassin/tags/spamassassin_current_release_3.4.x/$1
[R=permanent]
RewriteRule ^doc$ https://spamassassin.apache.org/full/3.4.x/doc/
[R=permanent]

ErrorDocument 404 https://spamassassin.apache.org/404.html

On 9/18/2018 12:03 AM, Bill Cole wrote:
> On 17 Sep 2018, at 22:57, James Hsieh wrote:
>
>> So this is odd:
>>
>> I finally started this without the daemonize option to see if it gave
>> me anything more enlightening and got:
>>
>> Sep 17 22:44:15.326 [21704] error: config: no rules were found! Do
>> you need to run 'sa-update'?
>> config: no rules were found!  Do you need to run 'sa-update'?
>>
>> Sure enough /var/lib/spamassassin/3.004002/updates_spamassassin_org
>> is empty.
>>
>> /usr/local/bin/curl -s -L -O --remote-time -g --max-redirs 2
>> --connect-timeout 30 --max-time 300 --fail -o MIRRORED.BY --
>> http://spamassassin.apache.org/updates/MIRRORED.BY
>> <http://spamassassin.apache.org/updates/MIRRORED.BY>
>>
>> This is what appears to have failed.  It didn't download anything.
>>
>> superchicken:root# host spamassassin.apache.org
>> spamassassin.apache.org has address 95.216.24.32
>> spamassassin.apache.org has address 40.79.78.1
>> spamassassin.apache.org has IPv6 address 2a01:4f9:2a:185f::2
>> spamassassin.apache.org mail is handled by 10 mx1-lw-eu.apache.org.
>> spamassassin.apache.org mail is handled by 10 mx1-lw-us.apache.org.
>> superchicken:root#
>>
>> The issue is with the mirror at 95.216.24.32 - it's returning a 404
>> for the file.  If you go to
>>
>> http://95.216.24.32/updates/MIRRORED.BY
>> <http://95.216.24.32/updates/MIRRORED.BY>
>>
>> you get a not found.
>
> Yes, because that webserver uses name-based virtual hosts: you can't
> just use the IP in the URL, you need to make sure you send the proper
> hostname. You also need to follow HTTP redirects, because the http URL
> redirects to a https URL. Like this:
>
> $ curl -sOL -H 'Host: spamassassin.apache.org'
> http://95.216.24.32/updates/MIRRORED.BY
> $ ls -l MIRRORED.BY
> -rw-r--r--  1 bill  staff  1400 Sep 18 00:01 MIRRORED.BY
> $ head MIRRORED.BY
> #HOW TO UPDATE
> #
> # SOURCE: https://svn.apache.org/repos/asf/spamassassin/site/updates/
> #
> # 'svn checkout' the repo, update this file, and commit it
> #
> # A svnpubsub update on spamassassin.apache.org will instantly pull
> # from SVN after the commit.
> #
> # A cron'd update on sa-vm1.apache.org will also automatically pull
>
>
>> I copied the MIRRORED.BY file from the 3.004001 directory then re-ran
>> sa-update.  It pulled down rules and I'm in business.
>>
>> Kevin, thanks for the patch.  It works.  Sorry for the extra noise
>> and perhaps we need to do something about that broken mirror?
>
> The mirror doesn't look broken from here.


-- 
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


Re: SpamAssassin 3.4.2. - err.h requirement

Posted by Bill Cole <sa...@billmail.scconsult.com>.
On 17 Sep 2018, at 22:57, James Hsieh wrote:

> So this is odd:
>
> I finally started this without the daemonize option to see if it gave 
> me anything more enlightening and got:
>
> Sep 17 22:44:15.326 [21704] error: config: no rules were found! Do you 
> need to run 'sa-update'?
> config: no rules were found!  Do you need to run 'sa-update'?
>
> Sure enough /var/lib/spamassassin/3.004002/updates_spamassassin_org is 
> empty.
>
> /usr/local/bin/curl -s -L -O --remote-time -g --max-redirs 2 
> --connect-timeout 30 --max-time 300 --fail -o MIRRORED.BY -- 
> http://spamassassin.apache.org/updates/MIRRORED.BY 
> <http://spamassassin.apache.org/updates/MIRRORED.BY>
>
> This is what appears to have failed.  It didn't download anything.
>
> superchicken:root# host spamassassin.apache.org
> spamassassin.apache.org has address 95.216.24.32
> spamassassin.apache.org has address 40.79.78.1
> spamassassin.apache.org has IPv6 address 2a01:4f9:2a:185f::2
> spamassassin.apache.org mail is handled by 10 mx1-lw-eu.apache.org.
> spamassassin.apache.org mail is handled by 10 mx1-lw-us.apache.org.
> superchicken:root#
>
> The issue is with the mirror at 95.216.24.32 - it's returning a 404 
> for the file.  If you go to
>
> http://95.216.24.32/updates/MIRRORED.BY 
> <http://95.216.24.32/updates/MIRRORED.BY>
>
> you get a not found.

Yes, because that webserver uses name-based virtual hosts: you can't 
just use the IP in the URL, you need to make sure you send the proper 
hostname. You also need to follow HTTP redirects, because the http URL 
redirects to a https URL. Like this:

$ curl -sOL -H 'Host: spamassassin.apache.org' 
http://95.216.24.32/updates/MIRRORED.BY
$ ls -l MIRRORED.BY
-rw-r--r--  1 bill  staff  1400 Sep 18 00:01 MIRRORED.BY
$ head MIRRORED.BY
#HOW TO UPDATE
#
# SOURCE: https://svn.apache.org/repos/asf/spamassassin/site/updates/
#
# 'svn checkout' the repo, update this file, and commit it
#
# A svnpubsub update on spamassassin.apache.org will instantly pull
# from SVN after the commit.
#
# A cron'd update on sa-vm1.apache.org will also automatically pull


> I copied the MIRRORED.BY file from the 3.004001 directory then re-ran 
> sa-update.  It pulled down rules and I'm in business.
>
> Kevin, thanks for the patch.  It works.  Sorry for the extra noise and 
> perhaps we need to do something about that broken mirror?

The mirror doesn't look broken from here.

Re: SpamAssassin 3.4.2. - err.h requirement

Posted by James Hsieh <jh...@stickman-computing.org>.
So this is odd:

I finally started this without the daemonize option to see if it gave me anything more enlightening and got:

Sep 17 22:44:15.326 [21704] error: config: no rules were found! Do you need to run 'sa-update'?
config: no rules were found!  Do you need to run 'sa-update'?

Sure enough /var/lib/spamassassin/3.004002/updates_spamassassin_org is empty.

/usr/local/bin/curl -s -L -O --remote-time -g --max-redirs 2 --connect-timeout 30 --max-time 300 --fail -o MIRRORED.BY -- http://spamassassin.apache.org/updates/MIRRORED.BY <http://spamassassin.apache.org/updates/MIRRORED.BY>

This is what appears to have failed.  It didn't download anything.

superchicken:root# host spamassassin.apache.org
spamassassin.apache.org has address 95.216.24.32
spamassassin.apache.org has address 40.79.78.1
spamassassin.apache.org has IPv6 address 2a01:4f9:2a:185f::2
spamassassin.apache.org mail is handled by 10 mx1-lw-eu.apache.org.
spamassassin.apache.org mail is handled by 10 mx1-lw-us.apache.org.
superchicken:root#

The issue is with the mirror at 95.216.24.32 - it's returning a 404 for the file.  If you go to 

http://95.216.24.32/updates/MIRRORED.BY <http://95.216.24.32/updates/MIRRORED.BY>

you get a not found.

I copied the MIRRORED.BY file from the 3.004001 directory then re-ran sa-update.  It pulled down rules and I'm in business.

Kevin, thanks for the patch.  It works.  Sorry for the extra noise and perhaps we need to do something about that broken mirror?

--James

> On Sep 17, 2018, at 10:17 PM, Bill Cole <bi...@scconsult.com> wrote:
> 
> On 17 Sep 2018, at 22:03 (-0400), Kevin A. McGrail wrote:
> 
>> Interesting I think Bill added that code.
> 
> Nope. From svn:
> 
> 3042	mmartinec	810883	    die sprintf("child process [%s] exited or timed out ".
> 3043	 	 	                "without signaling production of a PID file: %s",
> 3044	 	 	                $pid, exit_status_str($child_stat,0)) unless $serverstarted;
> 
>> 
>> On 9/17/2018 9:16 PM, James Hsieh wrote:
>>> This does help things to build.  I can build successfully.  I now have a problem where spamd seems to be jumping out of the startup wait loop.
>>> 
>>> I keep hitting this code:
>>> 
>>>    die sprintf("child process [%s] exited or timed out ".
>>>                "without signaling production of a PID file: %s",
>>>                $pid, exit_status_str($child_stat,0)) unless $serverstarted;
>>> 
>>> However, there's no waiting for things to start.  I'm investigating this now.
>>> 
>>> --James
>>> 
>>>> On Sep 17, 2018, at 4:53 PM, Kevin A. McGrail <km...@apache.org> wrote:
>>>> 
>>>> This patch was added for windows.  Does it help you?  It switches to errno.h
>>>> 
>>>> --- getopt.c    2018-09-13 21:27:52.000000000 -0400
>>>> +++ ../../3.4/spamc/getopt.c    2018-09-17 07:12:38.758722882 -0400
>>>> @@ -21,7 +21,7 @@
>>>> #include <string.h>
>>>> #include <assert.h>
>>>> #include <stdlib.h>
>>>> -#include <err.h>
>>>> +#include <errno.h>
>>>> #include "getopt.h"
>>>> 
>>>> #ifdef WIN32
>>>> @@ -246,7 +246,8 @@
>>>>       if((bp = strchr(longopt, '='))) {
>>>>          opt = strdup(bp+1);
>>>>          if (opt == NULL) {
>>>> -            err(1, NULL);
>>>> +            fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
>>>> +            exit(1);
>>>>          }
>>>>          longoptlen -= strlen(bp);
>>>>       }
>>>> 
>>>> On 9/17/2018 4:37 PM, James Hsieh wrote:
>>>>> So this isn't a complaint.  I think the SA team has done a great job getting this release out and yes, it works fine for me under Linux.
>>>>> 
>>>>> However, any creative ways for getting around the fact that err.h is now part of spamc/getopt.c?  This breaks older OSes (which admittedly I probably shouldn't care about or use anymore) such as Solaris 10.  For a double dot release, this seems a bit unfortunate though I agree, really need to get this system on to something more modern.
>>>>> 
>>>>> make -f spamc/Makefile spamc/spamc
>>>>> /usr/local/bin/gcc  -g spamc/spamc.c spamc/getopt.c spamc/libspamc.c spamc/utils.c \
>>>>>       -o spamc/spamc -L/usr/lib -L/usr/ccs/lib -L/opt/solarisstudio12.3/prod/lib/sparc -L/opt/solarisstudio12.3/prod/lib -L/lib -L/usr/local/lib  -ldl -lz -lnsl -lsocket
>>>>> spamc/getopt.c:24:17: fatal error: err.h: No such file or directory
>>>>> compilation terminated.
>>>>> *** Error code 1
>>>>> make: Fatal error: Command failed for target `spamc/spamc'
>>>>> Current working directory /export/src/Mail-SpamAssassin-3.4.2
>>>>> *** Error code 1
>>>>> make: Fatal error: Command failed for target `spamc/spamc'
>>>>> 
>>>>> --James
>>>>> 
>>>> -- 
>>>> Kevin A. McGrail
>>>> VP Fundraising, Apache Software Foundation
>>>> Chair Emeritus Apache SpamAssassin Project
>>>> https://www.linkedin.com/in/kmcgrail - 703.798.0171
>>>> 
>> 
>> -- 
>> Kevin A. McGrail
>> VP Fundraising, Apache Software Foundation
>> Chair Emeritus Apache SpamAssassin Project
>> https://www.linkedin.com/in/kmcgrail - 703.798.0171
> 
> 
> 
> -- 
> Bill Cole
> bill@scconsult.com <ma...@scconsult.com> or billcole@apache.org <ma...@apache.org>
> (AKA @grumpybozo and many *@billmail.scconsult.com addresses)
> Currently Seeking Steadier Work: https://linkedin.com/in/billcole <https://linkedin.com/in/billcole>

Re: SpamAssassin 3.4.2. - err.h requirement

Posted by "Kevin A. McGrail" <km...@apache.org>.
Interesting I think Bill added that code.

On 9/17/2018 9:16 PM, James Hsieh wrote:
> This does help things to build.  I can build successfully.  I now have a problem where spamd seems to be jumping out of the startup wait loop.
>
> I keep hitting this code:
>
>     die sprintf("child process [%s] exited or timed out ".
>                 "without signaling production of a PID file: %s",
>                 $pid, exit_status_str($child_stat,0)) unless $serverstarted;
>
> However, there's no waiting for things to start.  I'm investigating this now.
>
> --James
>
>> On Sep 17, 2018, at 4:53 PM, Kevin A. McGrail <km...@apache.org> wrote:
>>
>> This patch was added for windows.  Does it help you?  It switches to errno.h
>>
>> --- getopt.c    2018-09-13 21:27:52.000000000 -0400
>> +++ ../../3.4/spamc/getopt.c    2018-09-17 07:12:38.758722882 -0400
>> @@ -21,7 +21,7 @@
>>  #include <string.h>
>>  #include <assert.h>
>>  #include <stdlib.h>
>> -#include <err.h>
>> +#include <errno.h>
>>  #include "getopt.h"
>>  
>>  #ifdef WIN32
>> @@ -246,7 +246,8 @@
>>        if((bp = strchr(longopt, '='))) {
>>           opt = strdup(bp+1);
>>           if (opt == NULL) {
>> -            err(1, NULL);
>> +            fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
>> +            exit(1);
>>           } 
>>           longoptlen -= strlen(bp);
>>        }
>>
>> On 9/17/2018 4:37 PM, James Hsieh wrote:
>>> So this isn't a complaint.  I think the SA team has done a great job getting this release out and yes, it works fine for me under Linux.
>>>
>>> However, any creative ways for getting around the fact that err.h is now part of spamc/getopt.c?  This breaks older OSes (which admittedly I probably shouldn't care about or use anymore) such as Solaris 10.  For a double dot release, this seems a bit unfortunate though I agree, really need to get this system on to something more modern.
>>>
>>> make -f spamc/Makefile spamc/spamc
>>> /usr/local/bin/gcc  -g spamc/spamc.c spamc/getopt.c spamc/libspamc.c spamc/utils.c \
>>>        -o spamc/spamc -L/usr/lib -L/usr/ccs/lib -L/opt/solarisstudio12.3/prod/lib/sparc -L/opt/solarisstudio12.3/prod/lib -L/lib -L/usr/local/lib  -ldl -lz -lnsl -lsocket
>>> spamc/getopt.c:24:17: fatal error: err.h: No such file or directory
>>> compilation terminated.
>>> *** Error code 1
>>> make: Fatal error: Command failed for target `spamc/spamc'
>>> Current working directory /export/src/Mail-SpamAssassin-3.4.2
>>> *** Error code 1
>>> make: Fatal error: Command failed for target `spamc/spamc'
>>>
>>> --James
>>>
>> -- 
>> Kevin A. McGrail
>> VP Fundraising, Apache Software Foundation
>> Chair Emeritus Apache SpamAssassin Project
>> https://www.linkedin.com/in/kmcgrail - 703.798.0171
>>

-- 
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171


Re: SpamAssassin 3.4.2. - err.h requirement

Posted by James Hsieh <jh...@stickman-computing.org>.
This does help things to build.  I can build successfully.  I now have a problem where spamd seems to be jumping out of the startup wait loop.

I keep hitting this code:

    die sprintf("child process [%s] exited or timed out ".
                "without signaling production of a PID file: %s",
                $pid, exit_status_str($child_stat,0)) unless $serverstarted;

However, there's no waiting for things to start.  I'm investigating this now.

--James

> On Sep 17, 2018, at 4:53 PM, Kevin A. McGrail <km...@apache.org> wrote:
> 
> This patch was added for windows.  Does it help you?  It switches to errno.h
> 
> --- getopt.c    2018-09-13 21:27:52.000000000 -0400
> +++ ../../3.4/spamc/getopt.c    2018-09-17 07:12:38.758722882 -0400
> @@ -21,7 +21,7 @@
>  #include <string.h>
>  #include <assert.h>
>  #include <stdlib.h>
> -#include <err.h>
> +#include <errno.h>
>  #include "getopt.h"
>  
>  #ifdef WIN32
> @@ -246,7 +246,8 @@
>        if((bp = strchr(longopt, '='))) {
>           opt = strdup(bp+1);
>           if (opt == NULL) {
> -            err(1, NULL);
> +            fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
> +            exit(1);
>           } 
>           longoptlen -= strlen(bp);
>        }
> 
> On 9/17/2018 4:37 PM, James Hsieh wrote:
>> So this isn't a complaint.  I think the SA team has done a great job getting this release out and yes, it works fine for me under Linux.
>> 
>> However, any creative ways for getting around the fact that err.h is now part of spamc/getopt.c?  This breaks older OSes (which admittedly I probably shouldn't care about or use anymore) such as Solaris 10.  For a double dot release, this seems a bit unfortunate though I agree, really need to get this system on to something more modern.
>> 
>> make -f spamc/Makefile spamc/spamc
>> /usr/local/bin/gcc  -g spamc/spamc.c spamc/getopt.c spamc/libspamc.c spamc/utils.c \
>>        -o spamc/spamc -L/usr/lib -L/usr/ccs/lib -L/opt/solarisstudio12.3/prod/lib/sparc -L/opt/solarisstudio12.3/prod/lib -L/lib -L/usr/local/lib  -ldl -lz -lnsl -lsocket
>> spamc/getopt.c:24:17: fatal error: err.h: No such file or directory
>> compilation terminated.
>> *** Error code 1
>> make: Fatal error: Command failed for target `spamc/spamc'
>> Current working directory /export/src/Mail-SpamAssassin-3.4.2
>> *** Error code 1
>> make: Fatal error: Command failed for target `spamc/spamc'
>> 
>> --James
>> 
> 
> -- 
> Kevin A. McGrail
> VP Fundraising, Apache Software Foundation
> Chair Emeritus Apache SpamAssassin Project
> https://www.linkedin.com/in/kmcgrail - 703.798.0171
> 


Re: SpamAssassin 3.4.2. - err.h requirement

Posted by "Kevin A. McGrail" <km...@apache.org>.
This patch was added for windows.  Does it help you?  It switches to errno.h

--- getopt.c    2018-09-13 21:27:52.000000000 -0400
+++ ../../3.4/spamc/getopt.c    2018-09-17 07:12:38.758722882 -0400
@@ -21,7 +21,7 @@
 #include <string.h>
 #include <assert.h>
 #include <stdlib.h>
-#include <err.h>
+#include <errno.h>
 #include "getopt.h"
 
 #ifdef WIN32
@@ -246,7 +246,8 @@
       if((bp = strchr(longopt, '='))) {
          opt = strdup(bp+1);
          if (opt == NULL) {
-            err(1, NULL);
+            fprintf(stderr, "%s: %s\n", argv[0], strerror(errno));
+            exit(1);
          } 
          longoptlen -= strlen(bp);
       }

On 9/17/2018 4:37 PM, James Hsieh wrote:
> So this isn't a complaint.  I think the SA team has done a great job getting this release out and yes, it works fine for me under Linux.
>
> However, any creative ways for getting around the fact that err.h is now part of spamc/getopt.c?  This breaks older OSes (which admittedly I probably shouldn't care about or use anymore) such as Solaris 10.  For a double dot release, this seems a bit unfortunate though I agree, really need to get this system on to something more modern.
>
> make -f spamc/Makefile spamc/spamc
> /usr/local/bin/gcc  -g spamc/spamc.c spamc/getopt.c spamc/libspamc.c spamc/utils.c \
>         -o spamc/spamc -L/usr/lib -L/usr/ccs/lib -L/opt/solarisstudio12.3/prod/lib/sparc -L/opt/solarisstudio12.3/prod/lib -L/lib -L/usr/local/lib  -ldl -lz -lnsl -lsocket
> spamc/getopt.c:24:17: fatal error: err.h: No such file or directory
> compilation terminated.
> *** Error code 1
> make: Fatal error: Command failed for target `spamc/spamc'
> Current working directory /export/src/Mail-SpamAssassin-3.4.2
> *** Error code 1
> make: Fatal error: Command failed for target `spamc/spamc'
>
> --James
>

-- 
Kevin A. McGrail
VP Fundraising, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171