On Mon, Jan 25, 2016 at 05:49:36PM -0600, Luis Mochan wrote:
> Thanks Rob,
> > >Does anyone knows why is the behavior different when linking by hand and
> > >when running ./Build?
> > 

I think I got it!

The module Module::Build::Pluggable::Fortran.pm contains the line
    $self->_add_extra_linker_flags( ExtUtils::F77->runtime,
        @{ $self->_fortran_obj_files } );
in order to add the libraries and object files required by the
linker. This might work when ExtUtils::F77->runtime returns a single
library library, but not when it returns multiple librariesbin a
single string. The string would have to be split into a list of single
libraries. So I guess a solution would be to replace that line by

    $self->_add_extra_linker_flags( split(" ",ExtUtils::F77->runtime),
        @{ $self->_fortran_obj_files } );

I tested my example with the modified Fortran.pm and now it works.

I attach a patch.

Thanks and 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


*** /home/mochan/OldFortran.pm	2016-01-25 18:56:20.414873178 -0600
--- /home/mochan/perl5/perlbrew/perls/perl-5.22.0/lib/site_perl/5.22.1/Module/Build/Pluggable/Fortran.pm	2016-01-25 18:52:54.295335984 -0600
***************
*** 32,38 ****
      $self->build_requires( 'ExtUtils::F77'      => 0 );
      $self->build_requires( 'ExtUtils::CBuilder' => '0.23' );
  
!     $self->_add_extra_linker_flags( ExtUtils::F77->runtime,
          @{ $self->_fortran_obj_files } );
  
      $self->builder->add_to_cleanup('f77_underscore');
--- 32,38 ----
      $self->build_requires( 'ExtUtils::F77'      => 0 );
      $self->build_requires( 'ExtUtils::CBuilder' => '0.23' );
  
!     $self->_add_extra_linker_flags(split(" ", ExtUtils::F77->runtime),
          @{ $self->_fortran_obj_files } );
  
      $self->builder->add_to_cleanup('f77_underscore');
------------------------------------------------------------------------------
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