Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Thread

make -j?

make -j?

2008-10-03 by Greg Troxel

Do people think 'make -j3' works? I was building 4.0.1 from pkgsrc on
NetBSD 4 i386 with MAKE_JOBS=3 and got:

===> Building for milter-greylist-4.0.1
--- milter-greylist.o ---
--- pending.o ---
--- sync.o ---
--- milter-greylist.o ---
cc -O2 -I/usr/pkg/include -I/usr/include -Wall -I/usr/pkg/include -DUSE_DNSRBL -D_BSD_SOURCE -I. -I. -I/usr/pkg/include -I/usr/include -c milter-greylist.c
--- pending.o ---
cc -O2 -I/usr/pkg/include -I/usr/include -Wall -I/usr/pkg/include -DUSE_DNSRBL -D_BSD_SOURCE -I. -I. -I/usr/pkg/include -I/usr/include -c pending.c
--- sync.o ---
cc -O2 -I/usr/pkg/include -I/usr/include -Wall -I/usr/pkg/include -DUSE_DNSRBL -D_BSD_SOURCE -I. -I. -I/usr/pkg/include -I/usr/include -c sync.c
--- dnsrbl.o ---
cc -O2 -I/usr/pkg/include -I/usr/include -Wall -I/usr/pkg/include -DUSE_DNSRBL -D_BSD_SOURCE -I. -I. -I/usr/pkg/include -I/usr/include -c dnsrbl.c
--- list.o ---
cc -O2 -I/usr/pkg/include -I/usr/include -Wall -I/usr/pkg/include -DUSE_DNSRBL -D_BSD_SOURCE -I. -I. -I/usr/pkg/include -I/usr/include -c list.c
--- macro.o ---
cc -O2 -I/usr/pkg/include -I/usr/include -Wall -I/usr/pkg/include -DUSE_DNSRBL -D_BSD_SOURCE -I. -I. -I/usr/pkg/include -I/usr/include -c macro.c
--- conf_yacc.c ---
bison -y -p`echo conf_yacc.c|/usr/bin/sed 's/^\([^_]\{1,\}_\).*$/\1/'` conf_yacc.y
--- conf_lex.c ---
flex -oconf_lex.c conf_lex.l
--- dump_yacc.c ---
bison -y -p`echo dump_yacc.c|/usr/bin/sed 's/^\([^_]\{1,\}_\).*$/\1/'` dump_yacc.y
--- dump_lex.c ---
flex -odump_lex.c dump_lex.l
--- dump_yacc.c ---
/bin/mv y.tab.c dump_yacc.c
--- conf.o ---
cc -O2 -I/usr/pkg/include -I/usr/include -Wall -I/usr/pkg/include -DUSE_DNSRBL -D_BSD_SOURCE -I. -I. -I/usr/pkg/include -I/usr/include -c conf.c
--- autowhite.o ---
--- conf_yacc.c ---
/bin/mv y.tab.c conf_yacc.c
--- autowhite.o ---
cc -O2 -I/usr/pkg/include -I/usr/include -Wall -I/usr/pkg/include -DUSE_DNSRBL -D_BSD_SOURCE -I. -I. -I/usr/pkg/include -I/usr/include -c autowhite.c
--- conf_yacc.c ---
mv: rename y.tab.c to conf_yacc.c: No such file or directory
*** [conf_yacc.c] Error code 1
1 error

make: stopped in /n0/gdt/NetBSD-current/pkgsrc/mail/milter-greylist/work/milter-greylist-4.0.1
*** Error code 2

Stop.
make: stopped in /n0/gdt/NetBSD-current/pkgsrc/mail/milter-greylist
*** Error code 1

Stop.
make: stopped in /n0/gdt/NetBSD-current/pkgsrc/mail/milter-greylist
*** 'make replace' failed for package milter-greylist.
*** Please read the errors listed above, fix the problem,
*** then re-run pkg_rolling-replace to continue.


I have seen this before, but not dug in.

Re: [milter-greylist] make -j?

2008-10-03 by Joe Pruett

> Do people think 'make -j3' works?  I was building 4.0.1 from pkgsrc on
> NetBSD 4 i386 with MAKE_JOBS=3 and got:

the makefile is not safe with -j.  the .y.c rule uses the old yacc logic 
where the yacc file is turned into y.tab.c and then renamed.  that isn't 
safe for parallel make.  trying to make that safe and portable is probably 
not fun.  mg is small enough, that -j seems overkill.

Re: [milter-greylist] make -j?

2008-10-03 by Greg Troxel

Thanks. I set MAKE_JOBS_SAFE=no in the pkgsrc entry, and here's a doc
patch:


Index: README
===================================================================
RCS file: /milter-greylist/milter-greylist/README,v
retrieving revision 1.63
diff -u -p -u -p -r1.63 README
--- README 26 Sep 2008 23:35:44 -0000 1.63
+++ README 3 Oct 2008 23:24:24 -0000
@@ -70,6 +70,8 @@ configuration options by running:
To build milter-greylist, just do the usual
./configure && make && make install

+Note that you cannot safely use -j because of the .y.c rule.
+
If libpthread and libmilter are not automatically located, use
--with-libpthread and --with-libmilter flags to the configure
script.

Re: [milter-greylist] make -j?

2008-10-03 by Greg Troxel

The NetBSD yacc man page indicates that it's POSIX.2 compliant, and
doesn't say that -o is an extension, so I'm hoping it is safe to use.
With this, I did a bunch of 'make -j9' and didn't lose.


Index: Makefile.in
===================================================================
RCS file: /milter-greylist/milter-greylist/Makefile.in,v
retrieving revision 1.64
diff -u -p -u -p -r1.64 Makefile.in
--- Makefile.in 26 Sep 2008 23:35:44 -0000 1.64
+++ Makefile.in 3 Oct 2008 23:30:03 -0000
@@ -144,8 +144,7 @@ realclean: clean
.l.c:
${LEX} -o$@ $<
.y.c:
- ${YACC} -p`echo $@|${SED} 's/^\([^_]\{1,\}_\).*$$/\1/'` $<
- ${MV} y.tab.c $@
+ ${YACC} -p`echo $@|${SED} 's/^\([^_]\{1,\}_\).*$$/\1/'` $< -o $@

# This is a target for debugging
start: milter-greylist

Re: [milter-greylist] make -j?

2008-10-03 by Joe Pruett

i have no idea if there might be other systems that mg would run on that 
have a yacc that doesn't have -o.  the last time i thought about this was 
unix v7 on a pdp-11, so things have changed a bit since then :-).

Re: [milter-greylist] make -j?

2008-10-04 by manu@netbsd.org

Greg Troxel <gdt@...> wrote:

> The NetBSD yacc man page indicates that it's POSIX.2 compliant, and
> doesn't say that -o is an extension, so I'm hoping it is safe to use.
> With this, I did a bunch of 'make -j9' and didn't lose.

If you are heading that way, add a configure test for yacc -o (should
not be very hard), and produce an appropriate output. For instance,
Makefile.in could have:

${YACC} -p`echo $@|${SED} 's/^\([^_]\{1,\}_\).*$$/\1/'` $< @YACC_OUTPUT@

And configure could set 
YACC_OUTPUT="-o $@"
or
YACC_OUTPUT="; mv y.tab.c $@"
depending on yacc -o availaibillity.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.