marekandreas / elpa

A scalable eigensolver for dense, symmetric (hermitian) matrices (fork of https://gitlab.mpcdf.mpg.de/elpa/elpa.git)
Other
27 stars 13 forks source link

"cpp -P" breaks with clang-12 #6

Closed yurivict closed 7 months ago

yurivict commented 3 years ago

Due to -Werror we are getting these errors:

cpp: error: cpp: error: argument unused during compilation: '-P' [-Werror,-Wunused-command-line-argument]

Log: http://beefy18.nyi.freebsd.org/data/main-amd64-default/pd83453f82622_sd5c1296234/logs/elpa-2019.05.002_2.log (IPv6 URL)

marekandreas commented 3 years ago

Hello,

first note that we do officially not support the compilation of ELPA with clang. Nevertheless, the "-P" flag is automatically added to the preprocessor by the autoconf macros to set up the CC, FC compiler. This also makes sense since (from man cpp): "-P Inhibit generation of linemarkers in the output from the preprocessor. This might be useful when running the preprocessor on something that is not C code, and will be sent to a program which might be confused by the linemarkers." Since we do not add the "-P" flag but it is set internally by configure, it will take some time to find why this is also happening with the clang compiler, but then clang does supposedly not use this flag.

marekandreas commented 3 years ago

Can you please provide the complete configure command line you are using when you encounter this problem? When I run the configure with CC=clang-12 and CFLAGS="-Werror -Wunused-command-line-argument" the compilation does not abort with the above error