Home   Manual

Building Avogadro 1.2 in Arch Linux

Hi

I have been trying to get Avogadro 1.2 running in Arch Linux without much success.

I am able to compile it and run it, however, opening a file fails with a popup message.
Openbabel is not the issue, because I am able to convert, for instance, a molden file to an xyz one.
The avogadro executable is correctly linked to all libraries, so I don’t think that is the issue per se.

Arch Linux is a bleeding edge distro with software very much up-to-date and I believe that the issue is due to a bad combination of the various components and relative versions.

The relevant setup with versions is the following:
gcc 9.2.0
boost 1.71
qt 4.8.7
eigen 3.1.2
libmsym 0.2.3
openbabel 2.4.1

At the moment I am playing around with cmake configurations, but I believe that the best is if somebody could tell me a setup (i.e. versions of the above components) that is guaranteed to work, so I can try to mirror them.

Thanks

Can you explain what the error message says?

I suspect the problem is that your Avogadro is linked to libopenbabel, but it can’t find the plugins.

Some updates, actually I was not very careful before and I was opening the avogadro appimage.

The versions of the relevant packages are:
gcc 9.2.0
eigen 3.3.7
qt 4.8.7
openbabel 2.4.1

Python and boost and libmsym are irrelevant since I am missing SIP, and python is disabled, while msym is bundled in avogadro, as far as I understand. I don’t know about rpath, I guess that is also bundled?

With these settings I am able to compile, however only the ball and stick plugin is loaded but not all the other ones.

Opening avogadro from the terminal I get the following:

Unable to load library icui18n "Cannot load library icui18n: (icui18n: cannot open shared object file: No such file or directory)" 
"Avogadro version:	1.2.0	Git:	258105b4
LibAvogadro version:	1.2.0	Git:	258105b4" 
Locale:  "en_US" 
Libavogadro translations not found. 
System has OpenGL support. 
About to test OpenGL capabilities. 
OpenGL capabilities found: 
	Double Buffering.
	Direct Rendering.
	Antialiasing.
Loading plugins: "/usr/local/bin/../lib/avogadro/1_2" 
Searching for plugins in "/usr/local/lib/avogadro/1_2" 
Searching for plugins in "/usr/local/lib/avogadro/1_2/colors" 
Searching for plugins in "/usr/local/lib/avogadro/1_2/engines" 
Searching for plugins in "/usr/local/lib/avogadro/1_2/extensions" 
Searching for plugins in "/usr/local/lib/avogadro/1_2/tools" 
Settings are missing for the next engines: () 
QStackedLayout::setCurrentWidget: Widget 0x559ebde863b0 not contained in stack
GLWidget initialisation... 
GLWidget initialised... 
createObjects() 
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: cHRM: invalid chromaticities

If I look in /usr/local/lib/avogadro/1_2/ I actually have all libraries compiled there… So I don’t understand why it doesn’t find them.

Are all the plugins .so files? I don’t know - if you’re willing to add some debug messages to the code, you want to look for PluginManager::loadPluginList, e.g.

      if(!QLibrary::isLibrary(fileName))
          continue; // <- Add qDebug() << " not a library " << fileName;

Yes, they are all .so files.

Before starting to put debug statements around, could you maybe give me a combination of versions that you know it builds fine?
Besides gcc (9.2.0) and cmake (3.16.1), I use the other libraries for avogadro only, thus I can easily switch their version.
I have basically quick and easy access to any version of qt4, openbabel, eigen, boost, sip, etc.

Also, what is not clear to me is to what extent are python, boost and sip necessary for avogadro. Which features would I miss by setting in cmake ENABLE_PYTHON=OFF ?
Because enabling python increases quite substantially the package dependencies and if I get a fully functional avogadro without it, then I would not enable it.

In the meantime, thanks for your time!

Also, what is not clear to me is to what extent are python, boost and sip necessary for avogadro. Which features would I miss by setting in cmake ENABLE_PYTHON=OFF ?
Because enabling python increases quite substantially the package dependencies and if I get a fully functional avogadro without it, then I would not enable it.

You do not need Python for Avogadro 1.x. I build the Mac packages without it because of the headaches with Apple’s Python.

I don’t see any reason that any version of GCC or CMake would cause problems. You should be fine with qt4 latest, Open Babel 2.4.x, Eigen 3.1, etc.