ninja-build / ninja

a small build system with a focus on speed
https://ninja-build.org/
Apache License 2.0
11.31k stars 1.61k forks source link

ninja: error: manifest 'build.ninja' still dirty after 100 tries #1599

Open kangwang1988 opened 5 years ago

kangwang1988 commented 5 years ago

I tried to build fuchsia on my macOS 10.15beta, xcode11.0 beta2 following instructions provided on https://fuchsia.dev/fuchsia-src/getting_started

However, I'm continuously meeting

ninja: error: manifest 'build.ninja' still dirty after 100 tries

How can I resolve this issue?

More log is given below:

(base) kylewong@KyleWongs-MacBook-Pro fuchsia % fx set core.x64 --release

WARNING: Please opt in or out of fx metrics collection.
You will receive this warning until an option is selected.
To check what data we collect, run `fx metrics`
To opt in or out, run `fx metrics <enable|disable>

Generating compile_commands took 463ms
Done. Made 28104 targets from 2274 files in 12455ms
(base) kylewong@KyleWongs-MacBook-Pro fuchsia % 
(base) kylewong@KyleWongs-MacBook-Pro fuchsia % fx build
WARNING: Please opt in or out of fx metrics collection.
You will receive this warning until an option is selected.
To check what data we collect, run `fx metrics`
To opt in or out, run `fx metrics <enable|disable>

ninja: Entering directory `/Users/kylewong/Codes/fuchsia/out/default.zircon'
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
[1/1] Regenerating ninja files
ninja: error: manifest 'build.ninja' still dirty after 100 tries
zhihaoy commented 5 years ago

Encountered a similar issue. On Travis OSX CI, Ninja occasionally (1 out of 10?) unnecessarily runs CMake right after cmake initial configuration, and runs 100 times.

alankdkd commented 5 years ago

I have this problem too. No clue how to fix. Buggy software.

zhihaoy commented 5 years ago

It may be Mac OS X is buggy :) But anyhow, this hurts us. We temporarily switched to Make in CI.

a1158420056 commented 5 years ago

I have the same problem on Centos 7

guruhb commented 5 years ago

Encountered same error on Ubuntu 18.04 while building OpenJFX ninja: error: manifest 'build.ninja' still dirty after 100 tries

Hirico commented 5 years ago

One possible reason is your project missing files.

In my case of building chromium, the same problem happened, but running "gclient sync" to get everything updated solved the issue.

Whatever, it will be much better if the error messages of ninja are more informative.

ePirat commented 5 years ago

I'm experiencing the same issue on our macOS CI VM, randomly started to happen for one CI run while previously everything was fine. (Using Ninja 1.8.2)

alecrispino commented 5 years ago

i have the same problem

Ankele commented 5 years ago

我也遇到这样的问题,在fedora31下编译initramfs/systemd的时候出现的。I have the same problem while compiling initramfs/systemd in fedora31.有同学解决这个问题吗?麻烦指教,谢谢!Anyone solved this? Please tell me, thank you :)

hefengliang commented 4 years ago

i have the same problem

sneak commented 4 years ago

This bit me today on Linux.

ninja 1.9.0.git.kitware.dyndep-1.jobserver-1 from Gentoo portage.

sneak commented 4 years ago

The time was two months behind on the build system. Fixing the system time fixed the build error. Make sure your systems are synchronized.

sutra commented 3 years ago

Try to sync you system time, then this maybe fixed.

AbelBlossom commented 3 years ago

Try to sync you system time, then this maybe fixed.

this works like charm

ghost commented 3 years ago

@sutra thank you works for me!!

KungFuDonkey commented 2 years ago

I was using CLion on Linux, by removing the cmake-build folders and the .idea and reopening the project I was able to fix this

andogy commented 2 years ago

same problem on windows10

c-a-h commented 1 year ago

I recently ran into this using WSL and the cross-platform project option in Visual Studio. Someone mentioned syncing the system time, and when I checked the system time on my Debian VM, it was way out of date, almost as if the system clock had stopped. Once I synced the system time on the VM, this was resolved. Timestamps are of course not always a perfect proxy for the state of a file, which Ninja is relying on for some validation of file state.

sagunkho commented 1 year ago

I have the same issue, I have synchronized the system time. VCPKG fails to build.

fr33k3v1n0 commented 1 year ago

I have the same problem with my flutter Project

thiagorm28 commented 1 year ago

In my case, my computer time was late, I just set it to the right time and tried again. then it worked

liudf0716 commented 1 year ago

Try to sync you system time, then this maybe fixed.

sudo ntpdate pool.ntp.org

seltsamonkel commented 8 months ago

Recently encounted this issue on Windows 11 + WSL2 (Ubuntu). Touched all the files in the source directory. After that it all worked.

heipiao233 commented 7 months ago

I have this problem when building Poppler for installing KDE Plasma desktop on Gentoo. I'm sure that my system time is correct.

scetayh commented 4 months ago

[SOLVED] Same error was reported when I was compiling dev-util/glslang with Gentoo emerge.

ninja: error: manifest 'build.ninja' still dirty after 100 tries, perhaps system time is not set
 * ERROR: dev-util/glslang-1.3.283.0::gentoo failed (compile phase):
 *   ninja -v -j8 -l8 failed
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_compile
 *   environment, line 3417:  Called cmake-multilib_src_compile
 *   environment, line 1166:  Called multilib-minimal_src_compile
 *   environment, line 2358:  Called multilib_foreach_abi 'multilib-minimal_abi_src_compile'
 *   environment, line 2625:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2318:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile'
 *   environment, line 2316:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile'
 *   environment, line  511:  Called multilib-minimal_abi_src_compile
 *   environment, line 2352:  Called multilib_src_compile
 *   environment, line 2845:  Called cmake_src_compile
 *   environment, line 1284:  Called cmake_build
 *   environment, line 1251:  Called eninja
 *   environment, line 1726:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "${*} failed"
 *
 * If you need support, post the output of `emerge --info '=dev-util/glslang-1.3.283.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-util/glslang-1.3.283.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-util/glslang-1.3.283.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-util/glslang-1.3.283.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-util/glslang-1.3.283.0/work/glslang-vulkan-sdk-1.3.283.0_build-.arm64'
 * S: '/var/tmp/portage/dev-util/glslang-1.3.283.0/work/glslang-vulkan-sdk-1.3.283.0'

A proper method to solve the problem is to run date -d "2050/1/1 20:00:00", etc to switch your system time to the future, and you will find the error disappear.