From bug-request at octave dot org Thu Jan 12 12:06:30 2006 Subject: Re: Compiling octave with Intel C++/Fortran compilers on Linux From: David Bateman To: "John W. Eaton" CC: "Maverick\" Rai , bug@octave.org"@az33exr03.mot.com Date: Thu, 12 Jan 2006 19:02:05 +0100 John W. Eaton a écrit : > On 12-Jan-2006, "Tetsuji \"Maverick\" Rai" wrote: > > | I've successfully compiled octave with Intel C++/Fortran compiler on > | Gentoo Linux on P4 to make it faster and probably more accurate > (because > | it's more accurate than gcc-3.4.4 with proper options.) But I needed a > | tweak, so I write diff here. > | > | It's in src/oct-stream.cc, and the diff for 2.1.72 is > | > | *** ../../octave-2.1.72/src/oct-stream.cc Sat Nov 12 04:48:27 > 2005 > | - ---- ./oct-stream.cc Thu Jan 12 05:47:20 2006 > | *************** > | *** 1143,1148 **** > | - ---- 1143,1149 ---- > | octave_scan (std::istream&, const scanf_format_elt&, float*); > | #endif > | > | + #if !defined(__INTEL_COMPILER) // TMR > | template <> > | std::istream& > | octave_scan (std::istream& is, const scanf_format_elt& fmt, double* > | valptr) > | *************** > | *** 1317,1323 **** > | > | return is; > | } > | ! > | template std::istream& > | octave_scan (std::istream&, const scanf_format_elt&, double*); > | > | - ---- 1318,1324 ---- > | > | return is; > | } > | ! #endif //TMR > | template std::istream& > | octave_scan (std::istream&, const scanf_format_elt&, double*); > > You have not reported what problem this patch solves. Precisely what > error message or problem do you see without the patch? Perhaps there > is a better fix that would not require the ifdef. > > jwe > Its also dangerous to ifdef a function without supplying a replacement, you'll be fine until you try and call it and then you'll be a seg-fault. A stub at least should be supplied so that octave doesn't exit unexpectedly.. D. ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------