From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: "C. David Whiteman" <davidwhiteman@mac.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Compiler problem with gfortran
Date: Sun, 24 Apr 2022 18:19:42 +0100 [thread overview]
Message-ID: <CAH6eHdR9V82ZVeYVkOS5Wnbf0FzZ16+YSNRDM7X1eHrf_Mi0-Q@mail.gmail.com> (raw)
In-Reply-To: <CAH6eHdTNo5XB-UKY8jxanrW=cq6o9eUQw0OsFwKTh1yEy3i-zQ@mail.gmail.com>
On Sun, 24 Apr 2022, 18:15 Jonathan Wakely, <jwakely.gcc@gmail.com> wrote:
>
>
> On Sun, 24 Apr 2022, 17:59 C. David Whiteman via Gcc-help, <
> gcc-help@gcc.gnu.org> wrote:
>
>> Am having some trouble compiling a simple fortran program on my M1
>> MacBook Air. I am using the latest MacOS, Monterey 12.3.1, and the latest
>> version of Xcode. I installed Homebrew and gcc to update my old version of
>> gfortran. The fortran program on my desktop will compile when I use the
>> command gfortran -c skippy.f, producing the executable file skippy.o
>
>
> That's not an executable file, it's an object file. You used the -c option
> which says to stop after compilation and not link the object into an
> executable.
>
> If you remove the -c option you'll get an executable.
>
Oh but I see that when you tried that you got an error due to -lSystem
being absent.
That's not a gfortran library, so it looks like you need to install some
additional packages on your Mac. Maybe the xcode command line tools or
something.
>
>
>
> on my desktop. But I can’t get the executable file to run. I am an amateur
>> and am really not that familiar with the unix commands, etc. Can someone
>> give me some advice on this? Thanks.
>>
>> -Dave
>>
>> ~/Desktop 519 $ gfortran -o skippy.f
>> gfortran: fatal error: no input files; unwilling to write output files
>> compilation terminated.
>> ~/Desktop 520 $ gfortran -c skippy.f
>> ~/Desktop 521 $ ./skippy.o
>> -bash: ./skippy.o: Permission denied
>> ~/Desktop 522 $ gfortran skippy.f
>> ld: library not found for -lSystem
>> collect2: error: ld returned 1 exit status
>> ~/Desktop 523 $ g77 skippy.f
>> -bash: g77: command not found
>> ~/Desktop 524 $
>
>
next prev parent reply other threads:[~2022-04-24 17:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-24 16:58 C. David Whiteman
2022-04-24 17:15 ` Jonathan Wakely
2022-04-24 17:19 ` Jonathan Wakely [this message]
[not found] ` <546813AC-1859-4DCC-A8CA-74F3CC0E4F83@mac.com>
2022-04-24 18:01 ` Jonathan Wakely
2022-04-24 18:32 ` Iain Sandoe
[not found] ` <EF85E3DB-4263-4266-9DCC-76E75ADF0C7B@mac.com>
[not found] ` <D6936E54-88C0-4E7E-AA85-38A478BF77E9@mac.com>
2022-04-24 19:20 ` Iain Sandoe
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=CAH6eHdR9V82ZVeYVkOS5Wnbf0FzZ16+YSNRDM7X1eHrf_Mi0-Q@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=davidwhiteman@mac.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).