Linking external plugins

Hi Marcus, list,

I’ve come across a bug when building an external plugin for Avogadro.
When it gets to the linking step, I get:

/usr/bin/c++ -fPIC -g -shared -Wl,-soname,tensorvis.so -o
tensorvis.so CMakeFiles/tensorvis.dir/tensorvis.cpp.o
CMakeFiles/tensorvis.dir/ui/tensorviswidget.cpp.o -lavogadro
-lQtOpenGL -lbsdyengine -lnavigatetool -lelementcolor -lopenbabel
-lQtGui -lQtCore -lGLU -lGL -lSM -lICE -lX11 -lXext
/usr/bin/ld: cannot find -lbsdyengine
/usr/bin/ld: cannot find -lnavigatetool
/usr/bin/ld: cannot find -lelementcolor

It looks like this is related to the recent change for those three
plugins to be linked statically into avogadro. I can’t find where they
are being added to my plugin, however – the CMake avogadro_plugin
function only links to libavogadro.

Any ideas where to look? I know most folks are quite busy this summer,
so just a pointer as to what I need to do will be plenty of help :wink:

Dave

BTW, if anyone wants to test this, the code I’m using is at
https://github.com/dlonie/TensorVis

On Thu, Jul 7, 2011 at 9:28 PM, David Lonie loniedavid@gmail.com wrote:

I’ve come across a bug when building an external plugin for Avogadro.
When it gets to the linking step, I get:

/usr/bin/c++ -fPIC -g -shared -Wl,-soname,tensorvis.so -o
tensorvis.so CMakeFiles/tensorvis.dir/tensorvis.cpp.o
CMakeFiles/tensorvis.dir/ui/tensorviswidget.cpp.o -lavogadro
-lQtOpenGL -lbsdyengine -lnavigatetool -lelementcolor -lopenbabel
-lQtGui -lQtCore -lGLU -lGL -lSM -lICE -lX11 -lXext
/usr/bin/ld: cannot find -lbsdyengine
/usr/bin/ld: cannot find -lnavigatetool
/usr/bin/ld: cannot find -lelementcolor

It looks like this is related to the recent change for those three
plugins to be linked statically into avogadro. I can’t find where they
are being added to my plugin, however – the CMake avogadro_plugin
function only links to libavogadro.

Any ideas where to look? I know most folks are quite busy this summer,
so just a pointer as to what I need to do will be plenty of help :wink:

I’ve narrowed it down to the AvogadroLibraryDeps.cmake file, generated
in the root CMakeLists.txt. I don’t see how to remove the static
plugin entries from the autogenerated file. I had suspected that the
static plugins needed to be removed from avogadro’s
LINK_INTERFACE_LIBRARIES property, but this property appears to be
empty. Is there another way to remove these static plugins from the
link dependency list?

Dave

BTW, if anyone wants to test this, the code I’m using is at
https://github.com/dlonie/TensorVis

On Mon, Jul 18, 2011 at 2:35 PM, David Lonie loniedavid@gmail.com wrote:

On Thu, Jul 7, 2011 at 9:28 PM, David Lonie loniedavid@gmail.com wrote:

I’ve come across a bug when building an external plugin for Avogadro.
When it gets to the linking step, I get:

/usr/bin/c++ -fPIC -g -shared -Wl,-soname,tensorvis.so -o
tensorvis.so CMakeFiles/tensorvis.dir/tensorvis.cpp.o
CMakeFiles/tensorvis.dir/ui/tensorviswidget.cpp.o -lavogadro
-lQtOpenGL -lbsdyengine -lnavigatetool -lelementcolor -lopenbabel
-lQtGui -lQtCore -lGLU -lGL -lSM -lICE -lX11 -lXext
/usr/bin/ld: cannot find -lbsdyengine
/usr/bin/ld: cannot find -lnavigatetool
/usr/bin/ld: cannot find -lelementcolor

It looks like this is related to the recent change for those three
plugins to be linked statically into avogadro. I can’t find where they
are being added to my plugin, however – the CMake avogadro_plugin
function only links to libavogadro.

Any ideas where to look? I know most folks are quite busy this summer,
so just a pointer as to what I need to do will be plenty of help :wink:

I’ve narrowed it down to the AvogadroLibraryDeps.cmake file, generated
in the root CMakeLists.txt. I don’t see how to remove the static
plugin entries from the autogenerated file. I had suspected that the
static plugins needed to be removed from avogadro’s
LINK_INTERFACE_LIBRARIES property, but this property appears to be
empty. Is there another way to remove these static plugins from the
link dependency list?

I did not expect them to show up. I will dig into this when I get back, and
is certainly not what we want.

Marcus