You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a version mismatch issue while building uftrace from source. After compiling and installing, the uftrace --version command displayed the following:
This was unexpected since the most recent version is v0.17. Upon investigation, I found that misc/version.sh appears to derive the version number from the most recent git tag.
Root Cause:
It seems that misc/version.sh uses the most recent tag to extract the version number. If the local git repository is not updated with the latest tags, the script cannot determine the correct version.
Resolution:
Running the following command resolved the issue:
git pull origin master --tags
make clean
make
sudo make install
After this, the correct version number was displayed.
Suggestion:
To avoid confusion for other users, it might be helpful to:
Add a note in the build instructions recommending users to fetch tags with git pull origin master --tags before building.
Consider handling this scenario in misc/version.sh by displaying a message if tags are outdated or missing.
Closing Remarks:
I understand this is a minor issue, but addressing it could help others avoid similar confusion. Thank you for maintaining such an excellent tool!
The text was updated successfully, but these errors were encountered:
I think git pull fetches tags by default. Maybe you pulled the code before I pushed the v0.17 tag and it didn't rebuild the code because nothing is changed. I thought I make misc/version.sh to generate a new version.h file when it sees a new tag. But it doesn't seem to work properly.
I recently noticed that git pull fetches tags by default, whereas git pull origin master does not automatically fetch tags unless you use the --tags option. This was a small oversight on my part, but I hope this clarification can be helpful to others.
For the --version command to work as expected, it's important to use git pull instead of git pull origin master. I hope this helps others!
If you’d like, you could consider modifying misc/version.sh to include git fetch --tags as an enhancement, or something similar.
This issue is unlikely to occur in most cases, so it might be fine to close it.
Issue Description:
I encountered a version mismatch issue while building uftrace from source. After compiling and installing, the
uftrace --version
command displayed the following:This was unexpected since the most recent version is v0.17. Upon investigation, I found that
misc/version.sh
appears to derive the version number from the most recent git tag.Root Cause:
It seems that
misc/version.sh
uses the most recent tag to extract the version number. If the local git repository is not updated with the latest tags, the script cannot determine the correct version.Resolution:
Running the following command resolved the issue:
After this, the correct version number was displayed.
Suggestion:
To avoid confusion for other users, it might be helpful to:
git pull origin master --tags
before building.misc/version.sh
by displaying a message if tags are outdated or missing.Closing Remarks:
I understand this is a minor issue, but addressing it could help others avoid similar confusion. Thank you for maintaining such an excellent tool!
The text was updated successfully, but these errors were encountered: