From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.com (mout.gmx.com [74.208.4.200]) by sourceware.org (Postfix) with ESMTPS id 167783858436 for ; Tue, 28 Sep 2021 08:34:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 167783858436 X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79 Received: from smtpclient.apple ([78.12.171.97]) by smtp.mail.com (mrgmxus004 [74.208.5.15]) with ESMTPSA (Nemesis) id 0LlUNl-1n51U92nJv-00bKwr for ; Tue, 28 Sep 2021 10:34:38 +0200 From: Mini Administrator Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: gfortran problems on M1 Mac Message-Id: <2A204923-E0D1-4F6D-AEDD-1908B033557C@mail.com> Date: Tue, 28 Sep 2021 10:34:36 +0200 To: gcc-help@gcc.gnu.org X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Provags-ID: V03:K1:M4k5O/2zUhXx5wkvm4aO4FIU58YCoY/S+jwQqw18OST5MUaVOTl JTUPzADhHzGRGlZk+xTxL1INFMTz7lObXy3IiUNy9m0Lq1tflhNvbylUpsVL8Z2ksIw2eDy m7uqrRb4uo1fDCO6XcDsuVlXOJtHGiijj83DFWtMlcEyaUT7833uP0oFMoAPPlBuOOVY70p l4ghgdkNKZqeuvK5JnDQQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:nwfgs6DhKxo=:hhqKCXj7mYqB2C0hm9EFyW zibNcusIu482VTFccVqzKPp761YOfswLeszKGdU9AQliIpIYTeb8DZ40hQ05a67xEBCyjc4Cf XMcQD8l6jLj/DhiACjX1pdUDkNcmneFb4tCa7ppEar46hS/ADt486CWqeQu9+3aOldcSRCBMA JzfqVsV8T1llrLeR3BdgSO6cMhoIPLVabX0Vgoj2RDXbL8SlqqPb8TN/c4w2yGCY/IchdkI5Q uq/qm246g9l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_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: Tue, 28 Sep 2021 08:34:41 -0000 I=E2=80=99ve installed gcc11 on a M1 Mac Mini using MacPorts (MacOS = 11.6, and compiled our suite of fortran programs with no issues. All of = them excecute properly but one. When run, this error occurs: dyld: Library not loaded: /usr/lib/libSystem.B.dylib Referenced from: /Volumes/xHD/DMG/Shared/bin/11/pavlov7.out Reason: image not found [1] 14157 abort pavlov7.out If I check the libraries required by the program, I get the following otool -L /Volumes/xHD/DMG/Shared/bin/11/pavlov7.out /Volumes/xHD/DMG/Shared/bin/11/pavlov7.out: @rpath/libgfortran.5.dylib (compatibility version 6.0.0, current = version 6.0.0) @rpath/libgcc_s.1.1.dylib (compatibility version 1.0.0, current = version 1.1.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current = version 1292.100.5) but /usr/lib does not contain libSystem. There is a description of the = issue here = =20 and actually on the Mini I can find =20 = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Devel= oper/SDKs/MacOSX.sdk/usr/lib/libSystem.B.tbd which is a text file containing references to reexported-libraries: - targets: [ x86_64-macos, x86_64-maccatalyst, arm64-macos, = arm64-maccatalyst, arm64e-macos, arm64e-maccatalyst ] libraries: [ '/usr/lib/system/libcache.dylib', = '/usr/lib/system/libcommonCrypto.dylib', '/usr/lib/system/libcompiler_rt.dylib', = '/usr/lib/system/libcopyfile.dylib', '/usr/lib/system/libcorecrypto.dylib', = '/usr/lib/system/libdispatch.dylib', '/usr/lib/system/libdyld.dylib', = '/usr/lib/system/libkeymgr.dylib', '/usr/lib/system/liblaunch.dylib', = '/usr/lib/system/libmacho.dylib', '/usr/lib/system/libquarantine.dylib', = '/usr/lib/system/libremovefile.dylib', '/usr/lib/system/libsystem_asl.dylib', = '/usr/lib/system/libsystem_blocks.dylib', '/usr/lib/system/libsystem_c.dylib', = '/usr/lib/system/libsystem_collections.dylib', '/usr/lib/system/libsystem_configuration.dylib', = '/usr/lib/system/libsystem_containermanager.dylib', '/usr/lib/system/libsystem_coreservices.dylib', = '/usr/lib/system/libsystem_darwin.dylib', '/usr/lib/system/libsystem_dnssd.dylib', = '/usr/lib/system/libsystem_featureflags.dylib', '/usr/lib/system/libsystem_info.dylib', = '/usr/lib/system/libsystem_kernel.dylib', '/usr/lib/system/libsystem_m.dylib', = '/usr/lib/system/libsystem_malloc.dylib', = '/usr/lib/system/libsystem_networkextension.dylib', = '/usr/lib/system/libsystem_notify.dylib', '/usr/lib/system/libsystem_platform.dylib', = '/usr/lib/system/libsystem_product_info_filter.dylib', '/usr/lib/system/libsystem_pthread.dylib', = '/usr/lib/system/libsystem_sandbox.dylib', '/usr/lib/system/libsystem_secinit.dylib', = '/usr/lib/system/libsystem_symptoms.dylib', '/usr/lib/system/libsystem_trace.dylib', = '/usr/lib/system/libunwind.dylib', '/usr/lib/system/libxpc.dylib' ] I've checked with otool other executables compiled with gfortran, and = they all contain /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current = version 1292.100.5) but apparently they don=E2=80=99t need it at runtime, so they execute = properly. I suspect the one program failing may require that library due = to high memory allocation needs, so I tried to recompile that program = with option -mcmodel=3Dlarge, but compilation fails with hundreds of = errors like these /var/folders/5m/npwgg_r174ncqgz7j9w3x_l00000gn/T//ccWZX2yC.s:11:15: = error: invalid variant 'BLEAH' adrp x0, lC0@BLEAH ^ /var/folders/5m/npwgg_r174ncqgz7j9w3x_l00000gn/T//ccWZX2yC.s:18:15: = error: invalid variant 'BLEAH' adrp x2, lC1@BLEAH which I can=E2=80=99t relate to any statement of the program.=20 So I=E2=80=99ve two questions: 1) is there a solution for missing /usr/lib/libSystem.B.dylib? 2) why -mcmodel=3Dlarge fails on this Mini (it works on a Linux box, but = it fails on another Mac with Intel CPU with similar error but PLTOFF is = mentioned instead of BLEAH) Thanks Franco