ros-overlay icon indicating copy to clipboard operation
ros-overlay copied to clipboard

gpsd_client does not emerge due to isnan not being declared

Open flabrosse opened this issue 7 years ago • 13 comments

All,

Trying to emerge ros-lunar/gpsd_client and that fails:

[ 50%] Building CXX object CMakeFiles/gpsd_client.dir/src/client.cpp.o /usr/bin/x86_64-pc-linux-gnu-g++ -DROSCONSOLE_BACKEND_LOG4CXX -DROS_PACKAGE_NAME=\"gpsd_client\" -I/opt/ros/lunar/include -I/opt/ros/lunar/share/xmlrpcpp/cmake/../../../include/xmlrpcpp -DNDEBUG -march=native -mtune=native -O2 -pipe -std=c++11 -std=c++11 -o CMakeFiles/gpsd_client.dir/src/client.cpp.o -c /var/tmp/portage/ros-lunar/gpsd_client-0.1.9/work/gpsd_client-0.1.9/src/client.cpp /var/tmp/portage/ros-lunar/gpsd_client-0.1.9/work/gpsd_client-0.1.9/src/client.cpp: In member function ‘void GPSDClient::process_data_gps(gps_data_t*)’: /var/tmp/portage/ros-lunar/gpsd_client-0.1.9/work/gpsd_client-0.1.9/src/client.cpp:141:82: error: ‘isnan’ was not declared in this scope if ((p->status & STATUS_FIX) && !(check_fix_by_variance && isnan(p->fix.epx))) { ^ (layout above a bit messed up...).

gcc then suggests two alternatives, one from std, the other from boost.

This package installs fine on ubuntu. maybe they have patched it? This is using gcc 5.4.0.

Cheers,

Fred

flabrosse avatar Nov 14 '17 19:11 flabrosse

Maybe a patch like this one will suffice.

I'll try that when I get a few minutes.

allenh1 avatar Nov 14 '17 19:11 allenh1

I guess that would. Worth reporting that to ROS?

flabrosse avatar Nov 15 '17 11:11 flabrosse

That's definitely worth reporting upstream. It's a trivial fix that should work on any platform. The newer gcc's are just stricter and require more explicit includes.

tfoote avatar Nov 15 '17 19:11 tfoote

This has apparently been fixed. When is a new package likely to be produced?

flabrosse avatar Nov 27 '17 19:11 flabrosse

When is a new package likely to be produced?

The new package will be produced whenever they re-release the package. Superflore will pull it in automatically when the new version is added to rosdistro.

allenh1 avatar Nov 28 '17 19:11 allenh1

@flabrosse If you want the package sooner, you can also try and add just the fix they made in their PR to the overlay. The patch can be found here.

I am working on documenting this kind of use case in Superflore at the moment, and some feedback there would be beyond useful! The proposed README is located here.

allenh1 avatar Nov 29 '17 16:11 allenh1

Coming back to that... I'm pretty sure I have seen a new gpsd_client ubuntu package (on my laptop) since, but no gentoo package, and what I currently have (upgraded today) still does not compile.

So I looked at superflore. Which gentoo package does "docker" refer to? Is it app-emulation/docker?

flabrosse avatar Dec 19 '17 16:12 flabrosse

Coming back to that... I'm pretty sure I have seen a new gpsd_client ubuntu package (on my laptop) since, but no gentoo package, and what I currently have (upgraded today) still does not compile.

Interesting... I'll look into this.

Which gentoo package does "docker" refer to? Is it app-emulation/docker?

Yes.

allenh1 avatar Dec 19 '17 16:12 allenh1

@flabrosse update: I figured it out (as you can see in the PR referenced above).

Once superflore spits out the updates, I'll @-mention you in the PR.

allenh1 avatar Dec 19 '17 17:12 allenh1

OK, installed it. Thanks!

Just one point, I'm not sure if that is me (having to go through a proxy using an ssh tunnel) or a problem with file names, but I was struggling to find the tar.gz file using the ebuild. I finally downloaded it by hand, put it in /usr/portage/distfiles guessing the correct name (from the empty file being created) and it then all worked.

flabrosse avatar Dec 20 '17 16:12 flabrosse

Just one point, I'm not sure if that is me (having to go through a proxy using an ssh tunnel) or a problem with file names, but I was struggling to find the tar.gz file using the ebuild.

I'm going to venture out and say that you were having a proxy issue, since superflore downloads the tar when it generates the manifest.

@tfoote would probably know more about this.

allenh1 avatar Dec 20 '17 20:12 allenh1

That does sound like we're not catching the failure to fetch via a proxy appropriately if we're writing out an empty file. If you can document how to reproduce that issue it would be great to ticket it specifically.

tfoote avatar Dec 20 '17 23:12 tfoote