
I've just downloaded mailman-1.0b6 and tryed to compile it in a DEC AXP with Digital Unix, and get the following errors while doing make:
With gcc:
gcc -DSCRIPT="\"admin\"" -I. -DCGI_GID=65534 -g -O2 -DHAVE_STRERROR=1
-DSTDC_HEADERS
=1 -DHAVE_SYSLOG_H=1 -DGETGROUPS_T=gid_t -DHAVE_VPRINTF=1 common.o -o
admin common.c
common.c:26: PREFIX' undeclared here (not in a function) common.c:26: parse error before string constant common.c:27:
PREFIX' undeclared here (not in a function)
common.c:28: `PYTHON' undeclared here (not in a function)
With the system's cc: cc -DSCRIPT="\"admin\"" -I. -DCGI_GID=65534 -O -DHAVE_STRERROR=1 -DSTDC_HEADERS=1 -D HAVE_SYSLOG_H=1 -DGETGROUPS_T=gid_t -DHAVE_VPRINTF=1 common.o -o admin common.c cc: Error: common.c, line 26: Invalid declaration. const char* scriptdir = SCRIPTDIR; ------------------------^ cc: Error: common.c, line 27: In the initializer for moduledir, "PREFIX" is not decl ared. const char* moduledir = MODULEDIR; ------------------------^ cc: Error: common.c, line 28: In the initializer for python, "PYTHON" is not declared. char* python = PYTHON; ---------------^ cc: Error: common.c, line 155: In this statement, "scriptdir" is not declared. strlen(scriptdir) + -----------------------^
Any ideas. I'have tryed mailman in Linux and I'm very satisfied and would like to use it as the University list server.
Victoriano Giralt Systems Programmer Central Computing Facility University of Málaga SPAIN

Hmm - i'm no build/compilation expert (barry?), but it looks like the PREFIX and PYTHON macros are not being defined. I'd suspect a missing step in the build process - i expect that one of the build gurus can pinpoint where. In the src/Makefile, are there some lines that look like:
COMMON_FLAGS= -DPREFIX="\"$(prefix)\""
-DPYTHON="\"$(PYTHON)\""
and doe the common.o target line look like:
common.o: $(srcdir)/common.c $(srcdir)/common.h $(CC) -c -I. $(COMMON_FLAGS) $(CFLAGS) $<
?
Ken Manheimer klm@python.org 703 620-8990 x268 (orporation for National Research |nitiatives
# If you appreciate Python, consider joining the PSA! #
# <http://www.python.org/psa/>. #
On Wed, 2 Dec 1998, Victoriano Giralt wrote:
I've just downloaded mailman-1.0b6 and tryed to compile it in a DEC AXP with Digital Unix, and get the following errors while doing make:
With gcc: gcc -DSCRIPT="\"admin\"" -I. -DCGI_GID=65534 -g -O2 -DHAVE_STRERROR=1 -DSTDC_HEADERS =1 -DHAVE_SYSLOG_H=1 -DGETGROUPS_T=gid_t -DHAVE_VPRINTF=1 common.o -o admin common.c common.c:26:
PREFIX' undeclared here (not in a function) common.c:26: parse error before string constant common.c:27:
PREFIX' undeclared here (not in a function) common.c:28: `PYTHON' undeclared here (not in a function)With the system's cc: cc -DSCRIPT="\"admin\"" -I. -DCGI_GID=65534 -O -DHAVE_STRERROR=1 -DSTDC_HEADERS=1 -D HAVE_SYSLOG_H=1 -DGETGROUPS_T=gid_t -DHAVE_VPRINTF=1 common.o -o admin common.c cc: Error: common.c, line 26: Invalid declaration. const char* scriptdir = SCRIPTDIR; ------------------------^ cc: Error: common.c, line 27: In the initializer for moduledir, "PREFIX" is not decl ared. const char* moduledir = MODULEDIR; ------------------------^ cc: Error: common.c, line 28: In the initializer for python, "PYTHON" is not declared. char* python = PYTHON; ---------------^ cc: Error: common.c, line 155: In this statement, "scriptdir" is not declared. strlen(scriptdir) + -----------------------^
Any ideas. I'have tryed mailman in Linux and I'm very satisfied and would like to use it as the University list server.
Victoriano Giralt Systems Programmer Central Computing Facility University of Málaga SPAIN
Mailman-Users maillist - Mailman-Users@python.org http://www.python.org/mailman/listinfo/mailman-users

