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/10 21:45:54 UTC

[Bug 5592] New: unable to compile libspamc in 3.2.2

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

           Summary: unable to compile libspamc in 3.2.2
           Product: Spamassassin
           Version: 3.2.2
          Platform: DEC
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P5
         Component: Building & Packaging
        AssignedTo: dev@spamassassin.apache.org
        ReportedBy: cantelow@csd.net


Hi.  This may be related to recent fixes to bug# 1341?

On Tru64, V5.1B, using native cc compiler, I was unable to compile libspamc.c. 
We did not have this problem in version 3.1.8, from which we were upgrading. 

Failure msg follows.  Below that are several steps I found to work around it:
-------------------------------------
spamc/libspamc.c:
cc: Error: spamc/libspamc.c, line 1050: In this declaration, "z_stream" must
specify a type. (badparsedecl)
    z_stream strm;
----^
cc: Error: spamc/libspamc.c, line 1063: In this statement, "strm" is not
declared. (undeclared)
    strm.zalloc = Z_NULL;
----^
cc: Error: spamc/libspamc.c, line 1063: In this statement, "Z_NULL" is not
declared. (undeclared)
    strm.zalloc = Z_NULL;
------------------^
cc: Error: spamc/libspamc.c, line 1067: In this statement, "Z_OK" is not
declared. (undeclared)
    if (rc != Z_OK) {
--------------^
cc: Error: spamc/libspamc.c, line 1078: In this statement, "Z_FINISH" is not
declared. (undeclared)
        rc = deflate(&strm, Z_FINISH);
----------------------------^
cc: Error: spamc/libspamc.c, line 1079: In this statement, "Z_STREAM_ERROR" is
not declared. (undeclared)
        assert(rc != Z_STREAM_ERROR);
--------^
spamc/utils.c:
*** Exit 1
Stop.
*** Exit 1
Stop.
-----------------------------

Workaround:

We didn't have zlib, so I installed it and ran "make distclean".  Then the
spamassassin configure said it couldn't find zlib.h, though it was in
/usr/local/include:

-------------------------------------
checking zlib.h usability... no
checking zlib.h presence... no
-------------------------------------

I set a link from /usr/local/include/zlib.h to /usr/include/zlib.h, it still
wasn't found.  Next, I went into spamc config.h, and found that "#undef
HAVE_ZLIB" was commented, but there was no "#define HAVE_ZLIB 1" statement. 
Adding "#define HAVE_ZLIB 1" to config.h, almost fixed the problem, but now
compile of libspamc.c failed unable to find zconf.h.

Adding a link from /usr/local/include/zconf.h to /usr/include/zonf.h to
accompany the one already there for zlib.h solved that problem.  Now everything
compiles.

Hope this helps and isn't too verbose.



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