[rrd-developers] [PATCH] fix non-windows build for bindings/perl-shared

kevin brintnall kbrint at rufus.net
Wed Mar 4 16:55:13 CET 2009


Tobi,

It looks like r1742 broke the perl-shared bindings.  On my BSD system, it
now runs "ntmake.PL" after "Makefile.PL".  This screws up the build
process:

	% perl Makefile.PL
	Writing Makefile for RRDs

	## at this point, the Makefile is correct

	% make
	cc -c  -I../../src  -DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.9/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include -O -pipe    -DVERSION=\"1.3002\"  -DXS_VERSION=\"1.3002\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.8.9/mach/CORE"  -DPERLPATCHLEVEL=8 RRDs.c
	Running Mkbootstrap for RRDs ()
	chmod 644 RRDs.bs
	rm -f blib/arch/auto/RRDs/RRDs.so
	cc  -shared  -L/usr/local/lib RRDs.o -L../../src/.libs/  -lrrd  -o blib/arch/auto/RRDs/RRDs.so
	chmod 755 blib/arch/auto/RRDs/RRDs.so
	cp RRDs.bs blib/arch/auto/RRDs/RRDs.bs
	chmod 644 blib/arch/auto/RRDs/RRDs.bs
	Manifying blib/man3/RRDs.3
	/usr/local/bin/perl "-Iblib/arch" "-Iblib/lib" ntmake.PL ntmake
	Unrecognized argument in LIBS ignored: '../../src/release/rrd.lib'
	Unrecognized argument in LIBS ignored: '"/Program'
	Unrecognized argument in LIBS ignored: 'Files/GnuWin32/lib/libart_lgpl.lib"'
	Unrecognized argument in LIBS ignored: '"/Program'
	Unrecognized argument in LIBS ignored: 'Files/GnuWin32/lib/libz.lib"'
	Unrecognized argument in LIBS ignored: '"/Program'
	Unrecognized argument in LIBS ignored: 'Files/GnuWin32/lib/libpng.lib"'
	Unrecognized argument in LIBS ignored: '"/Program'
	Unrecognized argument in LIBS ignored: 'Files/GnuWin32/lib/libfreetype.lib"'
	Writing Makefile for RRDs

	## somewhere it was over-written by "ntmake".

According to ExtUtils::MakeMaker:

	 MakeMaker can run programs to generate files for you at build
	 time.	By default any file named *.PL (except Makefile.PL and
	 Build.PL) in the top level directory will be assumed to be a Perl
	 program and run passing its own basename in as an argument.  For
	 example...

	     perl foo.PL foo

	 This behavior can be overridden by supplying your own set of files to
	 search.  PL_FILES accepts a hash ref, the key being the file to run
	 and the value is passed in as the first argument when the PL file is
	 run.


So I suggest we do one or more of these 3:

 (1) revert r1742

 (2) override PL_FILES in Makefile.PL (patch attached, but I don't have NT
     system to test on...  I'm not certain how ntmake.PL gets called
     during NT build)

 (3) put this atop ntmake.PL, turning it into a no-op on most systems:

       exit(0) unless $^O eq 'MSWin32';

What do you think?

-- 
 kevin brintnall =~ /kbrint at rufus.net/

---
--- a/bindings/perl-shared/Makefile.PL
+++ b/bindings/perl-shared/Makefile.PL
@@ -42,6 +42,7 @@ WriteMakefile(
     'depend'       => {'RRDs.c' => "../../src/librrd.la"},
     'LDFROM'       => '$(OBJECT) '.$librrd, 
     'realclean'    => {FILES => 't/demo?.rrd t/demo?.png' },
+    'PL_FILES'     => {},
     ($^O eq 'darwin') ? ( 'LDDLFLAGS'    => "-L../../src/.libs/ $Config{lddlflags}" ) : ()
 );
 



More information about the rrd-developers mailing list