Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#345 BRL-CAD svn version failed to build with libavoid

open
nobody
5
2013-03-30
2013-03-30
Winston Wu
No

Version: BRL-CAD 7.23.1 svn 54980 & adaptagrams most recent GIT version

Problem: Compiled failed with libavoid with this error:

Scanning dependencies of target test_bottess
[ 90%] Building C object src/libgcv/CMakeFiles/test_bottess.dir/test_bottess.c.o
[ 90%] Building CXX object src/libged/CMakeFiles/libged.dir/dag.cpp.o
Linking C executable ../../bin/test_bottess
[ 90%] Built target test_bottess
[ 90%] Building C object src/libged/CMakeFiles/libged.dir/dbip.c.o
/home/highcheng/src/ENGINEERING/brlcad/src/libged/dag.cpp: In function ‘void position_node(_ged_dag_data*, bool, Avoid::ShapeRef*, Avoid::ShapeRef*, unsigned int&, std::vector<double>&)’:
/home/highcheng/src/ENGINEERING/brlcad/src/libged/dag.cpp:132:22: error: ‘const class Avoid::Polygon’ has no member named ‘getBoundingRect’
/home/highcheng/src/ENGINEERING/brlcad/src/libged/dag.cpp:140:20: error: ‘const class Avoid::Polygon’ has no member named ‘getBoundingRect’
/home/highcheng/src/ENGINEERING/brlcad/src/libged/dag.cpp: In function ‘int add_objects(ged*, _ged_dag_data*)’:
/home/highcheng/src/ENGINEERING/brlcad/src/libged/dag.cpp:522:18: error: ‘class Avoid::Router’ has no member named ‘setOrthogonalNudgeDistance’
/home/highcheng/src/ENGINEERING/brlcad/src/libged/dag.cpp: In function ‘void graph_positions(ged*, _ged_dag_data*)’:
/home/highcheng/src/ENGINEERING/brlcad/src/libged/dag.cpp:649:23: error: ‘const class Avoid::Polygon’ has no member named ‘getBoundingRect’

