octave-maintainers
[Top][All Lists]
Advanced

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

Help with a gcc error while trying to fix JIT


From: Abhinav Tripathi
Subject: Help with a gcc error while trying to fix JIT
Date: Sun, 27 Nov 2016 12:38:48 -0800

Hi,
I have been trying, just to do something in spare time, to fix the JIT compilation with llvm 3.8.1 (which is available via 'sudo apt-get install llvm-dev' on ubuntu 16.04)....
.
I have fixed all the errors that came during the make. But now I get a lot of "note"s in blue colors which lead to failure of build. I am unable to understand the error and it would really be helpful if someone could point me in the right direction to understand/fix these...
.
I think this has something to do with OCTAVE_* macros being called on llvm data types. I have attached the patch with the changes that I did to remove other errors. In case someone wants to try, you can just do "sudo apt-get install llvm-dev" and then apply my patch. After this use configure with "--enable-jit" and make....
.
I get a lot of (more than 1000 lines of log) chunks similar to the ones I am pasting here:
-----------------------------------------------------------
../liboctave/util/oct-inttypes.h:1311:1: note: in expansion of macro ‘OCTAVE_INT_FLOAT_BIN_OP’
 OCTAVE_INT_FLOAT_BIN_OP (*)
 ^
../liboctave/util/oct-inttypes.h:1298:3: note:   template argument deduction/substitution failed:
   operator OP (const octave_int<T>& x, float y) \
   ^
../liboctave/util/oct-inttypes.h:1311:1: note: in expansion of macro ‘OCTAVE_INT_FLOAT_BIN_OP’
 OCTAVE_INT_FLOAT_BIN_OP (*)
 ^
../libinterp/corefcn/pt-jit.cc:2080:68: note:   ‘const llvm::DataLayout’ is not derived from ‘const octave_int<T>’
   pass_manager->add (new llvm::DataLayout (*engine->getDataLayout ()));
                                                                    ^
In file included from ../liboctave/operators/mx-inlines.cc:41:0,
                 from ../liboctave/array/MArray.h:30,
                 from ../liboctave/array/dNDArray.h:28,
                 from ../liboctave/array/dMatrix.h:28,
                 from ../liboctave/array/Range.h:30,
                 from ../libinterp/octave-value/ov.h:35,
                 from ../libinterp/corefcn/debug.h:30,
                 from ../libinterp/corefcn/pt-jit.cc:32:
../liboctave/util/oct-inttypes.h:1179:3: note: candidate: template<class T> octave_int<T> operator*(const double&, const octave_int<T>&)
   operator OP (const double& x, const octave_int<T>& y)         \
   ^
../liboctave/util/oct-inttypes.h:1215:3: note: in expansion of macro ‘OCTAVE_INT_DOUBLE_BIN_OP0’
   OCTAVE_INT_DOUBLE_BIN_OP0(OP)                                         \
   ^
../liboctave/util/oct-inttypes.h:1262:1: note: in expansion of macro ‘OCTAVE_INT_DOUBLE_BIN_OP’
 OCTAVE_INT_DOUBLE_BIN_OP (*, mul)
 ^
../liboctave/util/oct-inttypes.h:1179:3: note:   template argument deduction/substitution failed:
   operator OP (const double& x, const octave_int<T>& y)         \
   ^
../liboctave/util/oct-inttypes.h:1215:3: note: in expansion of macro ‘OCTAVE_INT_DOUBLE_BIN_OP0’
   OCTAVE_INT_DOUBLE_BIN_OP0(OP)                                         \
   ^
../liboctave/util/oct-inttypes.h:1262:1: note: in expansion of macro ‘OCTAVE_INT_DOUBLE_BIN_OP’
 OCTAVE_INT_DOUBLE_BIN_OP (*, mul)
 ^
../libinterp/corefcn/pt-jit.cc:2080:67: note:   cannot convert ‘((tree_jit*)this)->tree_jit::engine->llvm::ExecutionEngine::getDataLayout()’ (type ‘const llvm::DataLayout’) to type ‘const double&’
   pass_manager->add (new llvm::DataLayout (*engine->getDataLayout ()));
                                                                   ^
In file included from ../liboctave/operators/mx-inlines.cc:41:0,
                 from ../liboctave/array/MArray.h:30,
                 from ../liboctave/array/dNDArray.h:28,
                 from ../liboctave/array/dMatrix.h:28,
                 from ../liboctave/array/Range.h:30,
                 from ../libinterp/octave-value/ov.h:35,
                 from ../libinterp/corefcn/debug.h:30,
                 from ../libinterp/corefcn/pt-jit.cc:32:
../liboctave/util/oct-inttypes.h:1173:3: note: candidate: template<class T> octave_int<T> operator*(const octave_int<T>&, const double&)
   operator OP (const octave_int<T>& x, const double& y)         \
   ^
../liboctave/util/oct-inttypes.h:1215:3: note: in expansion of macro ‘OCTAVE_INT_DOUBLE_BIN_OP0’
   OCTAVE_INT_DOUBLE_BIN_OP0(OP)                                         \
   ^
../liboctave/util/oct-inttypes.h:1262:1: note: in expansion of macro ‘OCTAVE_INT_DOUBLE_BIN_OP’
 OCTAVE_INT_DOUBLE_BIN_OP (*, mul)
 ^
../liboctave/util/oct-inttypes.h:1173:3: note:   template argument deduction/substitution failed:
   operator OP (const octave_int<T>& x, const double& y)         \
   ^
../liboctave/util/oct-inttypes.h:1215:3: note: in expansion of macro ‘OCTAVE_INT_DOUBLE_BIN_OP0’
   OCTAVE_INT_DOUBLE_BIN_OP0(OP)                                         \
   ^
../liboctave/util/oct-inttypes.h:1262:1: note: in expansion of macro ‘OCTAVE_INT_DOUBLE_BIN_OP’
 OCTAVE_INT_DOUBLE_BIN_OP (*, mul)
 ^
../libinterp/corefcn/pt-jit.cc:2080:68: note:   ‘const llvm::DataLayout’ is not derived from ‘const octave_int<T>’
   pass_manager->add (new llvm::DataLayout (*engine->getDataLayout ()));
-----------------------------------------------------------

.
Regards,
Abhinav

Attachment: jit_start.diff
Description: Text document


reply via email to

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