Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin does not work on Linux -- you cannot dloopen an svp file because it is not ELF format #1

Closed
Corin-EU opened this issue Feb 16, 2022 · 2 comments

Comments

@Corin-EU
Copy link

if the OS is Linux on line 291 it states to open the Sonique SVP file with

            m_instance = dlopen(module_path);

but this will never work because a Sonique SVP file is PE32 executable (DLL) and so is not in ELF format which is the only format that dlopen on Linux can handle.

         void SoniqueWidget::generatePreset()
         {

          closePreset();

        const char *module_path = qPrintable(m_presetList[m_currentIndex]);
        fprintf (stderr, "the module path is -->%s<--\n", module_path);
        #ifdef Q_OS_UNIX
         fprintf (stderr, "calling dllpen with specified module_path ...\n");
         m_instance = dlopen(module_path, RTLD_LAZY);
         fprintf (stderr, "did we get a moduleinstance from -->%s<--\n", module_path);
        #else
        fprintf (stderr, "calling LoadLibraryA with specified module_path<--\n");
        m_instance = LoadLibraryA(module_path);
        #endif
        qDebug("[SoniqueWidget] url is %s", module_path);

       if(!m_instance)
      {
       fprintf( stderr, "dlopen get error: %s\n", dlerror() );
       qDebug("Could not load the svp file %s", module_path);
       return;
      }

log output is

    the module path is -->//ust/local/bin/qmmp-1.5.0/bin/sonique/Faited.svp<--
    calling dlopen with specified module_path ...
    did we get a moduleinstance from -->local/bin/qmmp-1.5.0/bin/sonique/Faited.svp<--
    [SoniqueWidget] url is local/bin/sonique/Faited.svp
    dlopen get error: /usr/local/bin/sonique/Faited.svp: invalid ELF header
    Could not load the svp file local/bin/sonique/Faited.svp

Why the sonique SVP file directory has been coded as a sub-directory the application path viz /usr/local/bin/sonique and not to a lib or a share diirectory or to the userś home .qmmp/sonique is anybodyś guess. It appears that this code was never tested on a Linux system before it was released.

@Greedysky
Copy link
Member

sorry, this plugin can only run on Windows.

@Corin-EU
Copy link
Author

Corin-EU commented Apr 5, 2022

Exactly, so please consider adding a line tothe README file -- WINDOWS ONLY -- as that would make it clear even thought the code "#ifdef Q_OS_UNIX" makes it appear that it will work on other platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants