On 12/28/2013 10:49 PM, Alan W. Irwin wrote:
> On 2013-12-28 16:53-0700 Orion Poplawski wrote:
> 
>> On 06/27/2013 11:44 AM, RCY wrote:
>>> Hi,
>>>   I am trying to build the development version of plplot with octave
>>> bindings. However I get numerous errors.
>>> Is the version incompatible with later versions of octave?
>>>
>>> Thanks
>>>
>>> [ 71%] Building CXX object
>>> bindings/octave/CMakeFiles/plplot_octave.dir/plplot_octaveOCTAVE_wrap.cxx.o
>>>
>>> In file included from
>>> /usr/local/include/octave-3.7.5/octave/dim-vector.h:35:0,
>>>                   from
>>> /usr/local/include/octave-3.7.5/octave/Array.h:35,
>>>                   from
>>> /usr/local/include/octave-3.7.5/octave/boolMatrix.h:27,
>>>                   from
>>> /usr/local/include/octave-3.7.5/octave/mx-base.h:32,
>>>                   from
>>> /usr/local/include/octave-3.7.5/octave/Matrix.h:30,
>>>                   from /usr/local/include/octave-3.7.5/octave/oct.h:33,
>>>                   from
>>> /home/rc/Downloads/plplot/build/bindings/octave/plplot_octaveOCTAVE_wrap.cxx:154:
>>>
>>> /usr/local/include/octave-3.7.5/octave/oct-refcount.h:27:3: error:
>>> #error "The file <octave/config.h> must be included before
>>> oct-refcount.h."
>>> In file included from
>>> /usr/local/include/octave-3.7.5/octave/mx-base.h:28:0,
>>>                   from
>>> /usr/local/include/octave-3.7.5/octave/Matrix.h:30,
>>>                   from /usr/local/include/octave-3.7.5/octave/oct.h:33,
>>>                   from
>>> /home/rc/Downloads/plplot/build/bindings/octave/plplot_octaveOCTAVE_wrap.cxx:154:
>>>
>>> /usr/local/include/octave-3.7.5/octave/MatrixType.h:36:1: error:
>>> variable ‘OCTAVE_API MatrixType’ has initializer but incomplete type
>>> /usr/local/include/octave-3.7.5/octave/MatrixType.h:36:1: warning:
>>> extended initializer lists only available with -std=c++11 or
>>> -std=gnu++11 [enabled by default]
>>> /usr/local/include/octave-3.7.5/octave/MatrixType.h:38:1: error:
>>> expected primary-expression before ‘public’
>>> /usr/local/include/octave-3.7.5/octave/MatrixType.h:38:1: error:
>>> expected ‘}’ before ‘public’
>>> /usr/local/include/octave-3.7.5/octave/MatrixType.h:38:1: error:
>>> expected ‘,’ or ‘;’ before ‘public’
>>> /usr/local/include/octave-3.7.5/octave/MatrixType.h:56:20: error:
>>> expected constructor, destructor, or type conversion before ‘;’ token
>>> /usr/local/include/octave-3.7.5/octave/MatrixType.h:58:21: error:
>>> ‘MatrixType’ does not name a type
>>
>>
>> I'm seeing the same now with octave 3.8.0-rc2.
> 
> Hi Orion and RCY:
> 
> @RCY: if you want to write further comments to this list discussion
> (which I presume will be on-going) you are required but also most
> welcome to subscribe to this list.  However, I am sure everyone will
> be happy to CC you (like I have) if you decide not to subscribe and
> simply want to read the further discussion without writing comments of
> your own.
> 
> @Orion:
> 
> Thanks for that report for an octave 3.8.0 release candidate.  I
> notice the final version of octave 3.8.0 was released just today. (see
> ftp://ftp.gnu.org/gnu/octave). Once that version becomes available on
> Fedora could you confirm you are still seeing the same issue?
> 
> I was intrigued by the
> 
>>> #error "The file <octave/config.h> must be included before
>>> oct-refcount.h."
> 
> message.  From our swig-generated code,
> bindings/octave/plplot_octaveOCTAVE_wrap.cxx, this message is
> coming from
> 
> #include <octave/oct.h>
> 
> which is _the first_ octave-related include in that source code. So I
> don't think this error has anything to do with us unless there is a
> new Octave 3.8.0 requirement (which I think would be unlikely) to
> include a different octave header before octave/oct.h.
> 
> For your further information, Andrew's and my extensive tests of our
> octave bindings and examples for PLplot-5.9.11 were fine.  Andrew
> tested that PLplot release on both Debian unstable and Ubuntu Saucy
> (both of which have Octave-3.6.4) and I tested on Debian stable
> (Octave version 3.6.2).
> 
> Thus, it appears to me that since the above first octave include
> worked fine for those versions of octave yet errors out for
> octave-3.8.0, that it is highly probable all the above messages are
> due to an internal error in octave-3.8.0 itself which might or might
> not be sorted out by 3.8.0 final.
> 
> If it is not sorted out by 3.8.0 final, then you might want to try a
> simple test of compiling code consisting of the single #include
> statement above.  Assuming that errors out the same way, then that
> simple test could be used as the core of a report to the Octave
> developers to see what they say about the issue.
> 
> Alan


Still failing with 3.8.0 final:

http://koji.fedoraproject.org/koji/getfile?taskID=6340306&name=build.log

$ g++ -c -fPIC -I/usr/include/octave-3.8.0/octave/..
-I/usr/include/octave-3.8.0/octave -O2 -g -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
-m64 -mtune=generic -pthread test.cc
$ cat test.cc
#include <octave/oct.h>

$ cat /usr/include/octave-3.8.0/octave/oct.h
/*

Copyright (C) 1996-2013 John W. Eaton

This file is part of Octave.

Octave is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.

Octave is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with Octave; see the file COPYING.  If not, see
<http://www.gnu.org/licenses/>.

*/

#if !defined (octave_oct_h)
#define octave_oct_h 1

// Things that are often included to create .oct files.

// config.h needs to be first because it includes #defines that can */
// affect other header files.

#include <config.h>

#include "Matrix.h"

#include "oct-locbuf.h"
#include "defun-dld.h"
#include "error.h"
#include "gripes.h"
#include "help.h"
#include "oct-obj.h"
#include "pager.h"
#include "utils.h"
#include "variables.h"

#endif


My guess is that you are pulling in plplot's config.h before octave's
config.h:

/usr/bin/c++   -DHAVE_CONFIG_H -Dplplot_octave_EXPORTS -O2 -g -pipe
-Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches
 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables  -fPIC
-I/builddir/build/BUILD/plplot-5.9.10/include
-I/builddir/build/BUILD/plplot-5.9.10/lib/qsastime
-I/builddir/build/BUILD/plplot-5.9.10/fedora
-I/builddir/build/BUILD/plplot-5.9.10/fedora/include
-I/builddir/build/BUILD/plplot-5.9.10/fedora/bindings/octave
-I/usr/include/octave-3.8.0 -I/usr/include/octave-3.8.0/octave
-I/builddir/build/BUILD/plplot-5.9.10/bindings/swig-support    -o
CMakeFiles/plplot_octave.dir/plplot_octaveOCTAVE_wrap.cxx.o -c
/builddir/build/BUILD/plplot-5.9.10/fedora/bindings/octave/plplot_octaveOCTAVE_wrap.cxx
In file included from /usr/include/octave-3.8.0/octave/dim-vector.h:35:0,
                 from /usr/include/octave-3.8.0/octave/Array.h:35,
                 from /usr/include/octave-3.8.0/octave/boolMatrix.h:27,
                 from /usr/include/octave-3.8.0/octave/mx-base.h:32,
                 from /usr/include/octave-3.8.0/octave/Matrix.h:30,
                 from /usr/include/octave-3.8.0/octave/oct.h:33,
                 from
/builddir/build/BUILD/plplot-5.9.10/fedora/bindings/octave/plplot_octaveOCTAVE_wrap.cxx:154:
/usr/include/octave-3.8.0/octave/oct-refcount.h:27:3: error: #error "The
file <octave/config.h> must be included before oct-refcount.h."
 # error "The file <octave/config.h> must be included before
oct-refcount.h."
   ^

So you probably need to include <octave/config.h> first, but you could
certainly argue that octave's header should use <octave/config.h> as
well - although that would be a large undertaking.


-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  or...@cora.nwra.com
Boulder, CO 80301              http://www.cora.nwra.com

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to