facebook / watchman

Watches files and records, or triggers actions, when they change.
https://facebook.github.io/watchman/
MIT License
12.57k stars 986 forks source link

Build fails on Ubuntu 22.04 #1047

Closed floratmin closed 1 year ago

floratmin commented 2 years ago

I tried to build watchman but the build fails with:

[53/213] Building Rust executable 'watchmanctl'...
FAILED: watchman/cli/CMakeFiles/watchmanctl.cargo watchman/cli/debug/watchmanctl watchman/cli/release/watchmanctl 
cd /home/florian/Downloads/watchman/watchman/cli && /tmp/fbcode_builder_getdeps-ZhomeZflorianZDownloadsZwatchmanZbuildZfbcode_builder/installed/cmake-qU6QoPESYZej5AcCTHDEVvZkEMvpc5Lijp-LQSq8PeE/bin/cmake -E remove -f /home/florian/Downloads/watchman/watchman/cli/Cargo.lock && /tmp/fbcode_builder_getdeps-ZhomeZflorianZDownloadsZwatchmanZbuildZfbcode_builder/installed/cmake-qU6QoPESYZej5AcCTHDEVvZkEMvpc5Lijp-LQSq8PeE/bin/cmake -E env CARGO_TARGET_DIR=/tmp/fbcode_builder_getdeps-ZhomeZflorianZDownloadsZwatchmanZbuildZfbcode_builder/build/watchman/watchman/cli cargo build --release -p watchmanctl
No such file or directory
[67/213] Building CXX object CMakeFiles/pendingcollection.t.dir/watchman/test/PendingCollectionTest.cpp.o
ninja: build stopped: subcommand failed.
Command '['/tmp/fbcode_builder_getdeps-ZhomeZflorianZDownloadsZwatchmanZbuildZfbcode_builder/installed/cmake-qU6QoPESYZej5AcCTHDEVvZkEMvpc5Lijp-LQSq8PeE/bin/cmake', '--build', '/tmp/fbcode_builder_getdeps-ZhomeZflorianZDownloadsZwatchmanZbuildZfbcode_builder/build/watchman', '--target', 'install', '--config', 'Release', '-j', '16']' returned non-zero exit status 1.
!! Failed
micaelgomes commented 2 years ago

I had same issue, so I purged watchman installed from the source and get package from apt, using: sudo apt -y install watchman

stewartmatheson commented 1 year ago

I'm having the same issue running ubuntu on WSL. I'm running the autogen.sh script.

jeffryang24 commented 1 year ago

Maybe you can try manually installing the missing libcrypto.so.1.1 lib from libssl1.1 package before running watchman cli. See https://github.com/facebook/watchman/issues/1019#issuecomment-1263343842. Hopefully, it solves your problem too :bow:

chadaustin commented 1 year ago

We now automatically generate Ubuntu 22.04 debs. You can download and install them with the new installation instructions at https://facebook.github.io/watchman/docs/install.html

I recommend against the Ubuntu-provided package, because it's missing security fixes.

I think the specific build error you're seeing is that cargo is not installed so the Rust components fail to build. If you install Rustup via https://rustup.rs/ it should work.

I'll close this for now, and add a better error message if cargo is not available.

jose8a commented 1 year ago

There are zero Ubuntu 22 debs at the latest release link. I've been trying to install from source and keep running into errors. I will probably just use the Ubuntu-provided ones since I'm left without any other current choices. If the debs are now elsewhere than in the release link that is provided, then please advise. Thanks!