Discussion

  • Tom Browder
    Tom Browder
    2013-03-30

    Can you please post your cmake configure line?

     
  • Winston Wu
    Winston Wu
    2013-03-30

    Hi tbrowder2,

    I configured my BRLCAD by ccmake, so I don't know how to find the cmake configure line. But I can upload my CMakeCache.txt. It might help.

     
  • Winston Wu
    Winston Wu
    2013-03-30

    CMakeCache.txt of my BRL-CAD

     
    Attachments
  • Tom Browder
    Tom Browder
    2013-03-30

    That's okay, I think have enough to go on. I've never used ccmake so it'll be a new experience.

    Oops, what system/OS are you running on/under? If *nix, execute 'uname -a' and let us know the results.

    -Tom

     
  • Winston Wu
    Winston Wu
    2013-03-30

    HI tbrowder2,

    the result is:

    Linux caonima 3.6.11-030611-generic #201212171335 SMP Mon Dec 17 18:36:00 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

     
  • Sean Morrison
    Sean Morrison
    2013-03-30

    I suspect that libavoid has simply changed API since the version was used last summer, especially the git version. It was probably developed against the latest stable version, not their development sources. Note that is experimental code so if you're not planning on working on the dag command, you can just turn it off.

     
  • Tom Browder
    Tom Browder
    2013-03-30

    That's correct, Sean, definitely a new API, and I don't see any stable releases marked so far and haven't yet found where/when they changed the API.

     
  • Tom Browder
    Tom Browder
    2013-03-30

    Thanks, Cristina!

    So, Winston, you can either (1) revert your Adaptagrams library to the older version before the API changes, (2) propose a patch to brlcad for updating, (3) change your checked out BRL-CAD version yourself, (4) wait until the HEAD is properly updated, or (5) do as Sean suggested and turn off the offending code by a CMake option which I think is:

    -DBRLCAD_ADAPTAGRAMS=OFF

     
  • Winston Wu
    Winston Wu
    2013-03-30

    Thanks, Tom.

    I decided to turn off adaptagrams and wait until it is updated.

    Winston

     
  • Tom Browder
    Tom Browder
    2013-03-30

    Winston, I am going to try to update the BRL-CAD HEAD, but I can't get a successful build on adaptagrams. So it will be a bit later until I can solve that problem.

     
  • Tom Browder
    Tom Browder
    2013-03-30

    Winston, I have been able to patch BRL-CAD (for rev 54980) so that one can use the latest libavoid; however, I had to make some changes and found some errors with various parts of the adaptagram package. I am sending my adaptagram changes to its author, and I will submit my BRL-CAD changes to HEAD (note that HEAD seems to be broken at the moment).

    I will also recommend that the BRL-CAD developers, if they continue to use adaptagrams, provide their own version as is done with other 3rd-party libs.

     
  • Tom Browder
    Tom Browder
    2013-03-31

    Here are my adaptagram changes for BRL-CAD: https://github.com/tbrowder/adaptagrams.

    I have initiated a pull request for the upstream author.

     
  • Tom Browder
    Tom Browder
    2013-04-02

    I've integrated Cristina's changes for shared libraries (added to all libs), added code for all the libraries to compile static and shared (user can choose to turn of either at ./configure time). I blew away the old brlcad branch so you should just clone the master branch. The compiled and installed code now integrates successfully with the BRL-CAD HEAD.

    Note that the "make uninstall" option for cola really works, and I suggest using after ./configure and before "make && make check".

    Note also that if you create both shared and static libs, the BRL-CAD HEAD build used the shared libs (at least it did for me). I think former problems reported with conflicts in shared vs. static was due to the missing "-fPIC" options, but I don't know enough to say that for sure. I think Cristina hit the nail on the head--thanks Cristina!

    To repeat, the fixes are on the master branch at:

    https://github.com/tbrowder/adaptagrams

     
  • Tom Browder
    Tom Browder
    2013-04-02

    Patches for this bug were added at r54992. A corresponding fixed adaptagrams package may be had by cloning "git://github.com/tbrowder/adaptagrams.git". After building, testing, and installing the fixed adaptagrams package, the user should try a fresh build of the BRL-CAD HEAD. Success was had at rev 55002. I consider this bug closed.

     
  • Winston Wu
    Winston Wu
    2013-04-04

    Tom, I'm sorry, but it doesn't work...

    [ 96%] Building C object src/conv/CMakeFiles/g-dot.dir/g-dot.c.o
    Linking C executable ../../bin/bot_dump
    Linking C executable ../../bin/g-dot
    ../../lib/libged.so.20.0.1: undefined reference to `typeinfo for Avoid::Obstacle'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Polygon::at(unsigned long) const'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::ShapeConnectionPin::ShapeConnectionPin(Avoid::ShapeRef*, unsigned int, double, double, double, unsigned int)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::ConnEnd::ConnEnd(Avoid::ShapeRef*, unsigned int)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Obstacle::polygon() const'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::ConnEnd::~ConnEnd()'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Point::Point(double, double)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Polygon::empty() const'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::ConnRef::displayRoute()'
    ../../lib/libged.so.20.0.1: undefined reference to `typeinfo for Avoid::ShapeRef'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::VertID::VertID(unsigned int, unsigned short, unsigned short)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::ShapeRef::polygon() const'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::ConnRef::setCallback(void (*)(void*), void*)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::ShapeRef::ShapeRef(Avoid::Router*, Avoid::Polygon&, unsigned int)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::ConnRef::ConnRef(Avoid::Router*, Avoid::ConnEnd const&, Avoid::ConnEnd const&, unsigned int)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Obstacle::id() const'
    ../../lib/libged.so.20.0.1: undefined reference to `vtable for Avoid::Polygon'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::VertID::PROP_OrthShapeEdge'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Router::processTransaction()'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Polygon::clear()'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Router::setRoutingParameter(Avoid::RoutingParameter, double)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Polygon::id() const'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Router::moveShape(Avoid::ShapeRef*, Avoid::Polygon const&, bool)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Router::Router(unsigned int)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Rectangle::Rectangle(Avoid::Point const&, Avoid::Point const&)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::ConnRef::route() const'
    ../../lib/libged.so.20.0.1: undefined reference to `typeinfo for Avoid::Polygon'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Router::attachedShapes(std::list<unsigned int, std::allocator<unsigned int> >&, unsigned int, unsigned int)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Point::operator[](unsigned int)'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::PolygonInterface::offsetBoundingBox(double) const'
    ../../lib/libged.so.20.0.1: undefined reference to `Avoid::Polygon::size() const'

    Winston Wu

     
  • Tom Browder
    Tom Browder
    2013-04-04

    Before you do anything, make sure you are configuring and building OUTSIDE the BRL-CAD source tree. Also make sure you have the latest version of the source (or at least BRL-CAD revision 54992).

    Then, did you get my adaptagrams version, configure it, uninstall the previous version, build it, and install it? And then, do you have at least BRL-CAD revision 54992?

    Make sure you delete EVERYTHING in the build (which should be OUTSIDE the BRL-CAD svn tree) directory and do a clean configure.

    For instance, I have a directory I call "/disk3/extsrc/brlcad-svn-trunk" and also, at the same level a build directory I call "/disk3/extsrc/brlcad-build". Then I cd to the build directory and do my configuring and building:

    cd /disk3/extsrc/brlcad-build
    rm -rf *
    cmake ../brlcad-svn-trunk [your configure options if desired]