carlodefalco / octave-mpi

Octave bindings for basic Message Passing Interface (MPI) functions for parallel computing.
GNU General Public License v3.0
4 stars 1 forks source link

Fails to build against Octave 7 #6

Open svillemot opened 2 years ago

svillemot commented 2 years ago

The title says it all.

I attach a Debian build log. octave-mpi_3.1.0-1.gz

The relevant part seems to be:

MPI_Send.cc: In function ‘octave_function* GMPI_Send(const octave::dynamic_library&, bool)’:
/usr/include/octave-7.1.0/octave/../octave/defun-int.h:199:19: error: call of overloaded ‘check_version(const char [8], const char [9])’ is ambiguous
  199 |     check_version (OCTAVE_API_VERSION, name);                           \
      |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/octave-7.1.0/octave/../octave/defun-int.h:190:3: note: in expansion of macro ‘DEFINE_FUNX_INSTALLER_FUN’
  190 |   DEFINE_FUNX_INSTALLER_FUN(#name, F ## name, G ## name, doc)
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/octave-7.1.0/octave/../octave/defun-dld.h:101:3: note: in expansion of macro ‘DEFINE_FUN_INSTALLER_FUN’
  101 |   DEFINE_FUN_INSTALLER_FUN (name, doc)                                  \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~
MPI_Send.cc:35:1: note: in expansion of macro ‘DEFMETHOD_DLD’
   35 | DEFMETHOD_DLD (MPI_Send, interp, args, nargout,
      | ^~~~~~~~~~~~~
/usr/include/octave-7.1.0/octave/../octave/defun-int.h:83:1: note: candidate: ‘void check_version(const string&, const string&)’
   83 | check_version (const std::string& version, const std::string& fcn)
      | ^~~~~~~~~~~~~
/usr/include/octave-7.1.0/octave/../octave/defun-int.h:47:27: note: candidate: ‘void octave::check_version(const string&, const string&)’
   47 | extern OCTINTERP_API void check_version (const std::string& version,
      |                           ^~~~~~~~~~~~~
MPI_Send.cc: In function ‘octave_value_list FMPI_Send(octave::interpreter&, const octave_value_list&, int)’:
MPI_Send.cc:56:17: error: call of overloaded ‘print_usage()’ is ambiguous
   56 |     print_usage ();
      |     ~~~~~~~~~~~~^~
In file included from /usr/include/octave-7.1.0/octave/../octave/defun-dld.h:35,
                 from /usr/include/octave-7.1.0/octave/../octave/oct.h:35,
                 from octave_mpi_communicator.h:18,
                 from MPI_Send.cc:19:
/usr/include/octave-7.1.0/octave/../octave/defun-int.h:72:13: note: candidate: ‘void print_usage()’
   72 | inline void print_usage (void)
      |             ^~~~~~~~~~~
/usr/include/octave-7.1.0/octave/../octave/defun-int.h:43:27: note: candidate: ‘void octave::print_usage()’
   43 | extern OCTINTERP_API void print_usage (void);
      |                           ^~~~~~~~~~~

Note that the problem does not come from error_state, contrary to what is suggested in #5.

carlodefalco commented 2 years ago

Thanks for reporting. This seems like an issue caused by the using namespace octave line before DEFMETHOD_DLD ... c.