两种办法解决 make: Warning: File "xxx" has modification time yyy s in the future 的问题
出现该问题原因
报错的文件的时间在系统时间的未来,导致make无法编译通过。
解决办法:
1. 在非双系统中的解决办法,参考下面的:find /your/dir -type f -exec touch {} +
2. 在双系统中的彻底解决方法:将 win 或 Linux OS 对 BIOS 的时间解释格式,修改成一致。
在双系统中,对 BIOS 中的时间解释,win 与 Linux 是不一样的;相差 8个小时。
当在 Linux 修改了源文件,接着(8小时之内)在 win 下进行编译,这时就会出现这个错误。
参考如下文章:
ubuntu与windows:双系统切换后系统时间错乱问题解决 https://blog.csdn.net/ken2232/article/details/136780346
-----------------------------------------------------------
参考:
Ubuntu 安装 NTP 服务 https://zhuanlan.zhihu.com/p/384218607
ubuntu安装和使用NTP https://blog.csdn.net/qishi_blog/article/details/52793206
如何在 Linux 上安装、配置 NTP 服务器和客户端?https://zhuanlan.zhihu.com/p/64594789
NTP的工作原理以及工作模式 https://zhuanlan.zhihu.com/p/106069365
Qt编译时出现:File “xxx“ has modification time yyy s in the future 双系统,Qt编译时出现:File “xxx“ has modification time yyy s in the future-CSDN博客
===================================
QT编译,一直循环报错:file“xxxxx”has modification times xxxxx s in the future..
这是因为一个项目从一个电脑拷贝的到另一个电脑上时,两个电脑的时钟不一致所致,修改一下项目所在目录的修改时间即可:
find /your/dir -type f -exec touch {} +
然后再重新编译。
参见:http://stackoverflow.com/questions/23281050/makefile-warning-warning-file-main-cpp-has-modification-time-2-1e04-s-in-th
原文链接:https://blog.csdn.net/w1019220367/article/details/70161645
Qt编译时出现 has modification time in the future
Qt编译文件时,常常遇到has modification time in the future问题,归根结底是Qt工程文件时间与系统不相符,看过几篇博客,发现写的指令没有那么规范
当遇到这种问题,有两种方法解决,
1、通过更改系统时间解决
这里就是把系统时间更改为Qt工程之后的时间,需要知道工程时间,并且将系统时间改到工程时间之后的某个时间。
2、通过更改Qt工程的时间
之前遇到该问题也看了几篇博客 发现一些命令写的没那么规范,正确的指令如下:
find XXX -type f -exec touch {} +
xxx是Qt工程的所在路径
这个方法比较快。
————————————————
原文链接:https://blog.csdn.net/qq_17769915/article/details/132763425
两种办法解决 make: Warning: File "xxx" has modification time yyy s in the future 的问题
https://blog.csdn.net/qq_45156819/article/details/120543055
出现该问题原因
报错的文件的时间在系统时间的未来,导致make无法编译通过。
如果系统时间是现实时间
解决:打开报错文件,随意更改一些内容并保存,恢复内容在保存。
如果系统时间不是现实时间
解决:
date -s 2021-09-29
date -s 10:08:00
更改系统时间,使系统时间在报错文件的时间之后。
二、解决 https://blog.csdn.net/u012814856/article/details/99873057
没有 root 权限还有另一个办法,就是在你每次往服务端上传了文件之后,执行:
$ touch *
这样,就可以以服务端的时间修改所有文件的文件戳,这样就不会出现 make 报错的问题了 T_T
find ./ -type f |xargs touch
======