Opened 5 years ago

Closed 5 years ago

#59949 closed defect (fixed)

octave +jit build failure

Reported by: TheLastLovemark Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: Cc:
Port: octave

Description (last modified by kencu (Ken))

build is forced against llvm-7.0, but this does not appear to be a compatible llvm version for octave

Attachments (3)

octave+variants_main.log (676.3 KB) - added by TheLastLovemark 5 years ago.
NEW-octave_main.log (761.3 KB) - added by TheLastLovemark 5 years ago.
octave+variants_llvm-7.1_main.log (934.4 KB) - added by TheLastLovemark 5 years ago.

Change History (17)

Changed 5 years ago by TheLastLovemark

Attachment: octave+variants_main.log added

comment:1 Changed 5 years ago by TheLastLovemark

I noticed none of this was in the log file:

libinterp/parse-tree/jit-typeinfo.cc:142:3: warning: 'octave_jit_grab_matrix' has C-linkage specified, but returns user-defined type 'octave::jit_matrix' (aka 'jit_array<NDArray, double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_grab_matrix (jit_matrix *m)
  ^
libinterp/parse-tree/jit-typeinfo.cc:159:3: warning: 'octave_jit_cast_matrix_any' has C-linkage specified, but returns user-defined type 'octave::jit_matrix' (aka 'jit_array<NDArray, double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_cast_matrix_any (octave_base_value *obv)
  ^
libinterp/parse-tree/jit-typeinfo.cc:177:3: warning: 'octave_jit_cast_range_any' has C-linkage specified, but returns user-defined type 'octave::jit_range' which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_cast_range_any (octave_base_value *obv)
  ^
libinterp/parse-tree/jit-typeinfo.cc:200:3: warning: 'octave_jit_cast_complex_any' has C-linkage specified, but returns user-defined type 'Complex' (aka 'complex<double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_cast_complex_any (octave_base_value *obv)
  ^
libinterp/parse-tree/jit-typeinfo.cc:239:3: warning: 'octave_jit_paren_subsasgn_impl' has C-linkage specified, but returns user-defined type 'octave::jit_matrix' (aka 'jit_array<NDArray, double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_paren_subsasgn_impl (jit_matrix *mat, octave_idx_type index,
  ^
libinterp/parse-tree/jit-typeinfo.cc:276:3: warning: 'octave_jit_paren_scalar_subsasgn' has C-linkage specified, but returns user-defined type 'octave::jit_matrix' (aka 'jit_array<NDArray, double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_paren_scalar_subsasgn (jit_matrix *mat, double *indices,
  ^
libinterp/parse-tree/jit-typeinfo.cc:294:3: warning: 'octave_jit_paren_subsasgn_matrix_range' has C-linkage specified, but returns user-defined type 'octave::jit_matrix' (aka 'jit_array<NDArray, double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_paren_subsasgn_matrix_range (jit_matrix *mat, jit_range *index,
  ^
libinterp/parse-tree/jit-typeinfo.cc:378:3: warning: 'octave_jit_complex_mul' has C-linkage specified, but returns user-defined type 'Complex' (aka 'complex<double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_complex_mul (Complex lhs, Complex rhs)
  ^
libinterp/parse-tree/jit-typeinfo.cc:387:3: warning: 'octave_jit_complex_div' has C-linkage specified, but returns user-defined type 'Complex' (aka 'complex<double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_complex_div (Complex lhs, Complex rhs)
  ^
libinterp/parse-tree/jit-typeinfo.cc:406:3: warning: 'octave_jit_pow_scalar_scalar' has C-linkage specified, but returns user-defined type 'Complex' (aka 'complex<double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_pow_scalar_scalar (double lhs, double rhs)
  ^
libinterp/parse-tree/jit-typeinfo.cc:415:3: warning: 'octave_jit_pow_complex_complex' has C-linkage specified, but returns user-defined type 'Complex' (aka 'complex<double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_pow_complex_complex (Complex lhs, Complex rhs)
  ^
libinterp/parse-tree/jit-typeinfo.cc:423:3: warning: 'octave_jit_pow_complex_scalar' has C-linkage specified, but returns user-defined type 'Complex' (aka 'complex<double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_pow_complex_scalar (Complex lhs, double rhs)
  ^
libinterp/parse-tree/jit-typeinfo.cc:431:3: warning: 'octave_jit_pow_scalar_complex' has C-linkage specified, but returns user-defined type 'Complex' (aka 'complex<double>') which is incompatible with C [-Wreturn-type-c-linkage]
  octave_jit_pow_scalar_complex (double lhs, Complex rhs)
  ^
libinterp/parse-tree/jit-typeinfo.cc:1675:26: error: no matching function for call to 'get'
      llvm::Value *rng = llvm::ConstantStruct::get (m_range_t, dzero, dzero,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/libexec/llvm-7.0/include/llvm/IR/Constants.h:458:3: note: candidate template ignored: could not match 'Csts *' against 'long'
  get(StructType *T, Csts *... Vs) {
  ^
/opt/local/libexec/llvm-7.0/include/llvm/IR/Constants.h:453:20: note: candidate function not viable: requires 2 arguments, but 6 were provided
  static Constant *get(StructType *T, ArrayRef<Constant*> V);
                   ^
13 warnings and 1 error generated.
make[2]: *** [libinterp/parse-tree/libparse_tree_la-jit-typeinfo.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_octave/octave/work/octave-5.1.0'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_octave/octave/work/octave-5.1.0'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_octave/octave/work/octave-5.1.0'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_octave/octave/work/octave-5.1.0" && /usr/bin/make -j4 -w all 
Exit code: 2
Error: Failed to build octave: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_octave/octave/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port octave failed

The problem may be with one of the variants. From the look of this it might be jit

comment:2 Changed 5 years ago by mf2k (Frank Schima)

Cc: MarcusCalhoun-Lopez removed
Owner: set to MarcusCalhoun-Lopez
Status: newassigned

comment:3 Changed 5 years ago by TheLastLovemark

Tried again after making sure some dependencies were in place first. Still failed, but can now provide a more meaningful log. Attached

Changed 5 years ago by TheLastLovemark

Attachment: NEW-octave_main.log added

comment:4 Changed 5 years ago by kencu (Ken)

our octave port is currently hard-coded to llvm-7.0.

I just updated llvm-7.0 yesterday, so perhaps octave +jit will build after that update.

or perhaps we have to use a newer llvm now.

comment:5 in reply to:  4 Changed 5 years ago by TheLastLovemark

Replying to kencu:

our octave port is currently hard-coded to llvm-7.0.

I just updated llvm-7.0 yesterday, so perhaps octave +jit will build after that update.

or perhaps we have to use a newer llvm now.

The second log file was generated 3 hours ago. Should I do a selfupdate (did that yesterday, but that may have been before the llvm-7.0 update) to pull the latest version?

Last edited 5 years ago by TheLastLovemark (previous) (diff)

comment:6 Changed 5 years ago by kencu (Ken)

do you have llvm-7.1.0 installed, though?

comment:7 Changed 5 years ago by TheLastLovemark

Not yet. I'm currently on llvm-7.0 @7.0.1_2+assertions+debug+ocaml+polly.

I will do it tonight as llvm seems to take forever to compile even without the variants.

I'll be sure to update you when it is finished.

comment:8 Changed 5 years ago by TheLastLovemark

upgrade started ~23:25 EST Tuesday, 14 January 2020

comment:9 Changed 5 years ago by TheLastLovemark

llvm-7.1.0 installed without a hitch.

trying to build octave now

comment:10 Changed 5 years ago by TheLastLovemark

Failed again.

New log is attached.

Changed 5 years ago by TheLastLovemark

comment:11 Changed 5 years ago by kencu (Ken)

if you really need the jit, then try changing the requirement to llvm 6.0. The failing piece of code changed in llvm around then. Or open up an issue with octave and see if they are interested in updating their jit code at present for newer llvm versions.

Otherwise forget the jit for now, and move on...

comment:12 Changed 5 years ago by TheLastLovemark

successfully built and installed without the +jit variant

comment:13 Changed 5 years ago by kencu (Ken)

Description: modified (diff)
Summary: port -v install octave +openblas +app +fltk +gfortran +graphicsmagick +jit +qt5 +sound +sundials build failureoctave +jit build failure

comment:14 Changed 5 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

In 29805133d3a419025e3628b0616016b967408f25/macports-ports (master):

octave: remove jit variant

Finding a compatible LLVM version has been difficult.
No revbump since the jit variant is broken.

See https://wiki.octave.org/JIT
Fixes #59949

Note: See TracTickets for help on using tickets.