You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across this problem while compiling OpenBLAS on macOS.
Calling flang with -fno-fortran-main does nothing, by using -v you can see that ld still receives -lflangmain. To trigger an error you can use -all_load.
This command line can be used to reproduce without building OpenBLAS:
clang version 10.0.1 (https://github.com/flang-compiler/classic-flang-llvm-project.git 4a566ddfa4157ed1a24920ab7673ccc01c46fd99)
Target: x86_64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /usr/local/bin
"/usr/bin/ld" -demangle -lto_library /usr/local/stow/flang/lib/libLTO.dylib -dynamic -dylib -arch x86_64 -all_load -platform_version macos 10.17.0 12.1 -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -o libdummy_pgmath.dylib -L/usr/local/lib /usr/local/lib/libpgmath.a -lflangmain -lflang -lflangrti -lpgmath -lompstub -lm -lpthread -lSystem
Undefined symbols for architecture x86_64:
"_MAIN_", referenced from:
_main in libflangmain.a(flangmain.c.o)
ld: symbol(s) not found for architecture x86_64
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
Any tips as to why or where -fno-fortran-main is being ignored are appreciated.
EDIT: Please let me know if this bug happens on other platforms. -all_load is a very apple flag.
EDIT2: -lflangmain is still added to the linker command line but the error can't be triggered because -all_load isn't available.
The text was updated successfully, but these errors were encountered:
I came across this problem while compiling OpenBLAS on macOS.
Calling flang with
-fno-fortran-main
does nothing, by using-v
you can see that ld still receives-lflangmain
. To trigger an error you can use-all_load
.This command line can be used to reproduce without building OpenBLAS:
The error:
Any tips as to why or where
-fno-fortran-main
is being ignored are appreciated.EDIT: Please let me know if this bug happens on other platforms.
-all_load
is a very apple flag.EDIT2:
-lflangmain
is still added to the linker command line but the error can't be triggered because -all_load isn't available.The text was updated successfully, but these errors were encountered: