Chapel: GMP seems to require m4

Created on 31 Oct 2017  路  9Comments  路  Source: chapel-lang/chapel

Elliot suspects this is a result of #7014

Configuration Information

  • Output of chpl --version: chpl Version 1.17.0 pre-release
Third-Party Bug

Most helpful comment

Think of a better way to let users know a speculative build failed.

Couldn't the solution be even simpler? If the speculative build fails, I'm pretty sure CHPL_GMP defaults to none. So couldn't we add code to the GMP.chpl module along the lines of:

if (CHPL_GMP == "none") then
  compilerError("Your Chapel configuration does not currently have GMP enabled.");

and maybe a pointer to some documentation for more information about how to enable it? (set the env. var., rebuild if necessary, recompile)

All 9 comments

Requested from #7696

I have a box I can reproduce this on now, so I'll take a look and see what I find

I was wrong / lydia was right -- m4 is a requirement.

I think there's 2 next steps here:

  • adjust our documentation to list m4 as a prereq (revive https://github.com/chapel-lang/chapel/pull/7696, and add m4 to the apt/yum/zypper commands)
  • Think of a better way to let users know a speculative build failed. The gmp build actually fails with a pretty clear configure: error: No usable m4 in $PATH, but since it's a speculative build we sweep that under the rug and users only find out at chpl compilation time with incredibly unhelpful unknown __mpz_struct (and other gmp type) errors. Maybe we could do something like set CHPL_GMP=failed if the speculative build failed, and in the module code emit a clear error? Or we could have a "production" Chapel install that did a non-speculative build of gmp? Something to think about -- I'll probably open a new issue for this.

Think of a better way to let users know a speculative build failed.

Couldn't the solution be even simpler? If the speculative build fails, I'm pretty sure CHPL_GMP defaults to none. So couldn't we add code to the GMP.chpl module along the lines of:

if (CHPL_GMP == "none") then
  compilerError("Your Chapel configuration does not currently have GMP enabled.");

and maybe a pointer to some documentation for more information about how to enable it? (set the env. var., rebuild if necessary, recompile)

Yeah, I was just wondering why we didn't already have that check (I thought we did, but turns out we only have it for CHPL_REGEXP) -- I think that's a good first step and will take that on

I'd guess it was just an oversight...

@ronawho: Just to see if I can close this tab: Are you going to follow up with the GMP check in its module, or do you want me / someone else to?

I own that (and I'm working on it ATM)

My current error message is GMP support not compiled in, but this is just to match the re2 error of Regular expression support not compiled in. I'm open to other error messages if you have a preference

8171 has the GMP check, but I'm having trouble getting passed an issue where we're reporting the internal line number instead of the user one: https://github.com/chapel-lang/chapel/pull/8171#discussion_r160853112

Was this page helpful?
0 / 5 - 0 ratings