Conversation
Pass cflags to configure so that configure gets the values from the spack install line. Disable -Werror so that we don't fail the build over a stray warning.
| # stray warning. | ||
| def patch(self): | ||
| files = glob.glob(os.path.join('*', 'Makefile.in')) | ||
| filter_file('-Werror', '', *files) |
There was a problem hiding this comment.
I always get quiesy when I read such a comment. Do you have a concrete reason why you needed to disable it?
There was a problem hiding this comment.
@healther, in this case I'll merge the package, but if you like I can raise an issue to start a discussion on when stripping -Werror is appropriate. It's possible this should be optional (e.g. controlled with a variant)
|
No, I don't have a specific example where this fails. But then, I haven't tried all points in 'The Matrix' of x86, powerpc, I'm impressed that Red Hat can keep their code clean enough where it IMO, spack builds are sometimes a bit fragile and I'm trying to make But you have taunted The Machine. :-) I like to think of my alter ego |
|
Ok, here's an example where -Werror fails the build. This example is It fails on the 3rd file that icc tries to compile. This comes from pwrite_retry() in system.h: With filter_file() to erase -Werror, the build succeeds, with So, -Werror causes Intel to fail the build over 'buf + recvd' where Elfutils might consider this example a bit out of bounds because I It also occurs to me that elfutils includes header files from other Ok? |
healther
left a comment
There was a problem hiding this comment.
I'm still a bit quiesy, but I accept the argument
| files = glob.glob(os.path.join('*', 'Makefile.in')) | ||
| filter_file('-Werror', '', *files) | ||
|
|
||
| flag_handler = AutotoolsPackage.build_system_flags |
There was a problem hiding this comment.
I realize I've been away from Spack for quite some time, but what does this line do?
There was a problem hiding this comment.
@adamjstewart this makes it so that compiler flags set in compilers.yaml or on the command line will be passed as arguments to the build system (to avoid cases where the build system chooses flag values that conflict with compilers.yaml).
|
@healther I sympathize. For me, I get worried when I see My whole reason is to make spack builds more robust. In chess, this |
|
@adamjstewart You asked almost the same thing in PR #8912 for This is covered in lib/spack/spack/package.py. Look for For fully autotools packages (including elfutils), build_system_flags() Autotools packages expect to see CC, CFLAGS, etc on the configure Note: without build_system_flags() or flag_handler(), any spack cflags Then you end up with a compile line like this, which doesn't obey the That's the real reason for build_system_flags(), so that cflags from It's complicated and IMO, spack still has some rough edges on this Anything else, or are we ready to commit? |
Pass cflags to configure so that configure gets the values from the
spack install line.
Disable -Werror so that we don't fail the build over a stray warning.