On Tue, Feb 12, 2002 at 15:11:59 -0800, Craig Hughes wrote:
> You can hand edit the Makefile after perl Makefile.PL, but a
> probably better solution would be to find why MakeMaker on your machine
> is trying to link libndbm in.  Could you add a line to the Makefile.PL
> in the spamc build rule to just echo all those $(CFCCFLAG) etc paramters
> in a way where we can tell which one is which?  Then we can try to track
> down which one is inserting the bogus libs.

On 13 February 2002, Erik van der Meulen responded woefully:
> I am afraid I need instructions a little more elaborate. Sorry about
> that. If I just insert 'echo $(CFCCFLAG)' into the Makefile.PL (tried
> various places) and do 'perl Makefile.pl' and 'make', I get all sorts of
> errors.

Makefile.PL is a Perl script; "echo" is a shell command.  See the
disconnect?  However, Makefile.PL is a Perl script that glues together
bits of a makefile, and makefiles are just agglomerations of shell
code.  (*shudder*)  So you just need to put "echo $(CFCCFLAG)" in the
right spot in Makefile.PL.  I suggest inserting it before line 111,
ie. apply this patch:

--- Makefile.PL.orig    Wed Feb 13 09:20:46 2002
+++ Makefile.PL Wed Feb 13 09:20:03 2002
@@ -110,2 +110,3 @@
 spamd/spamc: spamd/spamc.c
+       @echo "spamc rule: CFCCFLAGS=$(CFCCFLAGS)"
        $(CFCC) $(CFCCFLAGS) $(CFOPTIMIZE) spamd/spamc.c \

(Applying patches is another lesson.  I hope it's fairly obvious which
line to add and where.)

However, I just tried this, and I don't think CFCCFLAGS is the problem --
I think CFLIBS is.  Second version of Makefile.PL patch:

--- Makefile.PL.orig    Wed Feb 13 09:20:46 2002
+++ Makefile.PL Wed Feb 13 09:23:25 2002
@@ -110,2 +110,5 @@
 spamd/spamc: spamd/spamc.c
+       @echo "spamc rule: CFCCFLAGS=$(CFCCFLAGS)"
+       @echo "spamc rule: CFLDFLAGS=$(CFLDFLAGS)"
+       @echo "spamc rule: CFLIBS=$(CFLIBS)"
        $(CFCC) $(CFCCFLAGS) $(CFOPTIMIZE) spamd/spamc.c \

A bit of poking around shows that CFLIBS comes from $Config{libs}, and
you already showed us that when you ran "perl -V".

So, the first question once again: why does Perl's $Config{libs} include
-lndbm on a system that doesn't have libndbm installed?

Finally, it *doesn't matter* -- I bet that using Perl's linker flags for
spamc is unnecessary and irrelevant.  So here's my third and final
Makefile.PL patch, which should fix the problem instead of just trying
to figure out what's wrong:

--- Makefile.PL.orig    Wed Feb 13 09:20:46 2002
+++ Makefile.PL Wed Feb 13 09:26:31 2002
@@ -110,4 +110,3 @@
 spamd/spamc: spamd/spamc.c
-       $(CFCC) $(CFCCFLAGS) $(CFOPTIMIZE) spamd/spamc.c \
-                       -o $@ $(CFLDFLAGS) $(CFLIBS)
+       $(CFCC) $(CFCCFLAGS) $(CFOPTIMIZE) spamd/spamc.c -o $@

Craig, if you haven't already changed Makefile.PL like this, you might
want to consider it!

        Greg
-- 
Greg Ward - software developer                [EMAIL PROTECTED]
MEMS Exchange                            http://www.mems-exchange.org

_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to