From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 65F1E3858D33 for ; Sun, 24 Apr 2022 18:01:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 65F1E3858D33 Received: by mail-wm1-x32a.google.com with SMTP id c190-20020a1c35c7000000b0038e37907b5bso11207602wma.0 for ; Sun, 24 Apr 2022 11:01:47 -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=KwIPB8J4IOiZbKfOVS3+haG0I5fvnXQr5Gja5CwFeUE=; b=5gZaWbjJjTjKNIfxtpFBvxwotr/W8oELDgITJ1Be5AA2S5Tz2lW2GWqk+COb9aGbpg tpgdYCsQBloWIyZkeMEmbpuLOQVeL79wNLFSCHeitXTLypLDD+lIL/aBYcV5Bk6l+qxK fs+i0NM38C62Yt/igeqXlMIY0Cxe0XsoPO/uRAmm2ZvSdRt9gTj3lcQvLX8LU5bhJZcb CMUBD8d7ChgsFNg31+tad/9cDx53grHAh27c/YQ5S6cgOa76m8BMrT70olImmhTi3hxk urWZtqdH96n84iuVqF3aeEQJ2b6I4kxE7EEdzwA5GoyJC0yzuKaCwO/4ZM5xAMWlLyxT QlAw== X-Gm-Message-State: AOAM532E/3ONeNxJsjWSLFAIydbnirE9YC62mm2Pnr1K9lbwUXdZTcwi S18ndubQfacooH45yKXoMmPkcg4Ukvq+oBrn9Fc= X-Google-Smtp-Source: ABdhPJzOd1N6JQbcbZiEbRjwUugp4W5I7ZC3cLrZtyYF5yHpuBrI0Hm5sQuXvfv3Btud6DwHCOVybRwvg5V0h2oIokk= X-Received: by 2002:a05:600c:3555:b0:392:68aa:a46d with SMTP id i21-20020a05600c355500b0039268aaa46dmr22700513wmq.20.1650823305922; Sun, 24 Apr 2022 11:01:45 -0700 (PDT) MIME-Version: 1.0 References: <546813AC-1859-4DCC-A8CA-74F3CC0E4F83@mac.com> In-Reply-To: <546813AC-1859-4DCC-A8CA-74F3CC0E4F83@mac.com> From: Jonathan Wakely Date: Sun, 24 Apr 2022 19:01:34 +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 18:01:49 -0000 On Sun, 24 Apr 2022, 18:34 C. David Whiteman, wrote= : > I got on the Apple Developer website and downloaded > > Command Line Tools for Xcode 13.3 > Additional Tools for Xcode 13.3 > > But I am still getting the following error when coming skippy.f > > ~/Desktop 526 $ gfortran skippy.f > ld: library not found for -lSystem > collect2: error: ld returned 1 exit status > > I guess the ld: suggests that the loader has not found a needed library. > Not sure where that library comes from, where it would be in the director= y > structure, etc. > According to https://developer.apple.com/forums/thread/655588 I think it comes from an SDK for your version of macOS. But I've never used macOS so I don't know how it's supposed to work. Please keep your replies on the mailing list, so people who actually understand macOS can help. Replying just to me isn't going to get you anywhere because I don't know where libSystem comes from any more than you do. > > On Apr 24, 2022, at 11:19 AM, Jonathan Wakely > wrote: > > > > On Sun, 24 Apr 2022, 18:15 Jonathan Wakely, 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 late= st >>> 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=E2=80=99t get the executable file to run. I am = an >>> amateur and am really not that familiar with the unix commands, etc. Ca= n >>> 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 $ >> >> >