[Pkg-octave-devel] compilation with gcc-4.3

John W. Eaton jwe at bevo.che.wisc.edu
Thu Feb 7 21:06:38 UTC 2008


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.

| 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.

Thanks,

jwe



More information about the Pkg-octave-devel mailing list