{"action":"created","issue":{"url":"https://api.github.com/repos/Unidata/netcdf-c/issues/494","repository_url":"https://api.github.com/repos/Unidata/netcdf-c","labels_url":"https://api.github.com/repos/Unidata/netcdf-c/issues/494/labels{/name}","comments_url":"https://api.github.com/repos/Unidata/netcdf-c/issues/494/comments","events_url":"https://api.github.com/repos/Unidata/netcdf-c/issues/494/events","html_url":"https://github.com/Unidata/netcdf-c/issues/494","id":261338873,"number":494,"title":"configure should error out if --enable-pnetcdf is specified by user, but pnetcdf cannot be found","user":{"login":"edhartnett","id":4533212,"avatar_url":"https://avatars3.githubusercontent.com/u/4533212?v=4","gravatar_id":"","url":"https://api.github.com/users/edhartnett","html_url":"https://github.com/edhartnett","followers_url":"https://api.github.com/users/edhartnett/followers","following_url":"https://api.github.com/users/edhartnett/following{/other_user}","gists_url":"https://api.github.com/users/edhartnett/gists{/gist_id}","starred_url":"https://api.github.com/users/edhartnett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edhartnett/subscriptions","organizations_url":"https://api.github.com/users/edhartnett/orgs","repos_url":"https://api.github.com/users/edhartnett/repos","events_url":"https://api.github.com/users/edhartnett/events{/privacy}","received_events_url":"https://api.github.com/users/edhartnett/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-28T14:27:47Z","updated_at":"2017-09-28T17:40:59Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"There are at least some cases (--enable-pnetcdf) in which the user request for pnetcdf is overridden by the configure file. If the user requests pnetcdf, and pnetcdf is not found, then the configure issues a warning and builds without pnetcdf.\r\n\r\nThis is incorrect behavior. If the user passes an unknown --enable-something, it should be ignored. but if a known --enable is passed, and cannot be satisfied, then configure should error out.\r\n\r\nThe reason is that sysadmins may believe they are building with support for pnetcdf, and not look at any output, except that the build succeeded.\r\n\r\nThe code in configure.ac looks like this:\r\n```\r\nif test \"x$pnetcdf_conflict\" = xyes ; then\r\n  AC_MSG_WARN([Cannot link to pnetcdf library, --enable-pnetcdf disabled.])\r\n  enable_pnetcdf=no\r\nfi\r\n\r\n```\r\nThe AC_MSG_WARN should be changed to AC_MSG_ERROR().\r\n\r\nNote that in other cases (HDF4 for example), the configure file errors out (correctly) if requested libraries are not found.\r\n\r\n```\r\n   # If the user wants hdf4 built in, check it out.\r\n   if test \"x$enable_hdf4\" = xyes; then\r\n      AC_CHECK_HEADERS([mfhdf.h], [], [nc_mfhdf_h_missing=yes])\r\n      if test \"x$nc_mfhdf_h_missing\" = xyes; then\r\n         AC_MSG_ERROR([Cannot find mfhdf.h, yet --enable-hdf4 was used.])\r\n      fi\r\n      AC_CHECK_LIB([df], [Hclose], [], [AC_MSG_ERROR([Can't find or link to the hdf4 df library. See config.log for errors.])])\r\n      AC_CHECK_LIB([mfhdf], [SDcreate], [], [AC_MSG_ERROR([Can't find or link to the hdf4 mfhdf library. See config.log for errors.])])\r\n\r\n     AC_CHECK_LIB([jpeg], [jpeg_set_quality], [], [AC_MSG_ERROR([Can't find or link to the jpeg library (required by hdf4). See config.log for errors.])])\r\n\r\n      AC_DEFINE([USE_HDF4], [1], [if true, use HDF4 too])\r\n   fi\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/Unidata/netcdf-c/issues/comments/332910740","html_url":"https://github.com/Unidata/netcdf-c/issues/494#issuecomment-332910740","issue_url":"https://api.github.com/repos/Unidata/netcdf-c/issues/494","id":332910740,"user":{"login":"wkliao","id":1634098,"avatar_url":"https://avatars2.githubusercontent.com/u/1634098?v=4","gravatar_id":"","url":"https://api.github.com/users/wkliao","html_url":"https://github.com/wkliao","followers_url":"https://api.github.com/users/wkliao/followers","following_url":"https://api.github.com/users/wkliao/following{/other_user}","gists_url":"https://api.github.com/users/wkliao/gists{/gist_id}","starred_url":"https://api.github.com/users/wkliao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wkliao/subscriptions","organizations_url":"https://api.github.com/users/wkliao/orgs","repos_url":"https://api.github.com/users/wkliao/repos","events_url":"https://api.github.com/users/wkliao/events{/privacy}","received_events_url":"https://api.github.com/users/wkliao/received_events","type":"User","site_admin":false},"created_at":"2017-09-28T17:40:59Z","updated_at":"2017-09-28T17:40:59Z","author_association":"CONTRIBUTOR","body":"This is not limited to --enable-pnetcdf. Here is another example.\r\nWhen --enable-parallel4 is explicitly used and the underneath HDF5 was not configured with parallel I/O feature, only warning message is generated. \r\nhttps://github.com/Unidata/netcdf-c/blob/fde8720fd332f7b06d15e07460d060ebe893a406/configure.ac#L1047-L1051\r\n"}}
{"actor":{"display_login":"wkliao"}}