[XtalOpt-devel] problem building on ubuntu
David Lonie
loniedavid at gmail.com
Mon Oct 3 08:25:33 PDT 2016
Well, that's unfortunate. Apparently Avogadro now has a preprocessor define
named VERSION that's causing conflicts...
You can work around this by editing the files that are failing (optbase.cpp
in this case) and add:
#ifdef VERSION
#undef VERSION
#endif
after all of the "#include ..." lines, then recompile. I suspect you'll
need to modify a few files for this to work.
On Mon, Oct 3, 2016 at 10:20 AM Neven Golenić <neven.golenic at gmail.com>
wrote:
> Dear Xtalopt devs & users,
>
> I'm having trouble building the linux version of xtalopt. Openbabel and
> Avoagdro builds pass successfully but building xtalopt fails with:
>
> [ 18%] Generating queueinterfaces/moc_slurm.cxx
> Scanning dependencies of target globalsearch
> [ 18%] Building CXX object
> src/globalsearch/CMakeFiles/globalsearch.dir/optbase.cpp.o
> In file included from /home/student/include/avogadro/primitive.h:29:0,
> from /home/student/include/avogadro/molecule.h:29,
> from
> /home/student/src/xtalopt/src/globalsearch/structure.h:19,
> from
> /home/student/src/xtalopt/src/globalsearch/tracker.h:19,
> from
> /home/student/src/xtalopt/src/globalsearch/queuemanager.h:19,
> from
> /home/student/src/xtalopt/src/globalsearch/optbase.cpp:21:
> /home/student/src/xtalopt/src/globalsearch/optbase.cpp: In member function
> ‘virtual bool GlobalSearch::OptBase::save(const QString&, bool)’:
> /home/student/include/avogadro/config.h:37:17: error: expected
> unqualified-id before string constant
> #define VERSION "1.2.0"
> ^
> /home/student/src/xtalopt/src/globalsearch/optbase.cpp:259:15: note: in
> expansion of macro ‘VERSION’
> const int VERSION = m_schemaVersion;
> ^
> make[2]: *** [src/globalsearch/CMakeFiles/globalsearch.dir/optbase.cpp.o]
> Error 1
> make[1]: *** [src/globalsearch/CMakeFiles/globalsearch.dir/all] Error 2
> make: *** [all] Error 2
>
> Thanks for your help.
>
> --
> Kind Regards,
> Neven Golenić
> _______________________________________________
> XtalOpt-Devel mailing list
> XtalOpt-Devel at lists.openmolecules.net
> http://lists.openmolecules.net/listinfo.cgi/xtalopt-devel-openmolecules.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmolecules.net/pipermail/xtalopt-devel-openmolecules.net/attachments/20161003/d700d4fb/attachment.htm>
More information about the XtalOpt-Devel
mailing list