Score:3

Installing Avogadro 1.2.0 From Source Ubuntu 20.04

ke flag

Package downloaded as avogadro-1.2.0.tar.gz and put in the home/src folder; extracted to the same folder. I got as far as step 2 from the INSTALL folder, here ...

Requirements
============
 -- CMake 2.8.9 or later (2.8.11 recommended)
 -- Qt 4.6.0 or later (4.8.5 recommended)
 -- OpenBabel 2.3.x or later (development version from 
  http://github.org/openbabel/openbabel is recommended)
 -- Eigen 2.0.x or later (3.x also supported)


Basic Installation
==================
These instructions give a very basic overview of how to configure, compile and
install Avogadro on most systems.  If you are using unique install locations
and/or libraries are not automatically detected please consult the 'Advanced'
section.

1. Create a 'build' directory in the package source directory.

   mkdir build
   cd build

2. Configure the build system

   cmake ../

3. Compile

   make -j2

4. Install

   sudo make install

that is, after typing

cmake ../

I got the following errors,

darren@darren-Vostro-3560:~/src/avogadro-1.2.0/build$  cmake ../
-- The build type is RelWithDebInfo
CMake Error at /usr/share/cmake-3.16/Modules/FindQt4.cmake:1314 (message):
  Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
  CMakeLists.txt:226 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/darren/src/avogadro-1.2.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/darren/src/avogadro-1.2.0/build/CMakeFiles/CMakeError.log".

with the CMakeOutput.log saying, snipped since too long but can be supplied.

and the CMakeError.log saying,

Performing C++ SOURCE FILE Test COMPILES_WITHOUT_FPERMISSIVE failed with the following output:
Change Dir: /home/darren/src/avogadro-1.2.0/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_842a7/fast && /usr/bin/make -f CMakeFiles/cmTC_842a7.dir/build.make CMakeFiles/cmTC_842a7.dir/build
make[1]: Entering directory '/home/darren/src/avogadro-1.2.0/build/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_842a7.dir/src.cxx.o
/usr/bin/c++    -fvisibility=hidden -fvisibility-inlines-hidden -DCOMPILES_WITHOUT_FPERMISSIVE   -o CMakeFiles/cmTC_842a7.dir/src.cxx.o -c /home/darren/src/avogadro-1.2.0/build/CMakeFiles/CMakeTmp/src.cxx
/home/darren/src/avogadro-1.2.0/build/CMakeFiles/CMakeTmp/src.cxx:6:17: error: declaration of ‘auto_ptr<_Tp> counted_ptr<_Tp>::auto_ptr()’ changes meaning of ‘auto_ptr’ [-fpermissive]
    6 |   auto_ptr<_Tp> auto_ptr();
      |                 ^~~~~~~~
/home/darren/src/avogadro-1.2.0/build/CMakeFiles/CMakeTmp/src.cxx:2:28: note: ‘auto_ptr’ declared here as ‘class auto_ptr<_Tp>’
    2 | template <class _Tp> class auto_ptr {};
      |                            ^~~~~~~~
make[1]: *** [CMakeFiles/cmTC_842a7.dir/build.make:66: CMakeFiles/cmTC_842a7.dir/src.cxx.o] Error 1
make[1]: Leaving directory '/home/darren/src/avogadro-1.2.0/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_842a7/fast] Error 2


Source file was:

template <class _Tp> class auto_ptr {};
template <class _Tp>
struct counted_ptr
{
  auto_ptr<_Tp> auto_ptr();
};
int main() {return 0;}

and me saying, please help.

guiverc avatar
cn flag
Qt4 is EOL and was removed from Ubuntu in 2019 (2015 upstream was announced EOL though Debian & Ubuntu supported it until 15-Mar-2019) ; (for more details refer https://discourse.ubuntu.com/t/removing-qt-4-from-ubuntu-before-the-20-04-release/12295). The package if maintained should have been ported to Qt5 (introduced 19-Dec-2012) before now
Score:5
us flag

Avogadro 1.2 requires Qt4, which has been deprecated as Qt5 is available. You can directly install (without compiling) a newer (1.93.0) version of Avogadro with the command

sudo apt install avogadro

If you really need the old version, first install Qt4 from the Rock Core Team PPA (Please note that I have not tested it, so use at your own risk. However, there has been 50000+ downloads from this PPA, so it is probably safe.).

sudo add-apt-repository ppa:rock-core/qt4
sudo apt update

Then install the Qt4 libraries with

sudo apt install qt4-x11 libqt4-dev

Now proceed with cmake ../ once again.

ke flag
But doesn't sudo apt install avogadro install avogadro2 ?
us flag
@DarrenRhodes According to https://packages.ubuntu.com/focal/avogadro, it installs 1.93.0 (I don't know if 1.93.0 is branded as avogadro2).
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.