Avogadro-Squared package compile error

Hi All,

having a bit of trouble compiling the Avogadro-Squared package from the git repo. I am using the CMakeLists.txt in the ~/avogadro-squared dir by making a build dir and running cmake …/ from there. At the make openbabel step I get this output:


Linking C shared library …/…/…/lib/libinchi.so
CMakeFiles/inchi.dir/ichister.o: In function len2': /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:189: undefined reference tosqrt’
CMakeFiles/inchi.dir/ichister.o: In function len3': /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:184: undefined reference tosqrt’
CMakeFiles/inchi.dir/ichister.o: In function half_stereo_bond_parity': /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:1946: undefined reference tosqrt’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:1966: undefined reference to atan2' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:1967: undefined reference toatan2’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:1985: undefined reference to floor' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:1986: undefined reference tofloor’
CMakeFiles/inchi.dir/ichister.o: In function FixSb0DParities': /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:1576: undefined reference tofloor’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:1577: undefined reference to floor' CMakeFiles/inchi.dir/ichister.o: In functionGet2DTetrahedralAmbiguity’:
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:324: undefined reference to atan2' CMakeFiles/inchi.dir/ichister.o: In functiontriple_prod_char’:
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:1065: undefined reference to floor' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:1065: undefined reference tofloor’
CMakeFiles/inchi.dir/strutil.o: In function dist3D': /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2715: undefined reference tosqrt’
CMakeFiles/inchi.dir/strutil.o: In function GetMinDistDistribution': /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2867: undefined reference toatan2’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2869: undefined reference to floor' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2790: undefined reference toatan2’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2791: undefined reference to atan2' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2800: undefined reference tofloor’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2801: undefined reference to floor' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2815: undefined reference toatan2’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2821: undefined reference to cos' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2838: undefined reference toatan2’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2840: undefined reference to floor' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2847: undefined reference toatan2’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2849: undefined reference to floor' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2854: undefined reference tofloor’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2780: undefined reference to sqrt' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2778: undefined reference tosqrt’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2773: undefined reference to sqrt' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2785: undefined reference tosqrt’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2816: undefined reference to sqrt' CMakeFiles/inchi.dir/strutil.o: In functionmove_explicit_Hcation’:
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2957: undefined reference to atan2' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2964: undefined reference tofloor’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2987: undefined reference to sincos' /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2956: undefined reference tosqrt’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2915: undefined reference to `sqrt’
collect2: ld returned 1 exit status

This is a new one to me. math.h is included in ichister.c and strutil.c, it exists in my /usr/include directory. Have not encountered this before. I don’t want to go around changing the Makefile with no advice.

Surely everything up to that point used some sort of trigonometric function…?

Cheers in advance,

Mark


if you’re doing an experiment, you should report everything that you think might make it invalid — not only what you think is right about it; other causes that could possibly explain your results; and things you thought of that you’ve eliminated by some other experiment, and how they worked — to make sure the other fellow can tell they have been eliminated.

I have approximate answers and possible beliefs in different degrees of certainty about different things, but I’m not absolutely sure of anything, and of many things I don’t know anything about, but I don’t have to know an answer I don’t feel frightened by not knowing things, by being lost in the mysterious universe without having any purpose which is the way it really is as far as I can tell possibly. It doesn’t frighten me. - R. Feynman

Hi Mark,

On Fri, Apr 15, 2011 at 8:24 AM, Lewis, Mark M.A.Lewis@liverpool.ac.uk wrote:

Hi All,

having a bit of trouble compiling the Avogadro-Squared package from the git repo. I am using the CMakeLists.txt in the ~/avogadro-squared dir by making a build dir and running cmake …/ from there. At the make openbabel step I get this output:


Linking C shared library …/…/…/lib/libinchi.so
CMakeFiles/inchi.dir/ichister.o: In function len2': /home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/ichister.c:189: undefined reference tosqrt’
/home/mark/Applications/avogadro/avogadro-squared/openbabel/src/formats/inchi103/strutil.c:2915: undefined reference to `sqrt’
collect2: ld returned 1 exit status

This is a new one to me. math.h is included in ichister.c and strutil.c, it exists in my /usr/include directory. Have not encountered this before. I don’t want to go around changing the Makefile with no advice.

Surely everything up to that point used some sort of trigonometric function…?

I was just testing this out last night and did not see that error. I
have added a forcebuild step for Open Babel, meaning that it will get
rebuild each time you type make at the top level now. If you could try
a,

make VERBOSE=1

That will show the link line, it should be linking to libm to provide
all of the standard maths functions. I just checked, and everything is
compiling/building/linking for me on Linux (x86_64, GCC 4.5).

Marcus