On 12/29/2013 11:00 AM, Alan W. Irwin wrote: > On 2013-12-29 08:41-0700 Orion Poplawski wrote: > >> 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: > > I think you are correct, and the root cause is a subtle change in how > octave attempts to include its config.h. For 3.6.x, oct.h used > > #include "config.h" > > which meant that file (located in the same directory as oct.h for > 3.6.x) is always safely found without clashing with other config.h > files. But now I think the Octave developers have made a somewhat > irresponsible choice > for how they handle config.h for 3.8.0. They changed oct.h (see above) > to use the angle-bracket form > > #include <config.h> > > which means the compiler is allowed to look everywhere for config.h > that is allowed by the -I switch order which is much less safe against > name clashes (e.g., with PLplot's config.h) and also now requires two -I > switches to find all the Octave headers assuming the new location of > config.h is /usr/include/octave-3.8.0 rather than > /usr/include/octave-3.8.0/octave.
Ah, good catch, that may be the issue. I've filed: https://savannah.gnu.org/bugs/index.php?41027 > > <aside> > Both above and below your -I switches point to _both_ > /usr/include/octave-3.8.0/ and /usr/include/octave-3.8.0/octave which > suggests the new location (for 3.8.0) for config.h might be > /usr/include/octave-3.8.0/. (Note on my Debian stable system > /usr/include/octave-3.6.2/ has nothing in it but the octave subdirectory > so there is no need for those two different -I switches.) > </aside> > The issue is that octave using programs use <octave/oct.h> but the octave headers just use "oct.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." >> ^ > > I frankly don't understand how the above is finding PLplot's config.h > which should be located in the top directory of the build tree which I > infer is /builddir/build/BUILD/plplot-5.9.10 in the above case. But > none of the above > -I switches point to that location. So I may be missing something. But > if -I/builddir/build/BUILD/plplot-5.9.10 came before > -I/usr/include/octave-3.8.0, then the compiler would pick the Plplot > version of config.h to use for both PLplot and octave, and if the order > were reversed, the compiler would pick the Octave version of config.h > to use for both PLplot and octave. Perhaps it could be some other config.h? > Regardless of the one -I switch detail above which I don't understand, > this issue shows there is very likely a name clash with octave-3.8.0 > now and potentially with other packages as well in the future so the > only proper solution to this issue is to rename the PLplot config.h to > a less generic name. > > More later after I implement and test that change. > > Alan > __________________________ > Alan W. Irwin > > Astronomical research affiliation with Department of Physics and Astronomy, > University of Victoria (astrowww.phys.uvic.ca). > > Programming affiliations with the FreeEOS equation-of-state > implementation for stellar interiors (freeeos.sf.net); the Time > Ephemerides project (timeephem.sf.net); PLplot scientific plotting > software package (plplot.sf.net); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); > and the Linux Brochure Project (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ -- 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