Problems during compile due to conversion between octave_int<long int> and long long int

Bug #1023647 reported by Kent-Andre Mardal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pytave
New
Undecided
Unassigned

Bug Description

Hi, pytave want compile on my computer which runs ubuntu 11.10 due to a conversion error.
Am I the only one that experience this problem? Do you have a fix?

building 'pytave/_pytave' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_CONFIG_H=1 -I/usr/include/octave-3.2.4 -I/usr/lib/pymodules/python2.7/numpy/core/include -I/home/kent-and/local/src/pytave -I. -I/usr/include/python2.7 -c ./octave_to_python.cc -o build/temp.linux-x86_64-2.7/./octave_to_python.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
./octave_to_python.cc: In function ‘void pytave::copy_octarray_to_pyarrobj(PyArrayObject*, const OctaveBase&, unsigned int, unsigned int, int, unsigned int) [with PythonPrimitive = long long int, OctaveBase = intNDArray<octave_int<long int> >, PyArrayObject = PyArrayObject]’:
./octave_to_python.cc:131:10: instantiated from ‘PyArrayObject* pytave::create_array(const OctaveBase&, int) [with PythonPrimitive = long long int, OctaveBase = intNDArray<octave_int<long int> >, PyArrayObject = PyArrayObject]’
./octave_to_python.cc:143:76: instantiated from ‘PyArrayObject* pytave::create_array(const OctaveBase&, int, boost::true_type) [with PythonPrimitive = long long int, OctaveBase = intNDArray<octave_int<long int> >, PyArrayObject = PyArrayObject, boost::true_type = boost::integral_constant<bool, true>]’
./octave_to_python.cc:185:77: instantiated from ‘PyArrayObject* pytave::create_sint_array(CLASS) [with CLASS = intNDArray<octave_int<long int> >, long unsigned int bytes = 8ul, PyArrayObject = PyArrayObject]’
./octave_to_python.cc:230:39: instantiated from here
./octave_to_python.cc:67:13: error: conversion from ‘octave_int<long int>’ to ‘long long int’ is ambiguous
./octave_to_python.cc:67:13: note: candidates are:
/usr/include/octave-3.2.4/octave/oct-inttypes.h:816:3: note: octave_int<T>::operator float() const [with T = long int]
/usr/include/octave-3.2.4/octave/oct-inttypes.h:814:3: note: octave_int<T>::operator double() const [with T = long int]
/usr/include/octave-3.2.4/octave/oct-inttypes.h:810:3: note: octave_int<T>::operator T() const [with T = long int]

Revision history for this message
Bob Dougherty (bobd) wrote :

I got the same error building the latest version (r52) on Lubuntu 12.04 (64 bit) against the octave package (version 3.2.4). However, r51 compiles just fine on my system, so I'm using that for now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.