{"action":"created","issue":{"url":"https://api.github.com/repos/carp-lang/Carp/issues/208","repository_url":"https://api.github.com/repos/carp-lang/Carp","labels_url":"https://api.github.com/repos/carp-lang/Carp/issues/208/labels{/name}","comments_url":"https://api.github.com/repos/carp-lang/Carp/issues/208/comments","events_url":"https://api.github.com/repos/carp-lang/Carp/issues/208/events","html_url":"https://github.com/carp-lang/Carp/issues/208","id":309712053,"number":208,"title":"use of undeclared identifier 'CLOCK_REALTIME'","user":{"login":"JoelSanchez","id":8020017,"avatar_url":"https://avatars1.githubusercontent.com/u/8020017?v=4","gravatar_id":"","url":"https://api.github.com/users/JoelSanchez","html_url":"https://github.com/JoelSanchez","followers_url":"https://api.github.com/users/JoelSanchez/followers","following_url":"https://api.github.com/users/JoelSanchez/following{/other_user}","gists_url":"https://api.github.com/users/JoelSanchez/gists{/gist_id}","starred_url":"https://api.github.com/users/JoelSanchez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoelSanchez/subscriptions","organizations_url":"https://api.github.com/users/JoelSanchez/orgs","repos_url":"https://api.github.com/users/JoelSanchez/repos","events_url":"https://api.github.com/users/JoelSanchez/events{/privacy}","received_events_url":"https://api.github.com/users/JoelSanchez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-29T11:04:02Z","updated_at":"2018-03-29T12:16:13Z","closed_at":null,"author_association":"NONE","body":"I did this:\r\n```\r\n$ carp\r\nWelcome to Carp 0.2.0\r\nThis is free software with ABSOLUTELY NO WARRANTY.\r\nEvaluate (help) for more information.\r\n> (load \"Bench.carp\")\r\n> (use Bench)\r\n> :cb\r\n```\r\nThis happened (output ellided):\r\n```\r\nIn file included from ./out//main.c:1:\r\n.//core/carp_bench.h:5:3: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]\r\n  clock_gettime(CLOCK_REALTIME, &tv);\r\n  ^\r\n.//core/carp_bench.h:5:17: error: use of undeclared identifier 'CLOCK_REALTIME'\r\n  clock_gettime(CLOCK_REALTIME, &tv);\r\n                ^\r\n1 warning and 1 error generated.\r\ncarp: callCommand: clang -fPIC -lm ./out//main.c -shared -o \"./out//Untitled\"   -I.//core/  -g  (exit 1): failed\r\n```\r\nI'm on ArchLinux, kernel version 4.15.12-1-ARCH, clang 6.0.0 (target: x86_64-pc-linux-gnu)\r\n\r\nTests pass, btw.\r\nSame issue when running `benchmarks.sh`:\r\n\r\n```\r\n$ ./benchmarks.sh \r\nCopying from /home/joel/Desarrollo/self/carp/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-8.12/8.0.2/bin/carp to /home/joel/.local/bin/carp\r\nCopying from /home/joel/Desarrollo/self/carp/.stack-work/install/x86_64-linux-tinfo6-nopie/lts-8.12/8.0.2/bin/carp-header-parse to /home/joel/.local/bin/carp-header-parse\r\n\r\nCopied executables to /home/joel/.local/bin:\r\n- carp\r\n- carp-header-parse\r\n./bench/arithmetic.carp\r\nIn file included from ./out//main.c:1:\r\n.//core/carp_bench.h:5:3: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]\r\n  clock_gettime(CLOCK_REALTIME, &tv);\r\n  ^\r\n.//core/carp_bench.h:5:17: error: use of undeclared identifier 'CLOCK_REALTIME'\r\n  clock_gettime(CLOCK_REALTIME, &tv);\r\n                ^\r\n1 warning and 1 error generated.\r\ncarp: callCommand: clang -fPIC -lm ./out//main.c -o \"./out//Untitled\" -O3 -D OPTIMIZE   -I.//core/  -g  (exit 1): failed\r\n```"},"comment":{"url":"https://api.github.com/repos/carp-lang/Carp/issues/comments/377216663","html_url":"https://github.com/carp-lang/Carp/issues/208#issuecomment-377216663","issue_url":"https://api.github.com/repos/carp-lang/Carp/issues/208","id":377216663,"user":{"login":"eriksvedang","id":356121,"avatar_url":"https://avatars3.githubusercontent.com/u/356121?v=4","gravatar_id":"","url":"https://api.github.com/users/eriksvedang","html_url":"https://github.com/eriksvedang","followers_url":"https://api.github.com/users/eriksvedang/followers","following_url":"https://api.github.com/users/eriksvedang/following{/other_user}","gists_url":"https://api.github.com/users/eriksvedang/gists{/gist_id}","starred_url":"https://api.github.com/users/eriksvedang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eriksvedang/subscriptions","organizations_url":"https://api.github.com/users/eriksvedang/orgs","repos_url":"https://api.github.com/users/eriksvedang/repos","events_url":"https://api.github.com/users/eriksvedang/events{/privacy}","received_events_url":"https://api.github.com/users/eriksvedang/received_events","type":"User","site_admin":false},"created_at":"2018-03-29T12:16:13Z","updated_at":"2018-03-29T12:16:13Z","author_association":"COLLABORATOR","body":"Thanks for the bug report! I am currently traveling and can’t look into this until sometime next week. Do you know of a fix for this problem?"}}
{"actor":{"display_login":"eriksvedang"}}