# Cmake can't find openbabel when compiling latest release

**URL:** <https://discuss.avogadro.cc/t/cmake-cant-find-openbabel-when-compiling-latest-release/334>\
**Category:** General Discussion\
**Created:** [July 30, 2013, 3:01pm UTC](https://discuss.avogadro.cc/t/cmake-cant-find-openbabel-when-compiling-latest-release/334 "2013-07-30T15:01:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kyle\_Bentley](https://discuss.avogadro.cc/letter_avatar_proxy/v4/letter/k/9dc877/32.png) [@Kyle\_Bentley](https://discuss.avogadro.cc/u/Kyle_Bentley)\
**Post date:** [July 30, 2013, 3:01pm UTC](https://discuss.avogadro.cc/t/cmake-cant-find-openbabel-when-compiling-latest-release/334/1 "2013-07-30T15:01:18Z")

</div>

I’m trying to compile the latest release, and everything has gone  
semi-smoothly up till now. I only had to manually enter a few of the  
paths, the libgl file path (using AMD’s catalyst libgl) and the  
qmake-qt4 path into the CMakeCache. I’m at a point where I’m not sure  
what to enter into the CMakeCache internal entries. cmake is  
complaining about not being able to find the openbabel libs. I’m  
certain they are installed, and I can see them in  
/usr/lib/openbabel/2.3.1 (I’m running debian testing if that helps).  
The suspect section is here:

OPENBABEL2\_CFLAGS:INTERNAL=  
OPENBABEL2\_CFLAGS\_I:INTERNAL=  
OPENBABEL2\_CFLAGS\_OTHER:INTERNAL=  
OPENBABEL2\_FOUND:INTERNAL=  
OPENBABEL2\_INCLUDEDIR:INTERNAL=  
OPENBABEL2\_LIBDIR:INTERNAL=  
OPENBABEL2\_LIBS:INTERNAL=  
OPENBABEL2\_LIBS\_L:INTERNAL=  
OPENBABEL2\_LIBS\_OTHER:INTERNAL=  
OPENBABEL2\_LIBS\_PATHS:INTERNAL=  
OPENBABEL2\_PREFIX:INTERNAL=  
OPENBABEL2\_STATIC\_CFLAGS:INTERNAL=  
OPENBABEL2\_STATIC\_CFLAGS\_I:INTERNAL=  
OPENBABEL2\_STATIC\_CFLAGS\_OTHER:INTERNAL=  
OPENBABEL2\_STATIC\_LIBDIR:INTERNAL=  
OPENBABEL2\_STATIC\_LIBS:INTERNAL=  
OPENBABEL2\_STATIC\_LIBS\_L:INTERNAL=  
OPENBABEL2\_STATIC\_LIBS\_OTHER:INTERNAL=  
OPENBABEL2\_STATIC\_LIBS\_PATHS:INTERNAL=  
OPENBABEL2\_VERSION:INTERNAL=  
OPENBABEL2\_openbabel-2.0\_INCLUDEDIR:INTERNAL=  
OPENBABEL2\_openbabel-2.0\_LIBDIR:INTERNAL=  
OPENBABEL2\_openbabel-2.0\_PREFIX:INTERNAL=  
OPENBABEL2\_openbabel-2.0\_VERSION:INTERNAL=

I’m sure that I need to point one of these to /usr/lib/ or  
/usr/lib/openbabel, but I don’t want to botch the whole setup. I’ve  
attached my current cache file too, incase it’s needed.

Thanks,

Kyle Bentley

---

<div class="post-metadata">

**Author:** ![allison.vacanti](https://discuss.avogadro.cc/user_avatar/discuss.avogadro.cc/allison.vacanti/32/112_2.png) [@allison.vacanti](https://discuss.avogadro.cc/u/allison.vacanti)\
**Post date:** [July 30, 2013, 3:15pm UTC](https://discuss.avogadro.cc/t/cmake-cant-find-openbabel-when-compiling-latest-release/334/2 "2013-07-30T15:15:11Z")

</div>

Hi Kyle,

You shouldn’t need to modify the cache directly, especially not the  
internal cache variables.

See [http://avogadro.openmolecules.net/wiki/Compiling\_on\_Linux\_and\_Mac\_OS\_X](http://avogadro.openmolecules.net/wiki/Compiling_on_Linux_and_Mac_OS_X)  
(It’s a bit confusing, there are two sections on building Avogadro on  
that page for some reason). You want to set OPENBABEL2\_INCLUDE\_DIR to  
something like $HOME/src/openbabel-2.2/include and  
OPENBABEL2\_LIBRARIES to something like  
$HOME/src/openbabel-2.2/src/.libs/libopenbabel.so, depending on where  
OB is installed.

Rather than editing the cache-file directly, try using cmake-gui  
(requires Qt) or ccmake (terminal based, requires ncurses), depending  
on if you’re at a terminal or not. Otherwise, you can just run:

cmake . -D=

in the build directory to adjust the settings.

Hope this helps,

Dave

On Tue, Jul 30, 2013 at 11:01 AM, Kyle Bentley [kwbent@uab.edu](mailto:kwbent@uab.edu) wrote:

> I’m trying to compile the latest release, and everything has gone  
> semi-smoothly up till now. I only had to manually enter a few of the paths,  
> the libgl file path (using AMD’s catalyst libgl) and the qmake-qt4 path into  
> the CMakeCache. I’m at a point where I’m not sure what to enter into the  
> CMakeCache internal entries. cmake is complaining about not being able to  
> find the openbabel libs. I’m certain they are installed, and I can see them  
> in /usr/lib/openbabel/2.3.1 (I’m running debian testing if that helps). The  
> suspect section is here:
> 
> OPENBABEL2\_CFLAGS:INTERNAL=  
> OPENBABEL2\_CFLAGS\_I:INTERNAL=  
> OPENBABEL2\_CFLAGS\_OTHER:INTERNAL=  
> OPENBABEL2\_FOUND:INTERNAL=  
> OPENBABEL2\_INCLUDEDIR:INTERNAL=  
> OPENBABEL2\_LIBDIR:INTERNAL=  
> OPENBABEL2\_LIBS:INTERNAL=  
> OPENBABEL2\_LIBS\_L:INTERNAL=  
> OPENBABEL2\_LIBS\_OTHER:INTERNAL=  
> OPENBABEL2\_LIBS\_PATHS:INTERNAL=  
> OPENBABEL2\_PREFIX:INTERNAL=  
> OPENBABEL2\_STATIC\_CFLAGS:INTERNAL=  
> OPENBABEL2\_STATIC\_CFLAGS\_I:INTERNAL=  
> OPENBABEL2\_STATIC\_CFLAGS\_OTHER:INTERNAL=  
> OPENBABEL2\_STATIC\_LIBDIR:INTERNAL=  
> OPENBABEL2\_STATIC\_LIBS:INTERNAL=  
> OPENBABEL2\_STATIC\_LIBS\_L:INTERNAL=  
> OPENBABEL2\_STATIC\_LIBS\_OTHER:INTERNAL=  
> OPENBABEL2\_STATIC\_LIBS\_PATHS:INTERNAL=  
> OPENBABEL2\_VERSION:INTERNAL=  
> OPENBABEL2\_openbabel-2.0\_INCLUDEDIR:INTERNAL=  
> OPENBABEL2\_openbabel-2.0\_LIBDIR:INTERNAL=  
> OPENBABEL2\_openbabel-2.0\_PREFIX:INTERNAL=  
> OPENBABEL2\_openbabel-2.0\_VERSION:INTERNAL=
> 
> I’m sure that I need to point one of these to /usr/lib/ or  
> /usr/lib/openbabel, but I don’t want to botch the whole setup. I’ve  
> attached my current cache file too, incase it’s needed.
> 
> Thanks,
> 
> Kyle Bentley
> 
> * * *
> 
> Get your SQL database under version control now!  
> Version control is standard for application code, but databases havent  
> caught up. So what steps can you take to put your SQL databases under  
> version control? Why should you start doing it? Read more to find out.  
> [http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk](http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk)
> 
> * * *
> 
> Avogadro-Discuss mailing list  
> [Avogadro-Discuss@lists.sourceforge.net](mailto:Avogadro-Discuss@lists.sourceforge.net)  
> [avogadro-discuss List Signup and Options](https://lists.sourceforge.net/lists/listinfo/avogadro-discuss)

---

<div class="post-metadata">

**Author:** ![Kyle\_Bentley](https://discuss.avogadro.cc/letter_avatar_proxy/v4/letter/k/9dc877/32.png) [@Kyle\_Bentley](https://discuss.avogadro.cc/u/Kyle_Bentley)\
**Post date:** [July 30, 2013, 3:36pm UTC](https://discuss.avogadro.cc/t/cmake-cant-find-openbabel-when-compiling-latest-release/334/3 "2013-07-30T15:36:07Z")

</div>

Dave,

Thanks for the advice. I hadn’t noticed that I’d forgotten the  
openbabel dev files. Once I installed libopenbabel-dev and rebuilt the  
cache everything was fine.

Kyle B

On 07/30/2013 10:15 AM, David Lonie wrote:

> Hi Kyle,
> 
> You shouldn’t need to modify the cache directly, especially not the  
> internal cache variables.
> 
> See [http://avogadro.openmolecules.net/wiki/Compiling\_on\_Linux\_and\_Mac\_OS\_X](http://avogadro.openmolecules.net/wiki/Compiling_on_Linux_and_Mac_OS_X)  
> (It’s a bit confusing, there are two sections on building Avogadro on  
> that page for some reason). You want to set OPENBABEL2\_INCLUDE\_DIR to  
> something like $HOME/src/openbabel-2.2/include and  
> OPENBABEL2\_LIBRARIES to something like  
> $HOME/src/openbabel-2.2/src/.libs/libopenbabel.so, depending on where  
> OB is installed.
> 
> Rather than editing the cache-file directly, try using cmake-gui  
> (requires Qt) or ccmake (terminal based, requires ncurses), depending  
> on if you’re at a terminal or not. Otherwise, you can just run:
> 
> cmake . -D=
> 
> in the build directory to adjust the settings.
> 
> Hope this helps,
> 
> Dave
> 
> On Tue, Jul 30, 2013 at 11:01 AM, Kyle Bentley[kwbent@uab.edu](mailto:kwbent@uab.edu) wrote:
> 
> > I’m trying to compile the latest release, and everything has gone  
> > semi-smoothly up till now. I only had to manually enter a few of the paths,  
> > the libgl file path (using AMD’s catalyst libgl) and the qmake-qt4 path into  
> > the CMakeCache. I’m at a point where I’m not sure what to enter into the  
> > CMakeCache internal entries. cmake is complaining about not being able to  
> > find the openbabel libs. I’m certain they are installed, and I can see them  
> > in /usr/lib/openbabel/2.3.1 (I’m running debian testing if that helps). The  
> > suspect section is here:
> > 
> > OPENBABEL2\_CFLAGS:INTERNAL=  
> > OPENBABEL2\_CFLAGS\_I:INTERNAL=  
> > OPENBABEL2\_CFLAGS\_OTHER:INTERNAL=  
> > OPENBABEL2\_FOUND:INTERNAL=  
> > OPENBABEL2\_INCLUDEDIR:INTERNAL=  
> > OPENBABEL2\_LIBDIR:INTERNAL=  
> > OPENBABEL2\_LIBS:INTERNAL=  
> > OPENBABEL2\_LIBS\_L:INTERNAL=  
> > OPENBABEL2\_LIBS\_OTHER:INTERNAL=  
> > OPENBABEL2\_LIBS\_PATHS:INTERNAL=  
> > OPENBABEL2\_PREFIX:INTERNAL=  
> > OPENBABEL2\_STATIC\_CFLAGS:INTERNAL=  
> > OPENBABEL2\_STATIC\_CFLAGS\_I:INTERNAL=  
> > OPENBABEL2\_STATIC\_CFLAGS\_OTHER:INTERNAL=  
> > OPENBABEL2\_STATIC\_LIBDIR:INTERNAL=  
> > OPENBABEL2\_STATIC\_LIBS:INTERNAL=  
> > OPENBABEL2\_STATIC\_LIBS\_L:INTERNAL=  
> > OPENBABEL2\_STATIC\_LIBS\_OTHER:INTERNAL=  
> > OPENBABEL2\_STATIC\_LIBS\_PATHS:INTERNAL=  
> > OPENBABEL2\_VERSION:INTERNAL=  
> > OPENBABEL2\_openbabel-2.0\_INCLUDEDIR:INTERNAL=  
> > OPENBABEL2\_openbabel-2.0\_LIBDIR:INTERNAL=  
> > OPENBABEL2\_openbabel-2.0\_PREFIX:INTERNAL=  
> > OPENBABEL2\_openbabel-2.0\_VERSION:INTERNAL=
> > 
> > I’m sure that I need to point one of these to /usr/lib/ or  
> > /usr/lib/openbabel, but I don’t want to botch the whole setup. I’ve  
> > attached my current cache file too, incase it’s needed.
> > 
> > Thanks,
> > 
> > Kyle Bentley
> > 
> > * * *
> > 
> > Get your SQL database under version control now!  
> > Version control is standard for application code, but databases havent  
> > caught up. So what steps can you take to put your SQL databases under  
> > version control? Why should you start doing it? Read more to find out.  
> > [http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk](http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk)
> > 
> > * * *
> > 
> > Avogadro-Discuss mailing list  
> > [Avogadro-Discuss@lists.sourceforge.net](mailto:Avogadro-Discuss@lists.sourceforge.net)  
> > [avogadro-discuss List Signup and Options](https://lists.sourceforge.net/lists/listinfo/avogadro-discuss)
> 
> * * *
> 
> Get your SQL database under version control now!  
> Version control is standard for application code, but databases havent  
> caught up. So what steps can you take to put your SQL databases under  
> version control? Why should you start doing it? Read more to find out.  
> [http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk](http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk)
> 
> * * *
> 
> Avogadro-Discuss mailing list  
> [Avogadro-Discuss@lists.sourceforge.net](mailto:Avogadro-Discuss@lists.sourceforge.net)  
> [avogadro-discuss List Signup and Options](https://lists.sourceforge.net/lists/listinfo/avogadro-discuss)
