V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
VKRUSSIA
V2EX  ›  Linux

为什么 make 有时加上 -j 选项就不打印错误了,去掉就打印了?

  •  
  •   VKRUSSIA · Aug 29, 2021 · 2925 views
    This topic created in 1702 days ago, the information mentioned may be changed or developed.

    怎么才能不去掉-j 选项的前提下打印错误?

    4 replies    2021-09-05 14:39:19 +08:00
    matthewgao
        1
    matthewgao  
       Aug 29, 2021
    有点没能理解 我觉得反过来倒是很可能的
    seers
        2
    seers  
       Aug 29, 2021   ❤️ 1
    提供的信息可以得出加上-j 不会产生编译错误(doge
    pezy
        3
    pezy  
       Aug 29, 2021 via iPhone   ❤️ 6
    多核编译的时候,输出大概率是无序的,输出错误不会立刻停止,还会输出很多。一般人只看最后就容易找不到错误在哪。不加,严格按顺序,出错就立刻停止,比较明显。

    一般来说 C/C++编译器都有增量编译,你可以先用 -j,make 失败后想看错误是啥再来一次不带 -j 的即可很快看到。
    felixlong
        4
    felixlong  
       Sep 5, 2021
    说明你的 Makefile 依赖关系没写好。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3593 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 11:44 · PVG 19:44 · LAX 04:44 · JFK 07:44
    ♥ Do have faith in what you're doing.