flux-framework/Tutorials

Data conduit workflow example does not compile

Opened this issue · 0 comments

Ping @trws - this module does not compile:

gcc  conduit.c -fPIC -c -o conduit.o
conduit.c: In function ‘freectx’:
conduit.c:29:9: warning: implicit declaration of function ‘close’; did you mean ‘pclose’? [-Wimplicit-function-declaration]
   29 |         close (ctx->client_sock);
      |         ^~~~~
      |         pclose
conduit.c: In function ‘getctx’:
conduit.c:41:9: warning: implicit declaration of function ‘asprintf’; did you mean ‘vsprintf’? [-Wimplicit-function-declaration]
   41 |         asprintf (&(ctx->sockname),  "/tmp/%s/mysock", user? user : "");
      |         ^~~~~~~~
      |         vsprintf
conduit.c: In function ‘conduit_put_request_cb’:
conduit.c:90:31: warning: passing argument 3 of ‘flux_respond’ makes pointer from integer without a cast [-Wint-conversion]
   90 |     if (flux_respond (h, msg, errno, NULL) < 0)
      |                               ^~~~~
      |                               |
      |                               int
In file included from /usr/include/flux/core/flux.h:22,
                 from /usr/include/flux/core.h:18,
                 from conduit.c:9:
/usr/include/flux/core/response.h:78:69: note: expected ‘const char *’ but argument is of type ‘int’
   78 | int flux_respond (flux_t *h, const flux_msg_t *request, const char *s);
      |                                                         ~~~~~~~~~~~~^
conduit.c:90:9: error: too many arguments to function ‘flux_respond’
   90 |     if (flux_respond (h, msg, errno, NULL) < 0)
      |         ^~~~~~~~~~~~
In file included from /usr/include/flux/core/flux.h:22,
                 from /usr/include/flux/core.h:18,
                 from conduit.c:9:
/usr/include/flux/core/response.h:78:5: note: declared here
   78 | int flux_respond (flux_t *h, const flux_msg_t *request, const char *s);
      |     ^~~~~~~~~~~~
conduit.c: In function ‘conduit_open’:
conduit.c:112:5: warning: implicit declaration of function ‘unlink’ [-Wimplicit-function-declaration]
  112 |     unlink (ctx->csockname);
      |     ^~~~~~
conduit.c: In function ‘mod_main’:
conduit.c:162:28: warning: passing argument 3 of ‘flux_kvs_commit’ makes integer from pointer without a cast [-Wint-conversion]
  162 |     flux_kvs_commit (h, 0, txn);
      |                            ^~~
      |                            |
      |                            flux_kvs_txn_t * {aka struct flux_kvs_txn *}
In file included from /usr/include/flux/core/kvs.h:20,
                 from /usr/include/flux/core.h:19,
                 from conduit.c:9:
/usr/include/flux/core/kvs_commit.h:48:37: note: expected ‘int’ but argument is of type ‘flux_kvs_txn_t *’ {aka ‘struct flux_kvs_txn *’}
   48 |                                 int flags,
      |                                 ~~~~^~~~~
conduit.c:162:5: error: too few arguments to function ‘flux_kvs_commit’
  162 |     flux_kvs_commit (h, 0, txn);
      |     ^~~~~~~~~~~~~~~
In file included from /usr/include/flux/core/kvs.h:20,
                 from /usr/include/flux/core.h:19,
                 from conduit.c:9:
/usr/include/flux/core/kvs_commit.h:46:16: note: declared here
   46 | flux_future_t *flux_kvs_commit (flux_t *h,
      |                ^~~~~~~~~~~~~~~
make: *** [Makefile:10: conduit.o] Error 1