nutjunkie / IQmol

IQmol is an open source molecular editor and visualization package
GNU General Public License v3.0
99 stars 47 forks source link

Using Openbabel3 #54

Open sagitter opened 2 years ago

sagitter commented 2 years ago

Hi all.

Cannot compile IQmol-2.15.0 in Fedora 36 (devel branch) against openbabel-3.1.1 with GCC-11.2.1 Please, could you render IQmol compatible to Openbabel3? Thanks.

make[1]: Entering directory '/home/sagitter/rpmbuild/BUILD/IQmol-2.15.0/src/Data'
g++ -c -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -I/usr/include/openbabel3 -O2 -g -ggdb -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -Wall -Wextra -D_REENTRANT -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I/usr/include/openbabel-2.0 -I../../src -I../../build -I. -I../Util -I../Parser -I../Yaml -I../OpenMesh/src -I/usr/include/qt5 -I/usr/include/qt5/QtOpenGL -I/usr/include/qt5/QtPrintSupport -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtXml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtCore -I../../build -I/usr/lib64/qt5/mkspecs/linux-g++ -o ../../build/Atom.o Atom.C
In file included from Serialization.h:29,
                 from Data.h:25,
                 from DataList.h:25,
                 from Atom.h:25,
                 from Atom.C:23:
../../src/QGLViewer/vec.h: In member function 'qglviewer::Vec qglviewer::Vec::unit() const':
../../src/QGLViewer/vec.h:355:26: warning: implicitly-declared 'constexpr qglviewer::Vec::Vec(const qglviewer::Vec&)' is deprecated [-Wdeprecated-copy]
  355 |                 Vec v = *this;
      |                          ^~~~
In file included from Serialization.h:29,
                 from Data.h:25,
                 from DataList.h:25,
                 from Atom.h:25,
                 from Atom.C:23:
../../src/QGLViewer/vec.h:119:14: note: because 'qglviewer::Vec' has user-provided 'qglviewer::Vec& qglviewer::Vec::operator=(const qglviewer::Vec&)'
  119 |         Vec& operator=(const Vec& v)
      |              ^~~~~~~~
In file included from Serialization.h:29,
                 from Data.h:25,
                 from DataList.h:25,
                 from Atom.h:25,
                 from Atom.C:23:
../../src/QGLViewer/vec.h:357:24: warning: implicitly-declared 'constexpr qglviewer::Vec::Vec(const qglviewer::Vec&)' is deprecated [-Wdeprecated-copy]
  357 |                 return v;
      |                        ^
In file included from Serialization.h:29,
                 from Data.h:25,
                 from DataList.h:25,
                 from Atom.h:25,
                 from Atom.C:23:
../../src/QGLViewer/vec.h:119:14: note: because 'qglviewer::Vec' has user-provided 'qglviewer::Vec& qglviewer::Vec::operator=(const qglviewer::Vec&)'
  119 |         Vec& operator=(const Vec& v)
      |              ^~~~~~~~
In file included from DataList.h:25,
                 from Atom.h:25,
                 from Atom.C:23:
Data.h: In member function 'IQmol::Data::Base& IQmol::Data::Base::operator=(const IQmol::Data::Base&)':
Data.h:94:13: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   94 |             if (this != &that) copy(that);  return *this;
      |             ^~
Data.h:94:45: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   94 |             if (this != &that) copy(that);  return *this;
      |                                             ^~~~~~
In file included from /usr/include/openbabel3/openbabel/mol.h:48,
                 from Atom.C:25:
/usr/include/openbabel3/openbabel/base.h: In member function 'virtual const char* OpenBabel::OBBase::GetTitle(bool) const':
/usr/include/openbabel3/openbabel/base.h:286:49: warning: unused parameter 'replaceNewlines' [-Wunused-parameter]
  286 |       virtual const char  *GetTitle(bool UNUSED(replaceNewlines) = true) const { return "";}
      |                                                 ^
/usr/include/openbabel3/openbabel/base.h:37:20: note: in definition of macro 'UNUSED'
   37 | # define UNUSED(x) x
      |                    ^
Atom.C: In static member function 'static unsigned int IQmol::Data::Atom::atomicNumber(const QString&)':
Atom.C:37:26: error: 'etab' is not a member of 'OpenBabel'
   37 |    unsigned z(OpenBabel::etab.GetAtomicNum(symbol.toLatin1().data()));
      |                          ^~~~
make[1]: *** [Makefile:686: ../../build/Atom.o] Error 1

Build log: https://pastebin.com/A3XLQZFv

benjfitz commented 2 years ago

This is also a problem with Ubuntu 20.04 LTS and newer b/c OpenBabel 2.x are no longer available.

susilehtola commented 2 years ago

Also a problem in Fedora. If IQmol can't build against OpenBabel3, it'll get dropped from the distribution.

susilehtola commented 2 years ago

FTBFS in rawhide marks an eight-week countdown timer.

susilehtola commented 1 year ago

@nutjunkie can you have a look at porting IQmol to OpenBabel 3?

nutjunkie commented 1 year ago

The IQmol3 repository is a rebase of the code that uses several updated libraries, including OpenBabel 3.