public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kaushal Modi <kaushal.modi@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Re: Help figuring out why nim gives the "collect2: fatal error: can't open nm output" error with older gcc versions
Date: Wed, 22 Apr 2020 00:03:58 -0400	[thread overview]
Message-ID: <CAFyQvY1Yu6S6_pFsBjvrC7Rq=0PdU5=R6aRV8iqJjq+i3dhYYQ@mail.gmail.com> (raw)
In-Reply-To: <CAFyQvY3D1SaMrjkqSmaMRrb-RSPnMK9fvwCRnFXd_8717fEuog@mail.gmail.com>

On Tue, Apr 21, 2020 at 11:59 PM Kaushal Modi <kaushal.modi@gmail.com>
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.

      reply	other threads:[~2020-04-22  4:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22  3:59 Kaushal Modi
2020-04-22  4:03 ` Kaushal Modi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFyQvY1Yu6S6_pFsBjvrC7Rq=0PdU5=R6aRV8iqJjq+i3dhYYQ@mail.gmail.com' \
    --to=kaushal.modi@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).