"VG" == Victoriano Giralt <vic@vgg.sci.uma.es> writes:
VG> I've just downloaded mailman-1.0b6 and tryed to compile it in
VG> a DEC AXP with Digital Unix, and get the following errors
VG> while doing make:
VG> With gcc: gcc -DSCRIPT="\"admin\"" -I. -DCGI_GID=65534 -g -O2
VG> -DHAVE_STRERROR=1 -DSTDC_HEADERS =1 -DHAVE_SYSLOG_H=1
VG> -DGETGROUPS_T=gid_t -DHAVE_VPRINTF=1 common.o -o admin
VG> common.c common.c:26: `PREFIX' undeclared here (not in a
VG> function) common.c:26: parse error before string constant
VG> common.c:27: `PREFIX' undeclared here (not in a function)
VG> common.c:28: `PYTHON' undeclared here (not in a function)
Something is truly strange here. It looks like your system is trying to build the admin binary by compiling common.c. It shouldn't be doing that! It should be using cgi-wrapper.c to build all the CGI binaries. The common.c -> common.o compilation step should happen first and should have macros that define things like PREFIX and PYTHON. e.g. on my system:
gcc -c -I. -DPREFIX="\"/export/home/mailman\"" -DPYTHON="\"/depot/sundry/plat/bin/python\"" -g -O2 -DHAVE_STRERROR=1 -DSTDC_HEADERS=1 -DHAVE_SYSLOG_H=1 -DGETGROUPS_T=gid_t -DHAVE_VPRINTF=1 common.c gcc -DSCRIPT="\"admin\"" -I. -DCGI_GID=60001 -g -O2 -DHAVE_STRERROR=1 -DSTDC_HEADERS=1 -DHAVE_SYSLOG_H=1 -DGETGROUPS_T=gid_t -DHAVE_VPRINTF=1 common.o -o admin cgi-wrapper.c
What version of make are you running? It's possible I've got something incompatible in src/Makefile with your default make. I only have GNU make and Solaris make to test with, and the build process should complete successfully with both of those.
Try making sure you're building with GNU make instead of whatever make you're using by default.
If this really is the problem, we'll have to add a note to the installation instructions. Or if you can figure out the fix to Makefile.in and send us a patch, that would be best!
-Barry

On Thu, 3 Dec 1998, Barry A. Warsaw wrote:
"VG" == Victoriano Giralt <vic@vgg.sci.uma.es> writes:
VG> I've just downloaded mailman-1.0b6 and tryed to compile it in VG> a DEC AXP with Digital Unix, and get the following errors VG> while doing make:
[snip]
What version of make are you running? It's possible I've got something
I'm running the deafult make that comes with the operating system development tools.
Try making sure you're building with GNU make instead of whatever make you're using by default.
If this really is the problem, we'll have to add a note to the installation instructions. Or if you can figure out the fix to Makefile.in and send us a patch, that would be best!
Thanks for the light, I've succesfully made mailman, though using a workaround.
The culprit is '$<'.
From the man page: $< Represents the name of the component that is being used to make the target. Used only in conjunction with suffix rules.
From GNU make info page: `$<' The name of the first dependency. If the target got its commands from an implicit rule, this will be the first dependency added by the implicit rule (*note Implicit Rules::.).
So $< wasn't beeing translated into cgi-wrapper, nor mail-wrapper.
My workaround, not beeing a make guru myself, has been:
As I have deduced that we always needed $< substituted for cgi-wrapper.c, that's what I did in Makefile.in:
$(CGI_PROGS): $(srcdir)/cgi-wrapper.c common.o
# $(CC) -DSCRIPT="\"$@\"" -I. $(CGI_FLAGS) $(CFLAGS) common.o -o $@ $<
$(CC) -DSCRIPT="\"$@\"" -I. $(CGI_FLAGS) $(CFLAGS) common.o -o $@
cgi-wrapper.c
and
wrapper: $(srcdir)/mail-wrapper.c common.o # $(CC) -I. $(MAIL_FLAGS) $(CFLAGS) common.o -o $@ $< $(CC) -I. $(MAIL_FLAGS) $(CFLAGS) common.o -o $@ mail-wrapper.c
The commented out lines are the original ones.
Victoriano Giralt Systems Programmer Central Computing Facility University of Málaga SPAIN
participants (3)
-
Barry A. Warsaw
-
Ken Manheimer
-
Victoriano Giralt