pcp
[Top] [All Lists]

Re: [pcp] Building PERL PMDAs on Solaris

To: Max Matveev <makc@xxxxxxxxx>
Subject: Re: [pcp] Building PERL PMDAs on Solaris
From: Nathan Scott <nscott@xxxxxxxxxx>
Date: Tue, 22 Sep 2009 13:03:02 +1000 (EST)
Cc: pcp@xxxxxxxxxxx
In-reply-to: <19127.19461.625461.331046@xxxxxxxxxxxx>
----- "Max Matveev" <makc@xxxxxxxxx> wrote:

> I'm having problems with building Perl PMDAs on Solaris: the defaults
> which MakeMaker picks do not agree with what I've got - for example,
> I'm building with compiler set in 64 bit mode but Perl part of the
> build does not pick that setting and as a result fails to create
> DSOs.
> 
> I'm thinking about applying the following changes to the Makefile.PL
> ...

That should be fine, I think, though be even better if it handled both
cases (with & without $CC set).

> --- a/src/cpan/PMDA/Makefile.PL
> +++ b/src/cpan/PMDA/Makefile.PL
> @@ -14,4 +14,6 @@ WriteMakefile(
>      LDFROM             => "-L$ENV{PCP_TOPDIR}/src/libpcp/src
>      -L$ENV{PCP_TOPDIR}
>      INC                        => "-I$ENV{PCP_TOPDIR}/src/include
>      -I/usr/includ
>      LIBS               => ["-L$ENV{PCP_DIR}\\local\\bin",
>      '-lpcp_pmda', '-lpcp'
> +       CC              => $ENV{"CC"},
> +       LD              => $ENV{"CC"},
>  );
> 
> 
> We also missing a dependency in the GNUmakefile to remake Makefile
> when Makefile.PL changes:
> 
> --- a/src/cpan/PMDA/GNUmakefile
> +++ b/src/cpan/PMDA/GNUmakefile
> @@ -46,9 +46,9 @@ endif
>  PMDA.o: Makefile PMDA.xs
>         $(PERLMAKE) -f Makefile
>  
> -Makefile: COPYING
> +Makefile: COPYING Makefile.PL

OK, looks good.

>         export PCP_TOPDIR=`pwd`/$(TOPDIR); \
> -       perl Makefile.PL $(MAKEMAKER_OPTIONS)
> +       CC="$(CC)" perl Makefile.PL $(MAKEMAKER_OPTIONS)

Can you do an export on a separate line (like TOPDIR), for readability
if/when more env vars needed?

cheers.

-- 
Nathan

<Prev in Thread] Current Thread [Next in Thread>