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 ...

 -- 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'

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.

  • 1
    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 discourse.ubuntu.com/t/…). The package if maintained should have been ported to Qt5 (introduced 19-Dec-2012) before now
    – guiverc
    Dec 27 '21 at 22:17

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.