Error installing package on classdef tip

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error installing package on classdef tip

Richard Crozier


I'm using hg id e2ed1c0ac403 (classdef) tip

I have built and installed octave as normal. I run

>> pkg install odepkg -forge
In file included from conftest.cc:2:0:
/usr/local/include/octave-3.7.7+/octave/../octave/version.h:35:8:  
error: 'string' in namespace 'std' does not namea type
/usr/local/include/octave-3.7.7+/octave/../octave/version.h:37:8:  
error: 'string' in namespace 'std' does not namea type
/usr/local/include/octave-3.7.7+/octave/../octave/version.h:39:8:  
error: 'string' in namespace 'std' does not namea type
/usr/local/include/octave-3.7.7+/octave/../octave/version.h:41:8:  
error: 'string' in namespace 'std' does not namea type
/usr/local/include/octave-3.7.7+/octave/../octave/version.h:43:8:  
error: 'string' in namespace 'std' does not namea type
/usr/local/include/octave-3.7.7+/octave/../octave/version.h:47:8:  
error: 'string' in namespace 'std' does not namea type
/usr/local/include/octave-3.7.7+/octave/../octave/version.h:51:8:  
error: 'string' in namespace 'std' does not namea type
configure: error: Could not run /usr/local/bin/mkoctfile-3.7.7+
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for mkoctfile... /usr/local/bin/mkoctfile-3.7.7+

pkg: error running the configure script for odepkg.
error: called from 'configure_make' in file  
/usr/local/share/octave/3.7.7+/m/pkg/private/configure_make.m near  
line 72, column 9
error: called from:
error:   /usr/local/share/octave/3.7.7+/m/pkg/private/install.m at  
line 199, column 5
error:   /usr/local/share/octave/3.7.7+/m/pkg/pkg.m at line 394, column 9
>>

Is this classdef only, or also on default?

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


Reply | Threaded
Open this post in threaded view
|

Re: Error installing package on classdef tip

Richard Crozier
On 23/10/2013 10:32, Richard Crozier wrote:
>
>
> I'm using hg id e2ed1c0ac403 (classdef) tip
>
>

I manually added #include <string> to version.h

now I get

 >> pkg install odepkg -forge
In file included from /usr/include/hdf5.h:24:0,
                  from
/usr/local/include/octave-3.7.7+/octave/oct-hdf5.h:27,
                  from /usr/local/include/octave-3.7.7+/octave/ov.h:42,
                  from /usr/local/include/octave-3.7.7+/octave/oct-obj.h:34,
                  from /usr/local/include/octave-3.7.7+/octave/ov-fcn.h:32,
                  from
/usr/local/include/octave-3.7.7+/octave/ov-builtin.h:28,
                  from
/usr/local/include/octave-3.7.7+/octave/defun-int.h:28,
                  from
/usr/local/include/octave-3.7.7+/octave/defun-dld.h:30,
                  from /usr/local/include/octave-3.7.7+/octave/oct.h:36,
                  from odepkg_octsolver_mebdfdae.cc:43:
/usr/include/H5public.h:63:20: fatal error: mpi.h: No such file or directory
compilation terminated.
make: *** [odepkg_octsolver_mebdfdae.o] Error 1
make: Entering directory `/tmp/oct-LoyhMt/odepkg/src'
Unpacking external packages: hairer.tgz
Unpacking external packages: cash.tgz
Unpacking external packages: daskr.tgz
Applying patches from file: hairer.diff
Applying patches from file: cash.diff
patching file cash/mebdfdae.f
patching file cash/mebdfi.f
Applying patches from file: daskr.diff
patching file daskr/dlinpk.f
/usr/local/bin/mkoctfile-3.7.7+ -DHAVE_OCTAVE_37 -v -c
odepkg_octsolver_mebdfdae.cc -o odepkg_octsolver_mebdfdae.o
g++ -c -fPIC -I/usr/local/include/octave-3.7.7+/octave/..
-I/usr/local/include/octave-3.7.7+/octave -I/usr/local/include -mieee-fp
-I/usr/include/freetype2 -g -O2 -pthread -DHAVE_OCTAVE_37
odepkg_octsolver_mebdfdae.cc -o odepkg_octsolver_mebdfdae.o
make: Leaving directory `/tmp/oct-LoyhMt/odepkg/src'

