bugGNU Octave - Bugs: bug #65461, Can't install MVApack package

 
 

bug #65461: Can't install MVApack package

Submitter:  None
Submitted:  Thu 14 Mar 2024 08:37:23 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Installation Failure
Status:  Need Info Assigned to:  None
Originator Name:  Julien G Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 8.4.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 25 Mar 2024 04:23:24 PM UTC, comment #8: 

someone else might be able to identify the error from what you posted, but without being able to attempt the installation ourselves we might just going to be guessing.  They've put the distribution and source behind an 'academics only' restricted access portal, which is fine, but unless one of the developers has an academic credential and wants to request access we can't get there.  Plus, it appears that we'd have to troubleshoot against code that is >=3 major releases old, which is less likely to happen.

The correct approach is to:
1) let the package maintainers know that their code does not work under recent versions of octave, and perhaps they could reach out to the Octave dev team if they don't know how to fix their code themselves.

2) Or just ask them to come contribute to this bug report.

3) Or they could tell you under exactly which octave version and on what operating systems they have confirmed their package works, and you use that.

4) Or they could post their package source in a way that allows octave developers to test compiling/installing.

5) OR, as the website indicates that the full code is being distributed under GPLv3, you should be fully able to fork/host/redistribute the source code for testing/examination.  They have a lot of restrictive language for getting access to the code, though, and I don't fully understand how some of the limitations they mention there is GPL compliant with GPLv3 section 7 regarding 'Additional Terms' or 10 regarding 'further restrictions', but again IANAL.

Nicholas Jankowski <nrjank>
Group Member
Mon 25 Mar 2024 03:47:31 PM UTC, comment #7: 

This is the full error :

