[Scilab-Dev] Fortran question

Jean-Pierre Dussault Jean-Pierre.Dussault at Usherbrooke.CA
Wed Aug 14 18:38:27 CEST 2013


Hi!

I found a solution to the dummy main problem: see section  f2c in  
http://www.tfinley.net/notes/blas-lapack/

However, I am stuck with the problem:

    link(setulb_path + 'libsetulb' + getdynlibext(), ['setulb'],'f');
    !--error 235
    link: problem with one of the entry point.
    at line      14 of exec file called by :
    exec loader.sce

The libsetulb library is produced by

    link_name = 'setulb';
    flag  = "f";         //  is a FORTRAN77 code
    files = ['LBFGSB.f'  ];   // source files for LBFGSB
    // the next call generates files (Makelib,loader.sce) used
    // for compiling and loading LBFGSB and performs the compilation
    libs = ["libf2c"];
    ilib_for_link(link_name,files,libs,flag,[]);

and LBFGSB.f contains the code of the subroutine setulb (and many more 
subroutines). No error or warning is produced by this builder code and 
the file libsetulb.so is created

However, nm -g libsetulb.so returns only:

    nm -g libsetulb.so
                      w _Jv_RegisterClasses
    0000000000201010 A __bss_start
                      w __cxa_finalize@@GLIBC_2.2.5
                      w __gmon_start__
    0000000000201010 A _edata
    0000000000201020 A _end
    0000000000000588 T _fini
    0000000000000440 T _init

no trace of my entry points.


I work under Ubuntu 12.04 (precise) with scilab 5.4.1.

Any clue will be much appreciated.

JPD



Le 2013-08-09 00:22, Jean-Pierre Dussault a écrit :
> Hi!
>
> I struggle to interface L-BFGS-B, an optimization solver written in 
> FORTRAN.
>
> Here is my builder
>
>     // builder code for LBFGSB
>     // functions to be added to the call table
>     link_name = ['setulb'];
>     flag  = "f";         //  is a FORTRAN functions
>     files = ['LBFGSB.f' ];   // objects files for LBFGSB
>     // the next call generates files (Makelib,loader.sce) used
>     // for compiling and loading LBFGSB and performs the compilation
>     libs = "";
>     ilib_for_link(link_name,files,libs,flag,'','loaderL.sce');
>
> The loader complains libsetulb.so: undefined symbol: s_wsle
>
> To get this symbol, all I found is to use /usr/lib/libf2c.so (I change 
> the libs variable to libs = "/usr/lib/libf2c";
>  but then, the loader complains
>
>     /usr/lib/libf2c.so: undefined symbol: MAIN__
>
> So I am stuck.
>
> I wonder, the supported compilers states
>
>     On GNU/Linux, GNU compilers (gcc, g++ and gfortran) are packaged
>     in all distributions.
>
> and I have gfortran but need to install libf2c to get s_wsle...
>
>
> Thank you,
>
> JPD
>
>
>
>
> _______________________________________________
> dev mailing list
> dev at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20130814/19bf0e50/attachment.htm>


More information about the dev mailing list