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

本文介绍了解决在使用make编译项目时出现的'Clockskew detected'警告的方法。此警告通常由文件创建或修改时间与操作系统时间不一致引起,常见于虚拟机共享文件夹场景。文章提供了两种解决方案:一是调整Linux系统时间,二是使用touch命令同步文件时间戳。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天使用make编译项目时,终端提示:

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

大概是时间不对,文件创建修改的时间比操作系统时间超前了,这是由于在virtrualbox共享文件夹造成的,怎么解决尼?要确保操作系统时间大于文件修改时间!
1、修改linux操作系统时间

date —— 查询当前系统时间
date -s 9/15/2018 —— 修改日期
date -s 11:36:59 —— 命令可以修改系统时间

2、过滤文件使用touch命令同步时间戳

find . -type f | xargs -n 5 touch

在WSL中编译C程序出现编译警告 root@DESKTOP-2QBDJV0:/mnt/d/work/openeuler_env/code/testUsbDongleRFID_pro# ./script/build.sh -- The C compiler identification is GNU 10.3.1 -- The CXX compiler identification is GNU 10.3.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /mnt/d/work/openeuler_env/oecore-x86_64/sysroots/x86_64-peesdk-linux/usr/bin/aarch64-powereuler-linux-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /mnt/d/work/openeuler_env/oecore-x86_64/sysroots/x86_64-peesdk-linux/usr/bin/aarch64-powereuler-linux-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /mnt/d/work/openeuler_env/code/testUsbDongleRFID_pro/build make: Warning: File 'Makefile' has modification time 0.31 s in the future make[1]: Warning: File 'CMakeFiles/Makefile2' has modification time 0.28 s in the future make[2]: Warning: File 'CMakeFiles/run_testUsbDongleRFID.dir/flags.make' has modification time 0.21 s in the future make[2]: warning: Clock skew detected. Your build may be incomplete. make[2]: Warning: File 'CMakeFiles/run_testUsbDongleRFID.dir/flags.make' has modification time 0.17 s in the future [ 50%] Building C object CMakeFiles/run_testUsbDongleRFID.dir/main.c.o /mnt/d/work/openeuler_env/code/testUsbDongleRFID_pro/main.c: In function 'main': /mnt/d/work/openeuler_env/code/testUsbDongleRFID_pro/main.c:121:5: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result] 121 | write(fd, command, strlen(command)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [100%] Linking C executable run_testUsbDongleRFID make[2]: warning: Clock skew detected. Your build may be incomplete. [100%] Built target run_testUsbDongleRFID make[1]: warning: Clock skew detected. Your build may be incomplete. make: warning: Clock skew detected. Your build may be incomplete.
最新发布
06-12
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

是嗨森啦

如果文章还不错,欢迎点赞收藏~

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值