octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling BLAS and LAPACK libraries in Octave 3.3


From: Ben Abbott
Subject: Re: Calling BLAS and LAPACK libraries in Octave 3.3
Date: Sun, 19 Sep 2010 11:32:15 -0400

On Sep 19, 2010, at 7:13 AM, Lukas Reichlin wrote:

> On 18.09.2010, at 16:56, Ben Abbott wrote:
> 
>> On Sep 18, 2010, at 9:16 AM, Lukas Reichlin wrote:
>> 
>>> Dear Octave Community,
>>> 
>>> I noticed the NEWS entry
>>> 
>>> ** BLAS and LAPACK libraries are now required to build Octave.  The
>>>  subset of the reference BLAS and LAPACK libraries has been removed
>>>  from the Octave sources.
>>> 
>>> Since I have problems with mkoctfile (it doesn't find routines like  
>>> DLAMCH, see below) when building the control package [1] with MacPorts' 
>>> octave- 
>>> devel 3.3.52, my question is:
>>> 
>>> Do I need to change something in my package (e.g. src/Makefile [2]) or  
>>> does it seem like a MacPorts-related problem?
>>> 
>>> Thanks in advance for any hints!
>>> Best Regards,
>>> Lukas
>>> 
>>> PS:
>>> * There are no problems building "control" when using MacPorts 
>>> octave-3.2.4, neither PPC nor Intel.
>>> * Note that is possible to compile individual oct-files by src/makefile_*.m
>>> * The only thing that works for me with octave 3.3.52 is 
>>> src/makefile_helpers.m, probably because those functions are pure C++.
>>> * inst/test_control.m executes all tests at once.
>>> 
>>> [1] 
>>> http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/control/
>>> 
>>> [2] 
>>> http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/control/src/Makefile
>>> 
>>> octave:4> makefile_zero
>>> Undefined symbols:
>>> "_dlaset_", referenced from:
>>>    _ab08nd_ in AB08ND.o
>>>    _ab08nd_ in AB08ND.o
>>>    _ab08nx_ in AB08NX.o
>>>    _ab08nx_ in AB08NX.o
>>>    _ab08nx_ in AB08NX.o
>>>    _ab08nx_ in AB08NX.o
>>> "_dggev_", referenced from:
>>>    Fslab08nd(octave_value_list const&, int) in slab08nd.o
>>> "_dlapmt_", referenced from:
>>>    _ab08nx_ in AB08NX.o
>>> "_dlarfg_", referenced from:
>>>    _ab08nx_ in AB08NX.o
>>>    _mb03oy_ in MB03OY.o
>>>    _mb03py_ in MB03PY.o
>>> "_dlatzm_", referenced from:
>>>    _ab08nx_ in AB08NX.o
>>> "_dlacpy_", referenced from:
>>>    _ab08nd_ in AB08ND.o
>>>    _ab08nd_ in AB08ND.o
>>>    _ab08nd_ in AB08ND.o
>>>    _ab08nd_ in AB08ND.o
>>>    _ab08nd_ in AB08ND.o
>>>    _ab08nd_ in AB08ND.o
>>> "_dtzrzf_", referenced from:
>>>    _ab08nd_ in AB08ND.o
>>> "_dormqr_", referenced from:
>>>    _ab08nx_ in AB08NX.o
>>> "_dormrq_", referenced from:
>>>    _ab08nx_ in AB08NX.o
>>>    _ab08nx_ in AB08NX.o
>>> "_dlaic1_", referenced from:
>>>    _mb03oy_ in MB03OY.o
>>>    _mb03oy_ in MB03OY.o
>>>    _mb03py_ in MB03PY.o
>>>    _mb03py_ in MB03PY.o
>>> "_dlamch_", referenced from:
>>>    _ab08nd_ in AB08ND.o
>>>    _tb01id_ in TB01ID.o
>>>    _tb01id_ in TB01ID.o
>>> "_dormrz_", referenced from:
>>>    _ab08nd_ in AB08ND.o
>>>    _ab08nd_ in AB08ND.o
>>> "_dlange_", referenced from:
>>>    _ab08nd_ in AB08ND.o
>>> "_dlarf_", referenced from:
>>>    _mb03oy_ in MB03OY.o
>>>    _mb03py_ in MB03PY.o
>>> "_ilaenv_", referenced from:
>>>    _ab08nd_ in AB08ND.o
>>>    _ab08nd_ in AB08ND.o
>>>    _ab08nx_ in AB08NX.o
>>>    _ab08nx_ in AB08NX.o
>>>    _ab08nx_ in AB08NX.o
>>> ld: symbol(s) not found
>>> collect2: ld returned 1 exit status
>>> Undefined symbols:
>>> "_dlartg_", referenced from:
>>>    _ag08by_ in AG08BY.o
>>>    _ag08by_ in AG08BY.o
>>> "_dlaset_", referenced from:
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08by_ in AG08BY.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>> "_dggev_", referenced from:
>>>    Fslag08bd(octave_value_list const&, int) in slag08bd.o
>>> "_dlapmt_", referenced from:
>>>    _ag08by_ in AG08BY.o
>>> "_dlarfg_", referenced from:
>>>    _ag08by_ in AG08BY.o
>>>    _mb03oy_ in MB03OY.o
>>> "_dlatzm_", referenced from:
>>>    _ag08by_ in AG08BY.o
>>> "_dlacpy_", referenced from:
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>> "_dtzrzf_", referenced from:
>>>    _ag08bd_ in AG08BD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>> "_dormqr_", referenced from:
>>>    _ag08by_ in AG08BY.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>> "_dlaic1_", referenced from:
>>>    _ag08by_ in AG08BY.o
>>>    _ag08by_ in AG08BY.o
>>>    _mb03oy_ in MB03OY.o
>>>    _mb03oy_ in MB03OY.o
>>> "_dlamch_", referenced from:
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08by_ in AG08BY.o
>>>    _tg01ad_ in TG01AD.o
>>>    _tg01fd_ in TG01FD.o
>>> "_dormrz_", referenced from:
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>> "_dlange_", referenced from:
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>> "_dlarf_", referenced from:
>>>    _mb03oy_ in MB03OY.o
>>> "_ilaenv_", referenced from:
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08bd_ in AG08BD.o
>>>    _ag08by_ in AG08BY.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>>    _tg01fd_ in TG01FD.o
>>> ld: symbol(s) not found
>>> collect2: ld returned 1 exit status
>>> octave:5> 
>> 
>> I'm a Mac user but have no experience with mkoctfile. So my thoughts might 
>> not be worth much.
>> 
>> After looking at the help text for mkoctfile, I'd try adding "-Wl,-framework 
>> -Wl,vecLib" to each mkoctfile command.
>> 
>> Ben
> 
> Thank you very much for your reply, Ben. I have tried out some oct-files like
> 
> mkoctfile -Wl,-framework -Wl,vecLib \
>          slag08bd.cc \
>          AG08BD.f AG08BY.f TG01AD.f TB01XD.f MA02CD.f \
>          TG01FD.f MA02BD.f MB03OY.f
> 
> (the example above is the second mkoctfile call in src/makefile_zero.m)
> 
> and it worked fine when I called mkoctfile from bash. However, running 
> mkoctfile inside octave leads to
> 
> octave:1> cd (fileparts (which ("makefile_zero")))
> octave:2> mkoctfile -Wl,-framework -Wl,vecLib \
>>          slag08bd.cc \
>>          AG08BD.f AG08BY.f TG01AD.f TB01XD.f MA02CD.f \
>>          TG01FD.f MA02BD.f MB03OY.f
> usage: basename string [suffix]
>       basename [-a] [-s suffix] string [...]
> error: `framework' undefined near line 2 column 16
> octave:2> 
> 
> which means that makefile_*.m and (just guessing) pkg install don't work.
> 
> There seems to be another problem:
> Since googling framework veclib returns only Macintosh-related hits, it looks 
> like a mac-specific option. Therefore, adding "-Wl,-framework -Wl,vecLib" to 
> src/Makefile would break installation on other platforms (unless they ignore 
> unknown options, which is IMHO unlikely).
> 
> BTW: Where did you find those options? My help mkoctfile doesn't mention 
> them, neither does
> /scripts/miscellaneous/mkoctfile.m
> on hg.savannah.gnu.org
> 
> Thanks again and best regards,
> Lukas

The options can be seen in mkoctfile.in, which is part of the sources.

        http://hg.savannah.gnu.org/hgweb/octave/file/e81914f3921f/mkoctfile.in

... or in mkoctfile after Octave has been built. From the bash shell the help 
info is different than from the Octave command line.

        $ mkoctfile -help

I'll take a look at patching mkoctfile.m to give consistent help text, and fix 
it so the "error: `framework' undefined" doesn't happen.

For now, to call from inside octave, please try calling mkoctfile as a function 
...

        mkoctfile ("-Wl,-framework", "-Wl,vecLib", "slag08bd.cc", 
                "AG08BD.f", "AG08BY.f", "TG01AD.f", "TB01XD.f", 
                "MA02CD.f", "TG01FD.f", MA02BD.f", "MB03OY.f")

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]