Mark,

I started to test my modules, built with
Module::Build::Pluggable::Fortran and Module::Build::Pluggable::PDL.
So far './Build test' works, but './Build disttest' fails. One of the many
reasons is the following error
  #     Tried to use 'P::E'.
  #     Error:  Can't locate loadable object for module
  lib::P::E in @INC
(I simplified the name above). After I get this error, './Build test'
fails for the same reason, although this can be cured by a './Build
clean'.  Trying to understand the error, I made a distribution, i.e.,
'./Build dist' and looked at teh contents of the .tar.gz generated
file. I realized that the source of the module P::E was absent, i.e.,
the file P::E.pd which contains the calls to my fortran routines was
not copied, and thus, the corresponding libraries were not built when
testing the distribution.

Do you have any advice?

Regards,
Luis




On Thu, Jan 28, 2016 at 06:31:55PM -0600, Luis Mochan wrote:
> I noticed that MB::Pluggable::Fortran cleans the file f77_underscore,
> although that file is not generated during the build process. However
> that file is generated, for example, in the build process of
> PDL::Slatec as a hack to find out if Fortran routine names ought to be
> followed by an underscore when called from a .pd file. I had copied
> the relevant code from the Makedfile of PDL::Slatec to my Build.PL
> file and it did work properly, except for an inconvenience. When I
> './Build clean', that file disappears, so if I './Build' again without
> running 'perl Build.PL' first, my underscores dissapear from the calls
> to my Fortran routines and they can no longer be linked to my PDL
> code. Thus I guess that the file f77_underscore should be rebuilt every time 
> I './Build' my
> package, and not only when 'Build' is created. To that end I made a
> further change to my MB::Pluggable::Fortran.pm routine, adding the
> appropriate code from PDL::Slatec's Makefile.PL to the sub routine
> HOOK_build. I attach a patch. So far, it seems to work.
> 
> Best regards,
> Luis
> 
> 
> 
> On Wed, Jan 27, 2016 at 08:49:23AM -0600, Luis Mochan wrote:
> > Hello Mark,
> > Thank you! The module is simplifying the preparation of my packages,
> > and seems to be working nicely now.
> > Best regards,
> > Luis
> 
> -- 
> 
>                                                                   o
> W. Luis Mochán,                      | tel:(52)(777)329-1734     /<(*)
> Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388     `>/   /\
> Apdo. Postal 48-3, 62251             |                           (*)/\/  \
> Cuernavaca, Morelos, México          | [email protected]   /\_/\__/
> GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB
> 
> 

> *** Fortran.pm        2016-01-28 18:10:47.703398767 -0600
> --- 
> /home/mochan/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.1/Module/Build/Pluggable/Fortran.pm
>       2016-01-28 18:29:56.022810851 -0600
> ***************
> *** 46,51 ****
> --- 46,59 ----
>   
>       my $mycompiler = ExtUtils::F77->compiler();
>       my $mycflags   = ExtUtils::F77->cflags();
> +     #Find if we need trailing underscores in fortran
> +     #if we do, create a notice which may be used by .pd files later on.
> +     my $trail = ExtUtils::F77->trail_;
> +     unlink("f77_underscore") if -e "f77_underscore";
> +     if ($trail) {
> +     open OUT, ">f77_underscore" or die "unable to write scratch file";
> +     close OUT;
> +     }
>       undef $mycflags if $mycflags =~ m{^\s*};    # Avoid empty arg in cmd
>   
>       my $f_src_files = $self->_fortran_files;

> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140

> _______________________________________________
> pdl-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pdl-general


-- 

                                                                  o
W. Luis Mochán,                      | tel:(52)(777)329-1734     /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388     `>/   /\
Apdo. Postal 48-3, 62251             |                           (*)/\/  \
Cuernavaca, Morelos, México          | [email protected]   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to