Skip to content

[flang] Building flang on Macs requires manually passing a flag with path to runtime librariesΒ #151031

@ktras

Description

@ktras

I have recently installed flang on an Apple M1 Mac that is running Sonoma 14.5. I installed with the latest from the main branch at the time (the commit hash fd86b2e26c0933c2af61). When invoking the installed flang executable to build a basic Fortran program, I get the following error:

ld: library 'flang_rt.runtime' not found
flang-22: error: linker command failed with exit code 1 (use -v to see invocation)

I am able to resolve this by manually passing the path to the runtime library with the following command:

flang -L`flang -print-resource-dir`/lib/darwin hello-world.f90

I believe this to be an issue that other mac users also face and hope that it can be resolved so the runtime libraries do not have to be manually passed.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions