From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by sourceware.org (Postfix) with ESMTPS id CDC05386F02B for ; Wed, 22 Apr 2020 04:04:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CDC05386F02B Received: by mail-lj1-x22f.google.com with SMTP id b2so770940ljp.4 for ; Tue, 21 Apr 2020 21:04:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Cf4l/4tlwuJlJNYsyk8EHOkRu9iSe5x9RBAc2ft4tzw=; b=WVaW4L8ROUTn6NrghK69wpdT4nJDHuX8z2d1tUdKc0DS5BCy6ueISq+hsDKTNdJcCl 4U0iHrO/U5MXkp0cUx+iJ0X6BJUKGLUn1346QIof+rUIO3ASJWtNtzATW4xVNieNQkt1 BWyNHs4YBC46Ya04asaIOVhMv7eHb9roxy54L32S9Tbvk/KTCKv/U2GGqGHGRpLGJpx4 KsSM5z8mhf2uTLYoAHmCqMr8ceW0HTQK3JszRJLiXehPey2nk8prSeY+QBGaB7gp3B+0 a2w8PoX3H8SsQqhWnJldueqAu16uyF2oTZa4wsg81KH7freCfSRvqHENrU1Co/m7EdtP h4VA== X-Gm-Message-State: AGi0PuYHnQ44bCmLJ4vLe9wfKIgTLg/BSps0dp4jiAVPlFQNBdca0AFT Rsm9tt6dp+tTzNWGcsdI64ASRmkCKLIb5Vr64QMsQ4qk X-Google-Smtp-Source: APiQypIZ9q5ZBfGVVzoImZnghB0I672dW2yzdq/l0pVBCrJL9gCzi4JWOJxw2EgKqCJR3l1nLk10xARbIGul3kLpyqI= X-Received: by 2002:a2e:80cc:: with SMTP id r12mr6479219ljg.269.1587528275518; Tue, 21 Apr 2020 21:04:35 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Kaushal Modi Date: Wed, 22 Apr 2020 00:03:58 -0400 Message-ID: Subject: Re: Help figuring out why nim gives the "collect2: fatal error: can't open nm output" error with older gcc versions To: gcc-help@gcc.gnu.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 04:04:38 -0000 On Tue, Apr 21, 2020 at 11:59 PM Kaushal Modi wrote: > Hello, > > I use gcc to compile the C/C++ code generated by Nim ( > https://nim-lang.org/). > > Nim has a feature where it can read in the nim code via pipe. So I can do > > echo echo NimVersion | nim c -r - > I forgot to add an observation here. Above should create an executable named stdinfile in the /tmp cache dir ($XDG_CACHE_HOME) and then run it. Even though above fails with the "can't open nm output" fatal error, gcc does actually end up compiling the stdinfile, which I can then manually run and it runs fine. The issue is that when nim is compiling that executable via gcc and then running it, this fatal error happens somewhere inbetween.