octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help in building pytave


From: Mike Miller
Subject: Re: Help in building pytave
Date: Thu, 12 May 2016 10:06:04 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

Can we keep these discussions on the maintainers mailing list? Just like
bugs and your blog, I think all questions and discussions about the
project should be public. Adding cc.

On Thu, May 12, 2016 at 09:54:23 -0700, Abhinav Tripathi wrote:
> Hi,
> I cloned pytave using hg. And tried building it... (I assume building
> pytave is necessary to use it from octsympy).

Correct.

> This is what I did (to resolve a few errors)--
> -- when I ran 'autoreconf --install' then got some error that "no program
> or library has the canonical name OCT"
>    A few searches showed that any vairable in makefile with _SOURCES suffix
> is intended to be a program. I did not know how to fix it so I just changed
> the variable name from OCT_SOURCES to ssources (just a random word).
>    After this, I was able to get through this step.

Yes, I thought I had seen that and fixed it but apparently not.

> -- When I ran './configure' I got some errors, I did the following
>     "sudo apt-get install liboctave-dev" because of the error that octave
> dev files were not found
>     "sudo apt-get install python-numpy" to install numpy

Correct. Even better would be if you build the development version of
Octave yourself and work with that, see below.

> Now when I run 'make', I am getting lots of errors in a couple of files,
> specially 'MatrixType.h'... The first few lines of the terminal are:
> --------------------------------
> address@hidden:~/work/pytave$ make
> make  all-am
> make[1]: Entering directory '/home/lucifer/work/pytave'
> /bin/bash ./libtool  --tag=CXX   --mode=compile g++ -std=gnu++11
> -DHAVE_CONFIG_H -I.  -I/usr/include/octave-4.0.0
> -I/usr/include/octave-4.0.0/octave -I/usr/include/python2.7
> -I/usr/lib/python2.7/dist-packages/numpy/core/include   -g -O2 -MT
> _pytave_la-pytave.lo -MD -MP -MF .deps/_pytave_la-pytave.Tpo -c -o
> _pytave_la-pytave.lo `test -f 'pytave.cc' || echo './'`pytave.cc
> libtool: compile:  g++ -std=gnu++11 -DHAVE_CONFIG_H -I.
> -I/usr/include/octave-4.0.0 -I/usr/include/octave-4.0.0/octave
> -I/usr/include/python2.7
> -I/usr/lib/python2.7/dist-packages/numpy/core/include -g -O2 -MT
> _pytave_la-pytave.lo -MD -MP -MF .deps/_pytave_la-pytave.Tpo -c pytave.cc
> -fPIC -DPIC -o .libs/_pytave_la-pytave.o
> In file included from /usr/include/octave-4.0.0/octave/dim-vector.h:35:0,
>                  from /usr/include/octave-4.0.0/octave/Array.h:35,
>                  from /usr/include/octave-4.0.0/octave/boolMatrix.h:27,
>                  from /usr/include/octave-4.0.0/octave/mx-base.h:32,
>                  from /usr/include/octave-4.0.0/octave/Matrix.h:30,
>                  from /usr/include/octave-4.0.0/octave/oct.h:33,
>                  from pytave.cc:32:
> /usr/include/octave-4.0.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."
>    ^
> In file included from /usr/include/octave-4.0.0/octave/mx-base.h:28:0,
>                  from /usr/include/octave-4.0.0/octave/Matrix.h:30,
>                  from /usr/include/octave-4.0.0/octave/oct.h:33,
>                  from pytave.cc:32:
> /usr/include/octave-4.0.0/octave/MatrixType.h:36:1: error: variable
> ‘OCTAVE_API MatrixType’ has initializer but incomplete type
>  MatrixType
>  ^
> /usr/include/octave-4.0.0/octave/MatrixType.h:38:1: error: expected
> primary-expression before ‘public’
>  public:
> -------------------------------------------------------------
> There are many many more errors in MatrixType.h
> Did I miss some installing some packages?
> Did I misconfigure something?
> Is there any other way to use pytave from octsympy?
> Please help...

These errors are all due to changes in the API of the development
version of Octave. Tl;dr: it's best to build pytave against Octave's
development branch for now. It's most useful for people who should have
no problem hacking Octave and building Octave from mercurial anyway.
Since you are a GSoC student, and hopefully a continuing contributor to
Octave, I think building Octave from mercurial is not an undue burden.

Background: there were some nasty hacks in place to get around Octave
bug #41027, overlapping config.h files. Now that Octave has fixed this
and made config.h a private header file, those hacks could be removed
and code cleaned up a great deal. This also makes it not backwards
compatible anymore.

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]