From octave-maintainers-request at bevo dot che dot wisc dot edu Mon Nov 17 01:35:10 2003 Subject: LAPACK dll From: pkienzle at users dot sourceforge dot net To: octave-maintainers mailing list Date: Mon, 17 Nov 2003 02:38:26 -0000 Hi, I've been trying to put together a Windows version of Octave with an lapack DLL so that we only need to provide atlas-enhanced replacements for lapack.dll instead of the entire libcruft.dll. I have run into a snag --- octave wants to override xerbla at runtime, but windows wants to statically link it into the DLL, or at least it wants a DLL containing xerbla that it can link to. Is there a way to override xerbla at runtime? What I'm doing currently is replacing xerbla with one which calls privstop instead of stop, where privstop() is a C function which calls (*stopfn)(). stopfn is defined by a call to stopblas(xstopx). This should work (I haven't rebuilt octave yet), but it means I need to convince octave to call stopblas(xstopx) on windows. There are two things I don't like about this solution: 1) The octave specific hack to lapack --- I want a unified lapack useable by all the windows scientific packages so that we can share the work of building the optimized versions. Any idea how R/Matlab/Scilab, etc. address this problem? Or do the just assume that xerbla is never invoked? 2) The windows specific hack to octave. That's minor enough that I can get over it, but it is inelegant at best. I'm attaching the build code and support functions for mklapackdll.sh for the curious. I had to hack around a few more things to avoid loading the libg2c I/O functions. Thanks in advance, Paul Kienzle pkienzle at users dot sf dot net