Electrostatics / apbs

Software for biomolecular electrostatics and solvation calculations
http://www.poissonboltzmann.org/
Other
91 stars 24 forks source link

Build failure with Intel compilers #105

Open lwwilson1 opened 3 years ago

lwwilson1 commented 3 years ago

Describe the bug A default build (export CC=icc; export CXX=icpc; cmake ..; make) fails with Intel compilers.

I've used both Intel 18.0.5 and Intel 19.1, and I'm building on the Great Lakes computer at the University of Michigan, which runs CentOS 7.

It fails at src/main.c, line 86:

/home/lwwilson/packages/apbs/src/main.c(86): error: expected an expression
      for (int i=0; i<argc; i++) {
           ^

I'm essentially 100% certain what's happening is that the Intel compiler defaults to C90, so you can't declare the control variable i inside the for loop. Probably the clearest solution is, in the CMakeLists.txt, add the compile option -std=gnu99 (or whatever the appropriate post-C90 C standard should be used for APBS) when the compiler is Intel.

sobolevnrm commented 3 years ago

Our build system is in flux; I'm flagging this for @ashermancinelli and @intendo to see if they have suggestions on how to fix.