Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback message if unable to get git revision #141

Closed
wants to merge 1 commit into from

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Jul 30, 2020

This is a proposal to fix http://build.ros.org/job/Nbin_uF64__ypspur__ubuntu_focal_amd64__binary/5/ which is appears to be the cause of a failure to build packages for ros-noetic-ypspur and ros-noetic-ypspur-ros. I have not tested this change locally, but some fix needs to be released to ROS Noetic so these packages are still available in the next Noetic sync. Please take a look as soon as possible, ideally before tomorrow.

This patch:

  • Uses -C <path> when calling git rev-parse
  • Sets failure message when unable to get a git revision

It looks like the generated config.h has a value for PROJECT_VERSION that contains a newline.

#ifndef __CONFIG_H__
#define __CONFIG_H__

#define PROJECT_VERSION "1.17.1 (fatal: not a git repository (or any parent up to mount point /tmp)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).)"

#define YP_VENDOR_NAME "OpenSpur.org"

#define YP_PRODUCT_NAME "Yamabico Project - Spur"

#define YP_PROTOCOL_NAME "YPP:11:05"

#define YP_PARAMS_DIR "robot-params"

/* #undef HAVE_SSM */

#define HAVE_LONGJMP 1

#define HAVE_SIGLONGJMP 1

#endif

Resulting in this compile error.

/tmp/binarydeb/ros-noetic-ypspur-1.18.1/obj-x86_64-linux-gnu/include/config.h:4:25: warning: missing terminating " character
    4 | #define PROJECT_VERSION "1.17.1 (fatal: not a git repository (or any parent up to mount point /tmp)
      |                         ^
/tmp/binarydeb/ros-noetic-ypspur-1.18.1/obj-x86_64-linux-gnu/include/config.h:5:1: error: unknown type name ‘Stopping’
    5 | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).)"
      | ^~~~~~~~
/tmp/binarydeb/ros-noetic-ypspur-1.18.1/obj-x86_64-linux-gnu/include/config.h:5:13: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘filesystem’
    5 | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).)"
      |             ^~~~~~~~~~
/tmp/binarydeb/ros-noetic-ypspur-1.18.1/obj-x86_64-linux-gnu/include/config.h:5:13: error: unknown type name ‘filesystem’
/tmp/binarydeb/ros-noetic-ypspur-1.18.1/obj-x86_64-linux-gnu/include/config.h:5:76: warning: missing terminating " character
    5 | Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).)"
      |                                                                            ^
/tmp/binarydeb/ros-noetic-ypspur-1.18.1/obj-x86_64-linux-gnu/include/config.h:5:76: error: missing terminating " character
In file included from /tmp/binarydeb/ros-noetic-ypspur-1.18.1/src/adinput.c:38:
/tmp/binarydeb/ros-noetic-ypspur-1.18.1/include/shvel-param.h:28:3: warning: data definition has no type or storage class
   28 | } Int_4Char;
      |   ^~~~~~~~~
/tmp/binarydeb/ros-noetic-ypspur-1.18.1/include/shvel-param.h:28:3: warning: type defaults to ‘int’ in declaration of ‘Int_4Char’ [-Wimplicit-int]

I don't know what changed since there's been no yp-spur release since the last successful build. Maybe there's a newer version of git in Ubuntu Focal that has this new error message?

Proposal to fix http://build.ros.org/job/Nbin_uF64__ypspur__ubuntu_focal_amd64__binary/5/

Uses `-C <path>` when calling `git rev-parse`
Set failure message when unable to get a git revision
@sloretz
Copy link
Contributor Author

sloretz commented Jul 30, 2020

@at-wat - mind having a look?

@at-wat at-wat self-requested a review July 30, 2020 23:17
@at-wat
Copy link
Member

at-wat commented Jul 31, 2020

@sloretz Thank you for your PR!
I can reproduced the error locally by renaming .git directory, but the patch seems not working unfortunately.
I'm digging into this and will fix soon.

@at-wat
Copy link
Member

at-wat commented Jul 31, 2020

@sloretz merged with #142.
I'll create a new release asap.

Thank you for your help!

@at-wat at-wat closed this Jul 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants