[Pkg-octave-devel] compilation with gcc-4.3
Rafael Laboissiere
rafael at debian.org
Fri Feb 8 09:28:50 UTC 2008
* John W. Eaton <jwe at bevo.che.wisc.edu> [2008-02-07 16:06]:
> On 7-Feb-2008, Pascal A. Dupuis wrote:
>
> | I also maintain that, without the mentionned patch, the compilation
> | fails with
> |
> | /usr/bin/g++ -c -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc -DHA
> | VE_CONFIG_H -mieee-fp -Wall -W -Wshadow -Wold-style-cast -O2 Cell.cc -o pic/Cell
> | .o
> | In file included from ov.h:41,
> | from oct-obj.h:33,
> | from Cell.h:32,
> | from Cell.cc:29:
> | mxarray.h: In static member function 'static char* mxArray::strsave(const char*)
> | ':
> | mxarray.h:305: error: 'strlen' was not declared in this scope
> | mxarray.h:307: error: 'strcpy' was not declared in this scope
> |
> | I forwarded the patch to John, but I also notice that mxarray.h is
> | auto-generated. Don't know how which source was used.
>
> I applied it to src/mxarray.h.in, which is the source file
> corresponding to src/mxarray.h. I confirm that this patch should be
> needed for GCC 4.3. As I recall, there were some changes to clean up
> the include files for 4.3.
I still cannot replicate the bug. It is very strange, but I take your word
(and Pascal's) for it. I am just curious : which version of GCC did you
used? I have here:
(sid) $ /usr/lib/gcc-snapshot/bin/g++ --version
g++ (Debian 20080113-1) 4.3.0 20080113 (experimental) [trunk revision 131510]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I am interested on compiling octave on arm with this version of g++ to see
whether the bug in loading oct files would persist.
> | About the tests, the only one failing is:
> | processing /usr/src/octave3.0-3.0.0/scripts/optimization/sqp.m
> | ***** test
> | x0 = [-1.8; 1.7; 1.9; -0.8; -0.8];
> |
> | [x, obj, info, iter, nf, lambda] = sqp (x0, @phi, @g, [])
> |
> | x_opt = [-1.717143501952599;
> | 1.595709610928535;
> | 1.827245880097156;
> | -0.763643103133572;
> | -0.763643068453300];
> | obj_opt = 0.0539498477702739
> |
> | assert (all (abs (x-x_opt) < sqrt (eps)) && abs (obj-obj_opt) < sqrt (eps));
> | !!!!! test failed
> | error: error creating function handle "@phi"
>
> This is separate from GCC 4.3, and I think it is fixed in the
> release-3-0-x branch in my hg archive.
I might introduce a patch for fixing this bug in the Debian package. Could
you please give me a short tutorial on how to extract the patch from hg?
Thanks,
--
Rafael
More information about the Pkg-octave-devel
mailing list