From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by sourceware.org (Postfix) with ESMTPS id 813673858C50 for ; Sun, 24 Apr 2022 17:16:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 813673858C50 Received: by mail-wr1-x434.google.com with SMTP id q23so4921888wra.1 for ; Sun, 24 Apr 2022 10:16:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jswt/jFWtCjspf+w9sjdFdqSSrp6BmqA+a7lUgIozYw=; b=Ysez0nompPhr19I6HTk6+4nNTAAgSR6/t4rNZG8Oov6Qk47BG8M0svjqZ/Z4FTLEyb 6tOjOgXaDzd4lc+4bpVwdKSg+MSLKbAKLcY/ZvluOVoWywRUBpcptWSXaLjeJzoiXQL5 6Wz2yM9xyEyNOPUEQER2dxyZ4AbmscjpscFvgxyRu2EF7+46czLW5dvFec4kNEYysAlD 1QILOGkMdyouWrInPPp07l2brJZpXiXF06k+Z4JXgbbiLoyU1aK9FtL+zX9E+ZigjTsx VYBkEtq+SMvjbgxnNRn0kw5yMH73hIXbB7C7riuH6aDEh8mEByVayI/lb45hMowJx+L1 nlhg== X-Gm-Message-State: AOAM533AkMwvT1zf0jD8z3WcntS9FQyZZKOGa/MaQGyWTYvZQd4nyT4D yJzrSzqZAhIFudm7/5IQKpbo6w44e+tzQmMMj1Q= X-Google-Smtp-Source: ABdhPJwNL223ojqUIVrQ0Vjz1kcsm+DOrfDcAghg0sOc48rLruqrctkzTjf4MicCztEKRGP0jSA2XTgnGXYKL3Pj2Mk= X-Received: by 2002:a5d:4806:0:b0:20a:da03:711b with SMTP id l6-20020a5d4806000000b0020ada03711bmr1806918wrq.395.1650820559282; Sun, 24 Apr 2022 10:15:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Sun, 24 Apr 2022 18:15:47 +0100 Message-ID: Subject: Re: Compiler problem with gfortran To: "C. David Whiteman" Cc: gcc-help X-Spam-Status: No, score=-0.9 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: Sun, 24 Apr 2022 17:16:02 -0000 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 MacBoo= k > 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. on my desktop. But I can=E2=80=99t 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 $