Code Monkey home page Code Monkey logo

Comments (6)

jack-oquin avatar jack-oquin commented on August 27, 2024

I am working on this package now, trying to get it ready for an indigo release.

It currently fails some unit tests on Trusty.

from geographic_info.

jack-oquin avatar jack-oquin commented on August 27, 2024

The failure seems due to g++ language incompatibilities on Trusty.

from geographic_info.

mikepurvis avatar mikepurvis commented on August 27, 2024

I've reproduced the issue on my Trusty VM. The test context is:

      geodesy::UTMPoint pt1(e, n, alt, z, b);
      geographic_msgs::GeoPoint ll;
      convert(pt1, ll);
      geodesy::UTMPoint pt2;
      convert(ll, pt2);

Where the troublesome convert function is templated on both arguments:

  template <class From, class To>
  void convert(const From &from, To &to)
  {
    fromMsg(toMsg(from), to);
  }

The prototypes for UTMPoint -> GeoPoint are in utm.h. It seems odd to me that the compile insists the prototypes be defined in advance of convert function, or at least that's my interpretation of the "xxxx declared here, later in the translation unit" message. Doubly odd that this is something which has changed between GCC versions.

from geographic_info.

mikepurvis avatar mikepurvis commented on August 27, 2024

Here it is, under "Name Lookup Changes": https://gcc.gnu.org/gcc-4.7/porting_to.html

I've fooled around with it for a bit, but I'm pretty stumped— short of adding -fpermissive, it seems like the only way to fix this would be a refactor that moves the convert functions out to a separate header which has to be included after all the toMsg/fromMsg functions you intend to use it with have already been declared.

I'm certain I'm not really understanding it, though.

from geographic_info.

dirk-thomas avatar dirk-thomas commented on August 27, 2024

Both functions (convert and fromMsg) are using each other. Do the following to resolve the compiler error:

  • change the two templated convert functions to be declarations only
  • move the definition of these to the end of the file (at least behind the definition of fromMsg and toMsg)

from geographic_info.

jack-oquin avatar jack-oquin commented on August 27, 2024

Fixed by @mikepurvis with help from you, @dirk-thomas.

Thanks!

from geographic_info.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.