在远程Linux机器上编译C ++ - “检测到时钟偏移”警告 [英] Compiling C++ on remote Linux machine - "clock skew detected" warning

查看:214
本文介绍了在远程Linux机器上编译C ++ - “检测到时钟偏移”警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过PuTTY和WinSCP连接到我的大学的小型Linux群集,使用后者传输文件,并使用前者编译和运行它们。到目前为止,我的工作已在大学的实验室进行,但今天我在家里做了一些有趣的警告工作。

I'm connected to my university's small Linux cluster via PuTTY and WinSCP, transferring files using the latter and compiling and running them with the former. My work so far has been performed in the university's labs, but today I have been doing some work at home that generated an interesting warning.

我上传了一个文件夹并且在运行 make 命令时,我将其作为输出的最后一行:

I uploaded an entire folder of stuff and, upon running the make command, I get this as the last line of output:


make:warning:检测到时钟偏移。您的版本可能不完整。

make: warning: Clock skew detected. Your build may be incomplete.

生成的二进制文件可以正常工作,并且在构建中似乎没有任何其他意外错误过程。

The resulting binary works correctly, and there doesn't seem to be any other unexpected errors in the build process.

我似乎能够通过在上传一些新的/替换文件后进行构建来触发错误(我在本地编辑所有内容,然后上传新版本)不知道它是否是一样简单的不匹配的文件修改时间?还是更关心的?

I seem to be able to trigger the error by building after uploading some new / replacement files (I edit everything locally then upload the new version), so I'm wondering if it's something just as simple as mismatched file modification times? Or something more concerning?

那么,我应该担心吗?

So, should I be worried? How do I fix/prevent this?

推荐答案

该消息通常表明您的某些文件的修改时间晚于当前系统时间。由于 make 在执行增量构建时通过检查源文件是否比其目标文件更新最近来决定要编译哪些文件,因此这种情况可能导致构建不必要的文件

That message is usually an indication that some of your files have modification times later than the current system time. Since make decides which files to compile when performing an incremental build by checking if a source files has been modified more recently than its object file, this situation can cause unnecessary files to be built, or worse, necessary files to not be built.

但是,如果你从头开始构建(不是做增量构建),你可以可能会忽略此警告,而不会产生后果。

However, if you are building from scratch (not doing an incremental build) you can likely ignore this warning without consequence.

这篇关于在远程Linux机器上编译C ++ - “检测到时钟偏移”警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