lib/input.cpp: In function 'ScanOPs scans_from_file(const Path&, Int32)':
lib/input.cpp:109:21: error: invalid initialization of reference of type 'const String&' {aka 'const std::__cxx11::ba
sic_string<char>&'} from expression of type 'const Path' {aka 'const std::filesystem::__cxx11::path'}
  109 |     if(!file_exists(path)) {
      |                     ^~~~
In file included from include/datastructures.h:8,
                 from lib/input.cpp:7:
include/util.h:39:14: note: in passing argument 1 of 'bool file_exists(const String&)'
   39 | file_exists( String const& );
      |              ^~~~~~~~~~~~~
lib/input.cpp:113:49: error: invalid initialization of reference of type 'const String&' {aka 'const std::__cxx11::ba
sic_string<char>&'} from expression of type 'const Path' {aka 'const std::filesystem::__cxx11::path'}
  113 |     const String ext = lowercase(file_extension(path));
      |                                                 ^~~~
In file included from include/datastructures.h:8,
                 from lib/input.cpp:7:
include/util.h:45:16: note: in passing argument 1 of 'String file_extension(const String&)'
   45 | file_extension(String const &);
      |                ^~~~~~~~~~~~~~
lib/input.cpp:124:63: error: invalid initialization of reference of type 'const String&' {aka 'const std::__cxx11::ba
sic_string<char>&'} from expression of type 'const Path' {aka 'const std::filesystem::__cxx11::path'}
  124 |         std::cout<<"Unknown file extension: "<<file_extension(path)<<" for file " <<path<<"\n";
      |                                                               ^~~~
In file included from include/datastructures.h:8,
                 from lib/input.cpp:7:
include/util.h:45:16: note: in passing argument 1 of 'String file_extension(const String&)'
   45 | file_extension(String const &);
      |                ^~~~~~~~~~~~~~
In file included from lib/octave-connect.cpp:4:
include/octave-connect.h:11:10: fatal error: octave/oct.h: No such file or directory
   11 | #include <octave/oct.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
lib/peak.cc:3:10: fatal error: octave/oct.h: No such file or directory
    3 | #include <octave/oct.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: * [Makefile:63: lcms_lib.a] Error 1
make: Entering directory '/tmp/oct-mBiogM/mvapack-Micah/src'
g++ -std=c++17 -Iinclude/ -Iexternal/   -DPSAPI_VERSION=1 -IC:\Users\JUGUIB~1\Desktop\OCTAVE~1.0-W\OCTAVE~1.0-W\mingw
64\/include  -IC:\Users\JUGUIB~1\Desktop\OCTAVE~1.0-W\OCTAVE~1.0-W\mingw64\include\octave-6.3.0\octave\.. -IC:\Users\
JUGUIB~1\Desktop\OCTAVE~1.0-W\OCTAVE~1.0-W\mingw64\include\octave-6.3.0\octave -IC:\Users\JUGUIB~1\Desktop\OCTAVE~1.0
-W\OCTAVE~1.0-W\mingw64\include   -fopenmp -g -O2     -Iexternal/   -DPSAPI_VERSION=1 -IC:\Users\JUGUIB~1\Desktop\OCT
AVE~1.0-W\OCTAVE~1.0-W\mingw64\/include  -IC:\Users\JUGUIB~1\Desktop\OCTAVE~1.0-W\OCTAVE~1.0-W\mingw64\include\octave
-6.3.0\octave\.. -IC:\Users\JUGUIB~1\Desktop\OCTAVE~1.0-W\OCTAVE~1.0-W\mingw64\include\octave-6.3.0\octave -IC:\Users
\JUGUIB~1\Desktop\OCTAVE~1.0-W\OCTAVE~1.0-W\mingw64\include   -fopenmp -g -O2     -c lib/datastructures.cpp lib/filte
r.cpp lib/input.cpp lib/octave-connect.cpp lib/peak.cc lib/scan.cpp lib/smooth.cpp lib/types.cpp lib/util.cpp lib/zli
b.cpp lib/types.cpp external/base64/base64.cpp external/tinyxml/tinyxml2.cpp
make: Leaving directory '/tmp/oct-mBiogM/mvapack-Micah/src'

error: pkg: error running 'make' for the mvapack package.
error: called from
    configure_make at line 110 column 9
    install at line 196 column 7
    pkg at line 568 column 9


And this is the file, the error stems from :

//
// Created by cjurich on 1/25/21.
//
#ifndef MVAPACK_LCMS_INPUT_H
#define MVAPACK_LCMS_INPUT_H

#include <regex>
#include <memory>
#include <fstream>
#include <iostream>

#include <util.h>
#include <types.h>
#include <datastructures.h>

#include <base64/base64.h>
#include <tinyxml/tinyxml2.h>

ScanOPs
scans_from_file(Path const &, Int32);

ScanOP
get_scan(Path const &, const Int32, Int16);

Peaks
peaks_from_csv(Path const &);

void
clusters_to_csv(Path const&, Clusters const&);

Clusters
clusters_from_csv(Path const&);

void
mzsamples_to_csv(Path const&, MZSamples const & );

std::pair<Strings,Strings>
load_mappings(Path const &);


class Reader {
    public:
        enum FILETYPE {
            PWIZ,
            MZXML,
            MZML
        };

    private:
        FILETYPE curr_type_;
        std::ifstream fh_;
        String filename_;
        Int32 scans_left_;
   
    public:
        Reader() {}
   
    public:
        ScanOP
        get_scan( Int32 level=1 ) ;
  
    public:
        void
        set_input( String const & );

    public:
        bool
        scans_remaining() ;
   
    public:
        bool
        eof() const {
            return fh_.eof();
        }

    private:
        String
        get_line_();

    private:
        ScanOP
        _get_scan_pwiz( Int32 );

    private:
        ScanOP
        _get_scan_mzxml( Int32 );
  
    private:
        ScanOP
        _get_scan_mzml( Int32 );
   
    private:
        void
        _pwiz_init();
   
    private:
        void
        _mzxml_init();

    private:
        void
        _mzml_init();

};


void
save_slices( MZSamples const&, String const& );

using ReaderOP = std::shared_ptr< Reader >;


#endif MVAPACK_LCMS_INPUT_H

Help!

Anonymous
Mon 25 Mar 2024 02:15:52 PM UTC, comment #6: 

without access to the package source there's little opportunity for us to help troubleshoot the issue.

Nicholas Jankowski <nrjank>
Group Member
Mon 25 Mar 2024 10:22:35 AM UTC, comment #5: 

Hi, I'm getting the same kind of error using Octave 6.3.0 while trying to use octave.

How can you work your way around this error ? (fatal error: octave/oct.h: No such file or directory)

Anonymous
Fri 15 Mar 2024 09:14:08 AM UTC, comment #4: 

Thank you for your answers.

The problem really came from the version of Octave. However, I, now, get a fatal error : octave/oct.h: No such file or directory.

Throughout my research, I didn't get why and how could this error appear knowing that i'm running my command on Octave directly ?
I have a whole of bunch of error appearing but I feel like it all comes down from this fatal error (but i may be wrong)

All the errors appearing :

lib/input.cpp: In function 'ScanOPs scans_from_file(const Path&, Int32)':
lib/input.cpp:109:21: error: invalid initialization of reference of type 'const String&' {aka 'const std::__cxx11::basic
_string<char>&'} from expression of type 'const Path' {aka 'const std::filesystem::__cxx11::path'}
  109 |     if(!file_exists(path)) {
      |                     ^~~~
In file included from include/datastructures.h:8,
                 from lib/input.cpp:7:
include/util.h:39:14: note: in passing argument 1 of 'bool file_exists(const String&)'
   39 | file_exists( String const& );
      |              ^~~~~~~~~~~~~
lib/input.cpp:113:49: error: invalid initialization of reference of type 'const String&' {aka 'const std::__cxx11::basic
_string<char>&'} from expression of type 'const Path' {aka 'const std::filesystem::__cxx11::path'}
  113 |     const String ext = lowercase(file_extension(path));
      |                                                 ^~~~
In file included from include/datastructures.h:8,
                 from lib/input.cpp:7:
include/util.h:45:16: note: in passing argument 1 of 'String file_extension(const String&)'
   45 | file_extension(String const &);
      |                ^~~~~~~~~~~~~~
lib/input.cpp:124:63: error: invalid initialization of reference of type 'const String&' {aka 'const std::__cxx11::basic
_string<char>&'} from expression of type 'const Path' {aka 'const std::filesystem::__cxx11::path'}
  124 |         std::cout<<"Unknown file extension: "<<file_extension(path)<<" for file " <<path<<"\n";
      |                                                               ^~~~
In file included from include/datastructures.h:8,
                 from lib/input.cpp:7:
include/util.h:45:16: note: in passing argument 1 of 'String file_extension(const String&)'
   45 | file_extension(String const &);
      |                ^~~~~~~~~~~~~~
In file included from lib/octave-connect.cpp:4:
include/octave-connect.h:11:10: fatal error: octave/oct.h: No such file or directory
   11 | #include <octave/oct.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
lib/peak.cc:3:10: fatal error: octave/oct.h: No such file or directory
    3 | #include <octave/oct.h>
      |          ^~~~~~~~~~~~~~

Anonymous
Fri 15 Mar 2024 08:03:46 AM UTC, comment #3: 

`pkg` expects that packages eventually define a `pre_install.m` function that accepts one arguments see

https://docs.octave.org/v4.4.0/Creating-Packages.html#Creating-Packages

Before Octave 7 it was possible to define `function pre_install ()` without any argument, and the the argument passed by pkg would be silently ignored. Since Octave 7 one has to explicitly ignore the argument, e.g. `function pre_install (~)` or an error will occur.

Pantxo Diribarne <pantxo>
Group Member
Thu 14 Mar 2024 03:03:52 PM UTC, comment #2: 

in the meantime, from the error message your reported, I suspect the issue is on the package side.

"function called with too many inputs" is an error message introduced after version 7.1 with this change: https://hg.savannah.gnu.org/hgweb/octave/rev/b0b80efecea1

See https://octave.org/NEWS-7.html
"Calling a user-defined function with too many inputs or outputs is now an error. The interpreter makes this check automatically."

It means that you called a function with more inputs than that function was designed to take.  What's unclear is what the "pre-install" function is trying to do. It could be that an octave function definition changed and the package is still trying to call it the old way, or it could mean that a package function is making an internal function call with excess arguments and that was allowed to slide in old versions.

In any case, we're guessing without access to the code or participation of the package maintainers.

Nicholas Jankowski <nrjank>
Group Member
Thu 14 Mar 2024 01:00:20 PM UTC, comment #1: 

from a google search it looks like you are referring to a package hosted at the University of Nebraska-Lincoln?
https://mvapack.unl.edu/

it looks like the code to examine is behind a registration wall requiring an academic login.  this will make it hard if not impossible for us to help you troubleshoot the issue. They do mention the code is fully GNU GPLv3 compliant, which (I am not a lawyer) should mean you are free to also share the code. If that can be facilitated, we might be able to see what the issue is.

In the meantime, can you check to see if an older version of octave was able to install the package?  the link to all windows versions including old versions is at the bottom of the Octave download page at https://octave.org/download#ms-windows

Nicholas Jankowski <nrjank>
Group Member
Thu 14 Mar 2024 08:37:23 AM UTC, original submission:  

Hi,

I'm trying to install the mvapack package and while installing it as shown in the mvapack documentation I get this error:

>> pkg install "mvapack-20231102.tar.gz"

error: pre_install: function called with too many inputs
error: called from
    pre_install
    install>prepare_installation at line 377 column 7
    install at line 201 column 7
    pkg at line 619 column 9

I already contacted the Mvapack support and they tlod me that It was probably more of an Octave problem than a problem on their side.

Do you have any idea what the issue is ?

Thank you for your answer,
Julien.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by None (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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-14 nrjank CategoryOctave Function Octave Package
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code