invalid conversion error when compiling
Hi, I'm trying to compile openCARP on our HPC following the procedure to build from sources.
I obtained the following error when compiling:
` /rds/general/user/ccorrad1/home/Codes/openCARP/_build/physics/limpet/cmdline.cc: In function ‘char* get_multiple_arg_token(const char*)’:
/rds/general/user/ccorrad1/home/Codes/openCARP/_build/physics/limpet/cmdline.cc:1175:16: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
1175 | tok = strchr (arg, ',');
| ~~~~~~~^~~~~~~~~~
| |
| const char*
`
I experienced the error with any the following different configurations:
- petsc 3.7.4 and gcc 10.2.0
- PETSc 3.17.4 and gcc 10.3.0
- PETSc 3.17.4 and gcc 11.3.0
I've noticed that the file cmdline.cc is generated from gengetopt
I wonder if it is possible to fix this or if there are workarounds to compile. Best, Cesare