facebook / facebook/watchman

`watchman --version` always return `0.0.0` when building from source

Open
#1,206 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

I'm on Fedora 39. I followed the [build from source instructions](https://facebook.github.io/watchman/docs/install#-building-from-source) and augmented them with the final steps of [prebuilt binaries](https://facebook.github.io/watchman/docs/install#prebuilt-binaries-2). Whenever I run `watchman --version` I get `0.0.0` instead of the actual version. How do I correct this? Do I need to add a `version.txt` file somewhere?

Commands that I ran:
```
# From build from source
WATCHMAN_VERSION="v2024.03.25.00"
WATCHMAN_BUILD_DIR="$(mktemp -d)"
cd $WATCHMAN_BUILD_DIR
wget "https://github.com/facebook/watchman/archive/refs/tags/$WATCHMAN_VERSION.tar.gz"
tar -xvzf "$WATCHMAN_VERSION.tar.gz"
cd "watchman-$(echo $WATCHMAN_VERSION | sed 's/v//g')"
sudo dnf install -y cargo
sudo ./install-system-packages.sh
./autogen.sh

# From prebuilt binaries
cd built
sudo mkdir -p /usr/local/{bin,lib} /usr/local/var/run/watchman
sudo cp bin/* /usr/local/bin
sudo cp lib/* /usr/local/lib
sudo chmod 755 /usr/local/bin/watchman
sudo chmod 2777 /usr/local/var/run/watchman

# Cleanup
cd "$HOME"
rm -rf $WATCHMAN_BUILD_DIR

# Version command that returns 0.0.0
watchman --version
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.