Home   Manual

Possible issue with Debian/Ubuntu packages for avogadro2 and input generators

Dear All,

Currently, I make use of avogadro2 on my desktop which is running Ubuntu 20.04. The binaries are from the deb packages supplied by avogadro and libavogadro2-1.

I have noticed that the “Quantum–>Input generators” pull down is absent. I have also noticed that the “plugin downloader” does not work either, but I think this a separate issue (I think it’s putting them in the wrong location).

Anyway, I manually moved the scripts to the expected location:
~/.local/share/OpenChemistry/Avogadro/inputGenerators
but this did not work. I also note that a few people may also be experiencing this too:


So, to investigate, I compiled avogadro2 from source, from the git repo:

1)Install needed deps
  sudo apt-get install qtbase5-dev qtdeclarative5-dev libxml2-dev

2) clone
  git clone --recursive git://github.com/OpenChemistry/openchemistry.git

3) build out-of-source dir

  mkdir openchemistry-build
  cd openchemistry-build

  cmake ../openchemistry
  cmake --build . --config Release

4) Build
  make -j16

5) Run
  cd ..
  ./openchemistry-build/prefix/bin/avogadro2

This worked; I was able see “Quantum–>Input generators” and all the input generators. So… my attention turned to the compilation and packaging that Ubuntu was using.

