Bug 29668 - The make rpm target broken
Summary: The make rpm target broken
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: releng (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-11 12:14 UTC by Martin Cermak
Modified: 2022-10-11 14:43 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
Project(s) to access:
ssh public key:


Attachments
possible patch (1.21 KB, patch)
2022-10-11 12:14 UTC, Martin Cermak
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Cermak 2022-10-11 12:14:46 UTC
Created attachment 14392 [details]
possible patch

The recent git_version related updates (a73db1bdee, 2899dcf6a5) break the `make rpm` target.   Thing is that git_version.sh doesn't find a git repo, and generates:

/* No git repo found, probably building from dist tarball */
#undef GIT_REPO

Which, in this case, is a false assumption implicitly causing the following build time error:

In file included from session.cxx:25:
session.cxx: In member function 'std::string systemtap_session::version_string()':
version.h:13:49: error: 'GIT_PRETTY_REV' was not declared in this scope
   13 |   (STAP_EXTRA_VERSION[0] ? STAP_EXTRA_VERSION : GIT_PRETTY_REV)
      |                                                 ^~~~~~~~~~~~~~
session.cxx:492:62: note: in expansion of macro 'STAP_EXTENDED_VERSION'
  492 |   return string (VERSION) + "/" + elfutils_version2 + ", " + STAP_EXTENDED_VERSION;
      |                                                              ^~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:1216: stap-session.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/stapbuilduser/rpmbuild/BUILD/systemtap-4.8'
make[2]: *** [Makefile:2135: all-recursive] Error 1
make[2]: Leaving directory '/home/stapbuilduser/rpmbuild/BUILD/systemtap-4.8'
make[1]: *** [Makefile:800: all] Error 2
make[1]: Leaving directory '/home/stapbuilduser/rpmbuild/BUILD/systemtap-4.8'
error: Bad exit status from /var/tmp/rpm-tmp.EAV0bE (%build)
Comment 1 Martin Cermak 2022-10-11 14:43:59 UTC
Fixed in commit 8718a929aec6a815f0d61a4387ae74d9c2bfe88b