SirWumpus / milter-clamc

Provide an interface to the popular open source Clam Anti-Virus scanner.
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

config.h is missing version information #1

Open drscriptt opened 2 hours ago

drscriptt commented 2 hours ago

Hi,

I'm having trouble compiling milter-clamc as downloaded from GitHub. I'm getting the following error when trying to compile:

gcc -DMILTER_BUILD=`cat BUILD_ID.TXT` -DMILTER_BUILD_STRING='"'`cat BUILD_ID.TXT`'"' \
  -I/usr/include/x86_64-pc-linux-gnu/db5.3   -Wall -Wno-unused -Wno-char-subscripts -I./../../include    -L/usr/include/lib   -L./../../lib -D_BUILT="\"`date +'%a, %d %b %Y %H:%M:%S %z'`\"" -o milter-clamc milter-clamc.c -lsnert  -lpthread -lmilter -lpthread -lsqlite3 -lm -ldb  -lpthread
milter-clamc.c:681:21: error: expected expression before ‘,’ token
  681 |         MILTER_MAJOR,
      |                     ^
make: *** [makefile:121: milter-clamc] Error 1

It seems as if the following maros don't have values in them:

I am able to successfully compile milter-clamc after populating values in those macros with values from VERSION in the makefile and BUILD_ID.TXT.

Changing config.h from this:

#define MILTER_MAJOR
#define MILTER_MINOR
#define MILTER_VERSION ""

to this:

#define MILTER_MAJOR 0
#define MILTER_MINOR 7
#define MILTER_VERSION "0.7.1"

allows me to build milter-clamc without any problems.

I don't know if I'm using the proper values (I patterned off of other milters for where they got their values) and I'm not set up to do a pull request. So I hope that this issue report will suffice.

Thank you for all of your work and great software!

SirWumpus commented 1 hour ago

I've build it successfully without issue. Did you first build libsnert? What was the ./configure summary for libsnert? Once libsnert is built, then configure milter-clamc and make.

SirWumpus commented 51 minutes ago

I'm not set up to do a pull request.

You can download tarballs instead of cloning a repo, just need curl(1) or similar tool to download from GitHub:

SirWumpus commented 46 minutes ago

I cannot duplicate this issue. I can only assume that somehow the builds were not in a clean state. Try make distclean; ./configure ... for libsnert and milter-clamc.