New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation fails on macOS #678
Comments
As far as I know, we have never tried building libpgmath with yasm. Could you use either the gnu or clang assembler? |
I tried the GNU assembler from binutils-2.32: When using the LLVM assembler, I get a different error:
Then I figured out that Xcode ships with an assembler and it worked (the build errors from above were treated as warnings). But it seems that AVX-512 stuff doesn't work on macOS even with GCC 8.3.0:
Is my GCC build incomplete? Is it possible to build flang on macOS at all? |
I don't know the official status of FLANG on OSX - Steve S or Gary K will have to chime in here. I have been able to build libpgmath (in house) on OSX - but that has been a few months. Let me try building that again and give you and update. |
We would like to have Flang build on macOS, but it's not been a high priority. |
It really merits a higher priority since, as of macOS Catalina and Xcode 11, macOS users won't be able to build FSF gcc (due to the absence of support for the availability attribute). https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90835 So flang could become the de facto fortran compiler on macOS 10.15 if it would only build. |
With your build environment, would you be able to enumerate all the libpgmath failures? Maybe make -k? Thanks |
The build doesn't get as far as libpgmath. Using either Xcode 10.2's clang, llvm 7.0's clang or llvm 6.0's clang, I get the 20 errors of the form...
|
FWIW, I built the flang-driver a few months ago using clang 4.0.1 on macOS and it built fine. |
Is that clang 4.0.1, the Apple Clang from Xcode 9? IMHO, it is rather embarrassing that Flang is claimed to be based on the llvm 7.0 release yet it is unbuildable by that very compiler. I get that it needs its own patched llvm but it at least should be coded to match the compiler syntax restrictions of the same llvm release. |
No, vanilla clang. |
As I said, it really should be coded to be compatible with the clang from the llvm it claims to be based on, otherwise it will never get merged into the main llvm repos. |
I see the same failure with llvm 5.0.2 clang compiler. I can't test llvm 4.0 on Mojave because MacPorts reports that as an unsupported for that macOS release. |
@jwhowarth, can you build |
FYI, I can reproduce the same exact failure under Ubuntu Disco when using the Ubuntu clang-7 and clang++-7 compilers in the build-flang-driver.sh script rather than gcc and g++. So this is generic breakage when the flang-driver is built against recent clang. |
Okay, with the patch proposed in https://github.com/flang-compiler/flang/issues/779 flang-driver builds on macOS but the resulting build of flang fails at...
|
I am trying to build flang (and more specifically libpgmath) on macOS 10.13 but I get a build error:
Is the issue with the assembler or with the build environment? What assembler is recommended for building flang? How can I workaround this issue?
The text was updated successfully, but these errors were encountered: