Gmsh 4.11.1 compilation fails due to missing string.h in blossom
Trying to build Gmsh 4.11.1 on Mac Studio M2 Max (Mac14,13), Macos Ventura 13.5.2 (22G91).
make
command fails:
/Applications/OneLAB/onelab-source/gmsh-4.11.1-source/contrib/blossom/concorde97/EDGEGEN/edgegen.c:1680:18: error: call to undeclared library function 'strlen' with type 'unsigned long (const char *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] p += strlen (area); ^ /Applications/OneLAB/onelab-source/gmsh-4.11.1-source/contrib/blossom/concorde97/EDGEGEN/edgegen.c:1680:18: note: include the header <string.h> or explicitly provide a declaration for 'strlen' /Applications/OneLAB/onelab-source/gmsh-4.11.1-source/contrib/blossom/concorde97/EDGEGEN/edgegen.c:1683:18: error: call to undeclared library function 'strcmp' with type 'int (const char *, const char *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if (!strcmp (area, "EDGEGEN")) { ^ /Applications/OneLAB/onelab-source/gmsh-4.11.1-source/contrib/blossom/concorde97/EDGEGEN/edgegen.c:1683:18: note: include the header <string.h> or explicitly provide a declaration for 'strcmp' 2 errors generated. make[2]: *** [CMakeFiles/shared.dir/contrib/blossom/concorde97/EDGEGEN/edgegen.c.o] Error 1 make[1]: *** [CMakeFiles/shared.dir/all] Error 2 make: *** [all] Error 2
Attempting to fix by inserting string.h into edgegen.c yielded futher errors.
/Applications/OneLAB/onelab-source/gmsh-4.11.1-source/contrib/blossom/concorde97/TSP/prob_io.c:330:13: error: call to undeclared library function 'strlen' with type 'unsigned long (const char *)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] int l = strlen(f); ^ /Applications/OneLAB/onelab-source/gmsh-4.11.1-source/contrib/blossom/concorde97/TSP/prob_io.c:330:13: note: include the header <string.h> or explicitly provide a declaration for 'strlen' 1 error generated. make[2]: *** [CMakeFiles/shared.dir/contrib/blossom/concorde97/TSP/prob_io.c.o] Error 1 make[1]: *** [CMakeFiles/shared.dir/all] Error 2 make: *** [all] Error 2
Successful build was acheived by removing the "blossom" directory.