bugGNU Octave - Bugs: bug #63916, [octave forge] (ocl) installation...

 
 

bug #63916: [octave forge] (ocl) installation failure

Submitter:  bernard <kmod>
Submitted:  Sun 12 Mar 2023 08:35:12 AM UTC
   
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * 8.1.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 15 Mar 2023 08:53:47 PM UTC, comment #5: 

Thanks for the example. I wasn't aware about this "hiding" logic.

Anyway, I misread the undefined symbol. It's not the symbol from the `using`-declaration. It's the one that is overloaded in that class.

The strange thing is that this symbol is exported by liboctinterp:

$ nm -C libinterp/.libs/liboctinterp.so | grep "octave_base_matrix<NDArray>::subsref"
00000000008509f0 t octave_base_matrix<NDArray>::subsref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<octave_value_list, std::allocator<octave_value_list> > const&)
0000000000447770 t octave_base_matrix<NDArray>::subsref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<octave_value_list, std::allocator<octave_value_list> > const&, int)


But still, I'm seeing the same error like the OP with Octave 8.1.1 (hg id 0018557a53b2) on Ubuntu...

Fwiw, the ocl package compiles correctly with Octave 8.1.0 on Windows.

Markus Mützel <mmuetzel>
Group administrator
Tue 14 Mar 2023 10:34:02 PM UTC, comment #4: 

@Markus: The comment is about the problem described in the attached example program.



(file #54484)

John W. Eaton <jwe>
Group administrator
Tue 14 Mar 2023 01:15:35 PM UTC, comment #3: 

I tried with clang-compiled octave (not using "--disable-lib-visibility-flags"). Got lots of errors (see attached).

Dmitri.
--


(file #54483)

Dmitri A. Sergatskov <dasergatskov>
Tue 14 Mar 2023 08:26:48 AM UTC, comment #2: 

Fwiw, the missing symbol demangles to:

octave_base_matrix<NDArray>::subsref(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::list<octave_value_list, std::allocator<octave_value_list> > const&)


IIUC, that function is declared by a "using" declaration here:
https://hg.savannah.gnu.org/hgweb/octave/file/48eaf9df5a5b/libinterp/octave-value/ov-base-mat.h#l87

  // We don't need to override all three forms of subsref.  The using
  // declaration will avoid warnings about partially-overloaded virtual
  // functions.
  using octave_base_value::subsref;

  OCTINTERP_API octave_value
  subsref (const std::string& type, const std::list<octave_value_list>& idx);

  octave_value_list subsref (const std::string& type,
                             const std::list<octave_value_list>& idx, int)
  { return subsref (type, idx); }


I'm not entirely sure I understand the comment correctly. Why do we need that using-declaration?

Do we need to set some visibility flags to export it?
Or does the `ocl` package need to do something different so that the compiler knows to use the function from the `octave_base_value` class instead?

Markus Mützel <mmuetzel>
Group administrator
Mon 13 Mar 2023 06:09:19 PM UTC, comment #1: 

Recompile octave with "--disable-lib-visibility-flags" passed to configure. Ignore the "unusable help text found in file 'ocl_bin'" worning. That seems to work for me:


pkg test ocl
Testing functions in package 'ocl':

Integrated test scripts:

  ../dima/.local/share/octave/api-v58/packages/ocl-1.2.1/gather.m  pass    1/1
  ..ima/.local/share/octave/api-v58/packages/ocl-1.2.1/gpuArray.m  pass    1/1
  ..ima/.local/share/octave/api-v58/packages/ocl-1.2.1/oclArray.m  pass   25/25
  ..ma/.local/share/octave/api-v58/packages/ocl-1.2.1/ocl_tests.m Testing ocl_constant function...
Testing ocl_lib function...
Testing ocl_context function...
Testing ocl matrix of data type ocl_double...
13 warnings generated.
17 warnings generated.
18 warnings generated.
22 warnings generated.
13 warnings generated.
13 warnings generated.
Testing ocl matrix of data type ocl_single...
13 warnings generated.
17 warnings generated.
18 warnings generated.
22 warnings generated.
Testing ocl matrix of data type ocl_int8...
13 warnings generated.
17 warnings generated.
Testing ocl matrix of data type ocl_int16...
13 warnings generated.
17 warnings generated.
Testing ocl matrix of data type ocl_int32...
13 warnings generated.
17 warnings generated.
Testing ocl matrix of data type ocl_int64...
Testing ocl matrix of data type ocl_uint8...
13 warnings generated.
17 warnings generated.
Testing ocl matrix of data type ocl_uint16...
13 warnings generated.
17 warnings generated.
Testing ocl matrix of data type ocl_uint32...
13 warnings generated.
17 warnings generated.
Testing ocl matrix of data type ocl_uint64...
13 warnings generated.
17 warnings generated.
Testing ocl program data type...
Testing DONE
 pass    1/1
  ..local/share/octave/api-v58/packages/ocl-1.2.1/ocl_to_octave.m  pass   12/12

Fixed test scripts:


Summary:

  PASS                               40
  FAIL                                0

See the file /home/dima/scratch/fntests.log for additional details.

209 (of 214) .m files have no tests.

Please help improve Octave by contributing tests for these files
(see the list in the file /home/dima/scratch/fntests.log).


I am not sure what is the actual problem. ocl uses non-public API?

Also see https://savannah.gnu.org/bugs/?61855

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 12 Mar 2023 08:35:12 AM UTC, original submission:  

Installing the package ocl on octave 8.1.0 failed with these message



>> pkg install "https://downloads.sourceforge.net/project/octave/Octave%20Forge%20Packages/Individual%20Package%20Releases/ocl-1.2.1.tar.gz"
error: /home/bernard/.local/share/octave/api-v58/packages/ocl-1.2.1/x86_64-pc-linux-gnu-api-v58/ocl_bin.oct: failed to load
Incompatible version or missing dependency?
/home/bernard/.local/share/octave/api-v58/packages/ocl-1.2.1/x86_64-pc-linux-gnu-api-v58/ocl_bin.oct: undefined symbol: _ZN18octave_base_matrixI7NDArrayE7subsrefERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS2_4listI17octave_value_listSaISB_EEE
error: called from
    /home/bernard/.local/share/octave/api-v58/packages/ocl-1.2.1/x86_64-pc-linux-gnu-api-v58/PKG_ADD at line 50 column 56
    doc_cache_create>gen_doc_cache_in_dir at line 146 column 5
    doc_cache_create at line 62 column 12
    install>generate_lookfor_cache at line 840 column 5
    install at line 241 column 7
    pkg at line 619 column 9



OS is Ubuntu 22.04, gcc 9.5.0, octave 8.1.0

bernard <kmod>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #54484:  virt-overload.cc added by jwe (1KiB - text/x-c++src)
file #54483:  ocl_errors.txt.gz added by dasergatskov (7KiB - application/gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by kmod (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-25 jwe Summaryocl doesn't install [octave forge] (ocl) installation failure
    2023-03-14 jwe Attached File- Added virt-overload.cc, #54484
    2023-03-14 dasergatskov Attached File- Added ocl_errors.txt.gz, #54483

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code