Next, I compiled the src debian packages (https://launchpad.net/ubuntu/+source/avogadrolibs/1.93.0-3 and https://launchpad.net/ubuntu/+source/avogadro/1.93.0-1) and installed the generated debs. I, again, saw the original problem.

Now, I suspect there is a bug with the packaging process (the actual compile processes are in ./debian/rules in this file ).

I also notice that from the terminal, the deb binary does not report looking for the input generator (see "Checking for “foo” … "):

mjw@lags:~$ avogadro2 
Locale:  "en_GB"
 translation success
"/usr/share/qt5/translations"
 translation success
Extension plugins dynamically found... 22
Checking for  "commands"  scripts in "/home/mjw/.local/share/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/usr/share/ubuntu/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/usr/local/share/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/usr/share/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/var/lib/snapd/desktop/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/usr/bin/../lib/x86_64-linux-gnu/avogadro2/scripts/commands"
OBProcess::executeObabel: Running "obabel" "-L formats read"
OBProcess::executeObabel: Running "obabel" "-L formats write"
OBProcess::executeObabel: Running "obabel" "-L forcefields"
OBProcess::executeObabel: Running "obabel" "-V"
"obabel"  found:  "obabel: Open Babel 3.0.0 -- Mar 11 2020 -- 11:52:36"
"Navigator" added
"Editor" added
"Selection" added
"Manipulator" added
"BondCentric" added
"MeasureTool" added
"PlayerTool" added

But, the version compiled from the git source, does:

mjw@lags:~/workspace$ ./openchemistry-build/avogadroapp/bin/avogadro2 
Locale:  "en_GB"
 translation success
"/usr/share/qt5/translations"
 translation success
Extension plugins dynamically found... 29
Checking for  "commands"  scripts in "/home/mjw/.local/share/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/usr/share/ubuntu/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/usr/local/share/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/usr/share/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/var/lib/snapd/desktop/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/home/mjw/workspace/openchemistry-build/avogadroapp/bin/../lib/avogadro2/scripts/commands"
OBProcess::executeObabel: Running "obabel" "-L formats read"
OBProcess::executeObabel: Running "obabel" "-L formats write"
OBProcess::executeObabel: Running "obabel" "-L forcefields"
OBProcess::executeObabel: Running "obabel" "-V"
"obabel"  found:  "obabel: Open Babel 3.0.0 -- Mar 11 2020 -- 11:52:36"
Checking for  "inputGenerators"  scripts in "/home/mjw/.local/share/OpenChemistry/Avogadro/inputGenerators"
Checking for  "inputGenerators"  scripts in "/usr/share/ubuntu/OpenChemistry/Avogadro/inputGenerators"
Checking for  "inputGenerators"  scripts in "/usr/local/share/OpenChemistry/Avogadro/inputGenerators"
Checking for  "inputGenerators"  scripts in "/usr/share/OpenChemistry/Avogadro/inputGenerators"
Checking for  "inputGenerators"  scripts in "/var/lib/snapd/desktop/OpenChemistry/Avogadro/inputGenerators"
Checking for  "inputGenerators"  scripts in "/home/mjw/workspace/openchemistry-build/avogadroapp/bin/../lib/avogadro2/scripts/inputGenerators"
ScriptLoader::queryProgramName: Unable to retrieve program name for "/home/mjw/.local/share/OpenChemistry/Avogadro/inputGenerators/generators.cmake" ; "Error running script '/usr/bin/python3 /home/mjw/.local/share/OpenChemistry/Avogadro/inputGenerators/generators.cmake --display-name --lang en_GB': Abnormal exit status 1 (Unknown error.: Unknown error)\n\nOutput:\n  File \"/home/mjw/.local/share/OpenChemistry/Avogadro/inputGenerators/generators.cmake\", line 3\n    dalton.py\n    ^\nSyntaxError: invalid syntax\n"
ScriptLoader::queryProgramName: Unable to retrieve program name for "/home/mjw/.local/share/OpenChemistry/Avogadro/inputGenerators/LICENSE" ; "Error running script '/usr/bin/python3 /home/mjw/.local/share/OpenChemistry/Avogadro/inputGenerators/LICENSE --display-name --lang en_GB': Abnormal exit status 1 (Unknown error.: Unknown error)\n\nOutput:\n  File \"/home/mjw/.local/share/OpenChemistry/Avogadro/inputGenerators/LICENSE\", line 1\n    Copyright (c) 2011-2018, Kitware, Inc.\n                  ^\nSyntaxError: invalid syntax\n"
ScriptLoader::queryProgramName: Unable to retrieve program name for "/home/mjw/.local/share/OpenChemistry/Avogadro/inputGenerators/README.md" ; "Error running script '/usr/bin/python3 /home/mjw/.local/share/OpenChemistry/Avogadro/inputGenerators/README.md --display-name --lang en_GB': Abnormal exit status 1 (Unknown error.: Unknown error)\n\nOutput:\n  File \"/home/mjw/.local/share/OpenChemistry/Avogadro/inputGenerators/README.md\", line 1\n    Avogadro 2 Python Input Generators\n             ^\nSyntaxError: invalid syntax\n"
Checking for  "formatScripts"  scripts in "/home/mjw/.local/share/OpenChemistry/Avogadro/formatScripts"
Checking for  "formatScripts"  scripts in "/usr/share/ubuntu/OpenChemistry/Avogadro/formatScripts"
Checking for  "formatScripts"  scripts in "/usr/local/share/OpenChemistry/Avogadro/formatScripts"
Checking for  "formatScripts"  scripts in "/usr/share/OpenChemistry/Avogadro/formatScripts"
Checking for  "formatScripts"  scripts in "/var/lib/snapd/desktop/OpenChemistry/Avogadro/formatScripts"
Checking for  "formatScripts"  scripts in "/home/mjw/workspace/openchemistry-build/avogadroapp/bin/../lib/avogadro2/scripts/formatScripts"
"Navigator" added
"Editor" added
"Selection" added
"Manipulator" added
"BondCentric" added
"MeasureTool" added
"PlayerTool" added
Error starting RPC server: "QLocalServer::listen: Address in use"
Other server is alive. Not starting new instance.

My current theory is the absence of avogadrogenerators in the deb package building process could be the issue and somehow prevents the final binary from searching fro input generators. This is just speculation at the moment…

I am still working my way through the related code, but I just wanted to document what I had found thus far.

What do you think?

Thanks,

Mark

4 Likes

I haven’t had a chance to look at the deb build, but I wonder if the Molequeue bits are turned off in that build.

In the Ubuntu build, it should install:
lib/avogadro2/staticplugins

Mine looks like this:

In the Ubuntu build, is there a “QuantumInput” plugin listed (regardless of the file extension)?

If there isn’t QuantumInput.* then the code to look for the generators isn’t installed and will never run.

I think you’re correct: QuantumInput.* is missing

mjw@lags:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
mjw@lags:~$ dpkg -L libavogadro2-1 | grep -i MeasureToo
/usr/lib/x86_64-linux-gnu/avogadro2/staticplugins/MeasureTool.a
mjw@lags:~$ dpkg -L libavogadro2-1 | grep -i QuantumInput
mjw@lags:~$ 

Looking in the debian/rules file within: https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/avogadrolibs/1.93.0-3/avogadrolibs_1.93.0-3.debian.tar.xz

<snip>
CMAKE_OPTS=-DUSE_HDF5=ON \
            -DUSE_LIBMSYM=OFF \
            -DUSE_MMTF=OFF \
            -DUSE_MOLEQUEUE=OFF \
            -DOpenGL_GL_PREFERENCE=GLVND \
            -DCMAKE_SKIP_RPATH=TRUE \
            -DUSE_PYTHON=ON \
            -DENABLE_TRANSLATIONS=ON

<snip>

In the most recent sid deb, there is also a reference to this:

    - drop_cp2kinput.patch drops the cp2k input plugin,
      since it requires molequeue (upstream Issue#476)

I think #476 is here and “RizzerOnGitHub” is the debian packager (Drew Parsons)

That’s right, no one has package MoleQueue for Debian yet, so we can’t yet build in the functionality that requires it. We’ve got as much of avogadro2 working as we can. Apologies for the inconvenience!

2 Likes

Yeah, it’s incentive to finish the effort to put the input generators onto the newer InterfaceScript classes:

Thanks Drew; this is all very useful since we now understand the origin of this issue with the Debian/Ubuntu packages.