Libelektra: Minimal Build: KDB Prints Warnings About Missing Modules

Created on 23 Apr 2018  路  6Comments  路  Source: ElektraInitiative/libelektra

I noticed that the Travis Haskell build job fails after commit 4972338 in PR #1940. The problem seems to be that some Markdown Shell Recorder tests print warnings about missing modules to stderr. The tests work correctly otherwise. Does anybody know how we can fix this problem?

Steps to Reproduce the Problem

  1. Configure a minimal build of Elektra:

    mkdir build
    cd build
    cmake -GNinja                            \
         -DTOOLS='kdb'                      \
         -DBINDINGS=''                      \
         -DPLUGINS='resolver_fm_hpu_b;dump' \
         -DBUILD_DOCUMENTATION=OFF ..
    
  2. Build Elektra

    ninja
    
  3. Try to retrieve an non-existent key via kdb

    kdb get user/does/not/exist
    

Expected Result

The command above should print the following error message to stdout:

Did not find key 'user/does/not/exist'

.

Actual Result

The command kdb get user/does/not/exist prints the following error message:

Did not find key 'user/does/not/exist'
 Sorry, 15 warnings were issued ;(
 Warning (#1):
    Description: could not load module, dlopen failed
    Ingroup: modules
    Module: dl
    At: ../src/libs/loader/dl.c:89
    Reason: of module: libelektra-list.so, because: dlopen(libelektra-list.so, 2): image not found
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#64):
    Description: could not load plugin in process plugin
    Ingroup: modules
    Module: kdb
    At: ../src/libs/elektra/mount.c:301
    Reason: list
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#1):
    Description: could not load module, dlopen failed
    Ingroup: modules
    Module: dl
    At: ../src/libs/loader/dl.c:89
    Reason: of module: libelektra-list.so, because: dlopen(libelektra-list.so, 2): image not found
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#64):
    Description: could not load plugin in process plugin
    Ingroup: modules
    Module: kdb
    At: ../src/libs/elektra/mount.c:301
    Reason: list
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#1):
    Description: could not load module, dlopen failed
    Ingroup: modules
    Module: dl
    At: ../src/libs/loader/dl.c:89
    Reason: of module: libelektra-list.so, because: dlopen(libelektra-list.so, 2): image not found
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#64):
    Description: could not load plugin in process plugin
    Ingroup: modules
    Module: kdb
    At: ../src/libs/elektra/mount.c:301
    Reason: list
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#1):
    Description: could not load module, dlopen failed
    Ingroup: modules
    Module: dl
    At: ../src/libs/loader/dl.c:89
    Reason: of module: libelektra-list.so, because: dlopen(libelektra-list.so, 2): image not found
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#64):
    Description: could not load plugin in process plugin
    Ingroup: modules
    Module: kdb
    At: ../src/libs/elektra/mount.c:301
    Reason: list
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#1):
    Description: could not load module, dlopen failed
    Ingroup: modules
    Module: dl
    At: ../src/libs/loader/dl.c:89
    Reason: of module: libelektra-list.so, because: dlopen(libelektra-list.so, 2): image not found
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#64):
    Description: could not load plugin in process plugin
    Ingroup: modules
    Module: kdb
    At: ../src/libs/elektra/mount.c:301
    Reason: list
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#1):
    Description: could not load module, dlopen failed
    Ingroup: modules
    Module: dl
    At: ../src/libs/loader/dl.c:89
    Reason: of module: libelektra-list.so, because: dlopen(libelektra-list.so, 2): image not found
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#64):
    Description: could not load plugin in process plugin
    Ingroup: modules
    Module: kdb
    At: ../src/libs/elektra/mount.c:301
    Reason: list
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#1):
    Description: could not load module, dlopen failed
    Ingroup: modules
    Module: dl
    At: ../src/libs/loader/dl.c:89
    Reason: of module: libelektra-list.so, because: dlopen(libelektra-list.so, 2): image not found
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#64):
    Description: could not load plugin in process plugin
    Ingroup: modules
    Module: kdb
    At: ../src/libs/elektra/mount.c:301
    Reason: list
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals
 Warning (#139):
    Description: failed to mount global plugins
    Ingroup: kdb
    Module:
    At: ../src/libs/elektra/kdb.c:309
    Reason: Mounting global plugins failed
    Mountpoint: system/elektra/mountpoints
    Configfile: kdbOpen(): mountGlobals

.

System Information

  • Elektra Version: master
  • Operating System: macOS 10.13.4
bug low priority question

All 6 comments

Thank you for reporting this problem!

The plugin list currently needs to be a part of PLUGINS because it is hard-coded in elektraDefaultGlobalConfig (mount.c 315)

We probably should fail in src/plugins/CMakeLists.txt line 70 if list is not part of ADDED_PLUGINS.

The plugin list currently needs to be a part of PLUGINS because it is hard-coded in elektraDefaultGlobalConfig (mount.c 315)

Thank you for the quick and very helpful response.

We probably should fail in src/plugins/CMakeLists.txt line 70 if list is not part of ADDED_PLUGINS.

I added this check to PR #1940.

I added the list plugin to the build configuration, but it seems like spec is also required? At least kdb get user/does/not/exist now prints the following message:

Did not find key 'user/does/not/exist'
 Sorry, 1 warning was issued ;(
 Warning (#1):
    Description: could not load module, dlopen failed
    Ingroup: modules
    Module: dl
    At: ../src/libs/loader/dl.c:89
    Reason: of module: libelektra-spec.so, because: dlopen(libelektra-spec.so, 2): image not found
    Mountpoint: user/does/not/exist
    Configfile: /Users/rene/.config/default.ecf

.

Yes, you are absolutely right: within elektraDefaultGlobalConfig we also refer to the spec plugin.

Unfortunately spec does not compile on elektra-gcc-configure-mingw-w64 since MinGW does not provide the header file fnmatch.h.

Should we

  • not require the spec plugin to build Elektra, or
  • disable the build job elektra-gcc-configure-mingw-w64

? Another option would be to use an fnmatch replacement on Windows.

Yet another option might be to just not require the spec plugin on Windows and use a macro to only enable the lines

keyNew ("system/elektra/globalplugins/postcommit/user/plugins", KEY_VALUE, "", KEY_END),
keyNew ("system/elektra/globalplugins/postcommit/user/plugins/#0", KEY_VALUE, "spec", KEY_END),
keyNew ("system/elektra/globalplugins/postcommit/user/plugins/#0/placements", KEY_VALUE, "spec", KEY_END),
keyNew ("system/elektra/globalplugins/postcommit/user/plugins/#0/placements/get", KEY_VALUE, "postgetstorage", KEY_END),
keyNew ("system/elektra/globalplugins/postcommit/user/plugins/#0/placements/set", KEY_VALUE, "presetstorage", KEY_END),

in mount.c on non-Windows systems. I just pushed a commit that uses this approach.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markus2330 picture markus2330  路  27Comments

markus2330 picture markus2330  路  38Comments

markus2330 picture markus2330  路  28Comments

kodebach picture kodebach  路  29Comments

raphi011 picture raphi011  路  32Comments