{"action":"created","issue":{"url":"https://api.github.com/repos/collectd/collectd/issues/978","labels_url":"https://api.github.com/repos/collectd/collectd/issues/978/labels{/name}","comments_url":"https://api.github.com/repos/collectd/collectd/issues/978/comments","events_url":"https://api.github.com/repos/collectd/collectd/issues/978/events","html_url":"https://github.com/collectd/collectd/issues/978","id":63241530,"number":978,"title":"compile error on collect-tg on solaris 11 / sparc","user":{"login":"xtra-be","id":1983484,"avatar_url":"https://avatars.githubusercontent.com/u/1983484?v=3","gravatar_id":"","url":"https://api.github.com/users/xtra-be","html_url":"https://github.com/xtra-be","followers_url":"https://api.github.com/users/xtra-be/followers","following_url":"https://api.github.com/users/xtra-be/following{/other_user}","gists_url":"https://api.github.com/users/xtra-be/gists{/gist_id}","starred_url":"https://api.github.com/users/xtra-be/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtra-be/subscriptions","organizations_url":"https://api.github.com/users/xtra-be/orgs","repos_url":"https://api.github.com/users/xtra-be/repos","events_url":"https://api.github.com/users/xtra-be/events{/privacy}","received_events_url":"https://api.github.com/users/xtra-be/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-03-20T14:46:39Z","updated_at":"2015-06-18T10:43:27Z","closed_at":null,"body":"when compiling master on solaris 11.2 / sparc\r\ncompile fail's on collectd-tg\r\n\r\n```\r\nMaking all in daemon\r\n  CC     collectd_tg-collectd-tg.o\r\ncollectd-tg.c: In function â€˜get_boundet_randomâ€™:\r\ncollectd-tg.c:138:3: error: implicit declaration of function â€˜randomâ€™ [-Werror=implicit-function-declaration]\r\n   return (min + ((int) (((double) range) * ((double) random ()) / (((double) RAND_MAX) + 1.0))));\r\n   ^\r\ncollectd-tg.c: In function â€˜create_value_listâ€™:\r\ncollectd-tg.c:184:3: error: implicit declaration of function â€˜snprintfâ€™ [-Werror=implicit-function-declaration]\r\n   snprintf (vl->identifier.host, sizeof (vl->identifier.host),\r\n   ^\r\ncollectd-tg.c:184:3: error: incompatible implicit declaration of built-in function â€˜snprintfâ€™ [-Werror]\r\ncollectd-tg.c:192:7: error: format â€˜%liâ€™ expects argument of type â€˜long intâ€™, but argument 4 has type â€˜intâ€™ [-Werror=format=]\r\n       \"ti%li\", random ());\r\n       ^\r\ncc1: all warnings being treated as errors\r\n*** Error code 1\r\nThe following command caused the error:\r\necho \"  CC    \" collectd_tg-collectd-tg.o;gcc -DHAVE_CONFIG_H -I.  -I./daemon -DPREFIX='\"/opt/collectd\"'  -DCONFIGFILE='\"/opt/collectd/etc/collectd.conf\"'  -DLOCALSTATEDIR='\"/opt/collectd/var\"'  -DPKGLOCALSTATEDIR='\"/opt/collectd/var/lib/collectd\"'  -DPIDFILE='\"/opt/collectd/var/run/collectd.pid\"' -DPLUGINDIR='\"/opt/collectd/lib/collectd\"'  -DPKGDATADIR='\"/opt/collectd/share/collectd\"' -I../src/libcollectdclient/collectd -I../src/libcollectdclient/collectd  -Wall -Werror -g -O2 -MT collectd_tg-collectd-tg.o -MD -MP -MF .deps/collectd_tg-collectd-tg.Tpo -c -o collectd_tg-collectd-tg.o `test -f 'collectd-tg.c' || echo './'`collectd-tg.c\r\nmake: Fatal error: Command failed for target `collectd_tg-collectd-tg.o'\r\nCurrent working directory /root/collectd-master/src\r\n*** Error code 1\r\nThe following command caused the error:\r\nfail= failcom='exit 1'; \\\r\nfor f in x $MAKEFLAGS; do \\\r\n  case $f in \\\r\n    *=* | --[!k]*);; \\\r\n    *k*) failcom='fail=yes';; \\\r\n  esac; \\\r\ndone; \\\r\ndot_seen=no; \\\r\ntarget=`echo all-recursive | sed s/-recursive//`; \\\r\nlist='libcollectdclient liboconfig daemon'; for subdir in $list; do \\\r\n  echo \"Making $target in $subdir\"; \\\r\n  if test \"$subdir\" = \".\"; then \\\r\n    dot_seen=yes; \\\r\n    local_target=\"$target-am\"; \\\r\n  else \\\r\n    local_target=\"$target\"; \\\r\n  fi; \\\r\n  (CDPATH=\"${ZSH_VERSION+.}:\" && cd $subdir && make  $local_target) \\\r\n  || eval $failcom; \\\r\ndone; \\\r\nif test \"$dot_seen\" = \"no\"; then \\\r\n  make  \"$target-am\" || exit 1; \\\r\nfi; test -z \"$fail\"\r\nmake: Fatal error: Command failed for target `all-recursive'\r\nCurrent working directory /compile/collectd-master/src\r\n*** Error code 1\r\nmake: Fatal error: Command failed for target `all'\r\n```"},"comment":{"url":"https://api.github.com/repos/collectd/collectd/issues/comments/113104539","html_url":"https://github.com/collectd/collectd/issues/978#issuecomment-113104539","issue_url":"https://api.github.com/repos/collectd/collectd/issues/978","id":113104539,"user":{"login":"dago","id":170490,"avatar_url":"https://avatars.githubusercontent.com/u/170490?v=3","gravatar_id":"","url":"https://api.github.com/users/dago","html_url":"https://github.com/dago","followers_url":"https://api.github.com/users/dago/followers","following_url":"https://api.github.com/users/dago/following{/other_user}","gists_url":"https://api.github.com/users/dago/gists{/gist_id}","starred_url":"https://api.github.com/users/dago/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dago/subscriptions","organizations_url":"https://api.github.com/users/dago/orgs","repos_url":"https://api.github.com/users/dago/repos","events_url":"https://api.github.com/users/dago/events{/privacy}","received_events_url":"https://api.github.com/users/dago/received_events","type":"User","site_admin":false},"created_at":"2015-06-18T10:43:27Z","updated_at":"2015-06-18T10:43:27Z","body":"Well, `/usr/include/stdlib.h` contains\r\n```\r\n#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)\r\n...\r\nextern long random();\r\n...\r\n#endif\r\n```\r\nI guess it would be best to see if `random()` requires `-D__EXTENSIONS__`, I'll prepare a pull request."}}