pkg: error running `make' for the odepkg package.
error: called from 'configure_make' in file
/usr/local/share/octave/3.7.7+/m/pkg/private/configure_make.m near line
82, column 9
error: called from:
error:   /usr/local/share/octave/3.7.7+/m/pkg/private/install.m at line
199, column 5
error:   /usr/local/share/octave/3.7.7+/m/pkg/pkg.m at line 394, column 9


Richard


--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply | Threaded
Open this post in threaded view
|

Re: Error installing package on classdef tip

Mike Miller
On Wed, Oct 23, 2013 at 10:44:32 +0100, Richard Crozier wrote:
> On 23/10/2013 10:32, Richard Crozier wrote:
> >
> >
> >I'm using hg id e2ed1c0ac403 (classdef) tip
> >
> >
>
> I manually added #include <string> to version.h

FYI this was fixed on default but probably not yet merged to classdef.

  http://hg.savannah.gnu.org/hgweb/octave/rev/3d862202c4f6

> now I get
>
> >> pkg install odepkg -forge
> In file included from /usr/include/hdf5.h:24:0,
>                  from
> /usr/local/include/octave-3.7.7+/octave/oct-hdf5.h:27,
>                  from /usr/local/include/octave-3.7.7+/octave/ov.h:42,
>                  from /usr/local/include/octave-3.7.7+/octave/oct-obj.h:34,
>                  from /usr/local/include/octave-3.7.7+/octave/ov-fcn.h:32,
>                  from
> /usr/local/include/octave-3.7.7+/octave/ov-builtin.h:28,
>                  from
> /usr/local/include/octave-3.7.7+/octave/defun-int.h:28,
>                  from
> /usr/local/include/octave-3.7.7+/octave/defun-dld.h:30,
>                  from /usr/local/include/octave-3.7.7+/octave/oct.h:36,
>                  from odepkg_octsolver_mebdfdae.cc:43:
> /usr/include/H5public.h:63:20: fatal error: mpi.h: No such file or directory

Yeah, this means you have one of the MPI-enabled versions of HDF5
installed. On Debian/Ubuntu these packages are libhdf5-mpich2-dev and
libhdf5-openmpi-dev. I recommend installing the non-MPI library,
libhdf5-dev (or libhdf5-serial-dev if you're on LTS or other old
release) and this problem will go away. If you can't or want to keep the
packages you have, you'll have to add the appropriate compiler flags to
build with the MPI headers.

I have used

  CPPFLAGS="-I/usr/include/mpi -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX"

with success when building Octave. If you build Octave this way, those
flags are saved in the defaults for mkoctfile passed to all subsequent
oct-file builds. Otherwise, for building a package as you are, I think
you can add that to your environment and mkoctfile will pick it up. It
should not need to be something you add to the makefile for odepkg.

HTH,

--
mike
Reply | Threaded
Open this post in threaded view
|

Re: Error installing package on classdef tip

Richard Crozier
On 23/10/2013 13:53, Mike Miller wrote:

> On Wed, Oct 23, 2013 at 10:44:32 +0100, Richard Crozier wrote:
>> On 23/10/2013 10:32, Richard Crozier wrote:
>>>
>>>
>>> I'm using hg id e2ed1c0ac403 (classdef) tip
>>>
>>>
>>
>> I manually added #include <string> to version.h
>
> FYI this was fixed on default but probably not yet merged to classdef.
>
>    http://hg.savannah.gnu.org/hgweb/octave/rev/3d862202c4f6
>
>> now I get
>>
>>>> pkg install odepkg -forge
>> In file included from /usr/include/hdf5.h:24:0,
>>                   from
>> /usr/local/include/octave-3.7.7+/octave/oct-hdf5.h:27,
>>                   from /usr/local/include/octave-3.7.7+/octave/ov.h:42,
>>                   from /usr/local/include/octave-3.7.7+/octave/oct-obj.h:34,
>>                   from /usr/local/include/octave-3.7.7+/octave/ov-fcn.h:32,
>>                   from
>> /usr/local/include/octave-3.7.7+/octave/ov-builtin.h:28,
>>                   from
>> /usr/local/include/octave-3.7.7+/octave/defun-int.h:28,
>>                   from
>> /usr/local/include/octave-3.7.7+/octave/defun-dld.h:30,
>>                   from /usr/local/include/octave-3.7.7+/octave/oct.h:36,
>>                   from odepkg_octsolver_mebdfdae.cc:43:
>> /usr/include/H5public.h:63:20: fatal error: mpi.h: No such file or directory
>
> Yeah, this means you have one of the MPI-enabled versions of HDF5
> installed. On Debian/Ubuntu these packages are libhdf5-mpich2-dev and
> libhdf5-openmpi-dev. I recommend installing the non-MPI library,
> libhdf5-dev (or libhdf5-serial-dev if you're on LTS or other old
> release) and this problem will go away. If you can't or want to keep the
> packages you have, you'll have to add the appropriate compiler flags to
> build with the MPI headers.
>
> I have used
>
>    CPPFLAGS="-I/usr/include/mpi -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX"
>
> with success when building Octave. If you build Octave this way, those
> flags are saved in the defaults for mkoctfile passed to all subsequent
> oct-file builds. Otherwise, for building a package as you are, I think
> you can add that to your environment and mkoctfile will pick it up. It
> should not need to be something you add to the makefile for odepkg.
>
> HTH,
>


Thanks for the help Mike, I think switching to the non MPI-enabled libs
will suit me best.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.