{"action":"created","issue":{"url":"https://api.github.com/repos/habanero-rice/hclib/issues/61","repository_url":"https://api.github.com/repos/habanero-rice/hclib","labels_url":"https://api.github.com/repos/habanero-rice/hclib/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/habanero-rice/hclib/issues/61/comments","events_url":"https://api.github.com/repos/habanero-rice/hclib/issues/61/events","html_url":"https://github.com/habanero-rice/hclib/issues/61","id":294517219,"number":61,"title":"Compilation error: missing `xlocale.h`","user":{"login":"cogumbreiro","id":2490181,"avatar_url":"https://avatars2.githubusercontent.com/u/2490181?v=4","gravatar_id":"","url":"https://api.github.com/users/cogumbreiro","html_url":"https://github.com/cogumbreiro","followers_url":"https://api.github.com/users/cogumbreiro/followers","following_url":"https://api.github.com/users/cogumbreiro/following{/other_user}","gists_url":"https://api.github.com/users/cogumbreiro/gists{/gist_id}","starred_url":"https://api.github.com/users/cogumbreiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cogumbreiro/subscriptions","organizations_url":"https://api.github.com/users/cogumbreiro/orgs","repos_url":"https://api.github.com/users/cogumbreiro/repos","events_url":"https://api.github.com/users/cogumbreiro/events{/privacy}","received_events_url":"https://api.github.com/users/cogumbreiro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-05T19:39:58Z","updated_at":"2018-02-06T16:42:05Z","closed_at":null,"author_association":"NONE","body":"Hi, everyone,\r\n\r\nI'm having problems compiling hclib in Ubuntu 17.10. According to [ubuntu-packages](https://packages.ubuntu.com/search?searchon=contents&keywords=xlocale.h&mode=exactfilename&suite=artful&arch=any) it seemed I had to install `libc++-dev`. The file is indeed installed in my system but hclib's build script is not able to find it:\r\n\r\n```\r\n$ find /usr/include/ -iname 'xlocale.h'\r\n/usr/include/c++/v1/support/solaris/xlocale.h\r\n/usr/include/c++/v1/support/newlib/xlocale.h\r\n/usr/include/c++/v1/support/ibm/xlocale.h\r\n/usr/include/c++/v1/support/musl/xlocale.h\r\n/usr/include/c++/v1/support/xlocale/xlocale.h\r\n```\r\n\r\nAny workarounds? I was expecting `configure.sh` to either find the right header or at least consider the missing header as an error.\r\n\r\n---\r\n**Compilation error:**\r\n\r\n```\r\n$ ./install.sh\r\n[...]\r\n/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src -I../inc    -Wall -g -O3 -std=c11 -I../../inc -I../../src/inc -I../../src/fcontext  -DHC_ASSERTION_CHECK -DHC_COMM_WORKER_STATS -I/usr/include/libxml2 -Wall -g -O3 -std=c11 -MT libhclib_la-hclib-thread-bind.lo -MD -MP -MF .deps/libhclib_la-hclib-thread-bind.Tpo -c -o libhclib_la-hclib-thread-bind.lo `test -f 'hclib-thread-bind.c' || echo '../../src/'`hclib-thread-bind.c\r\nlibtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src -I../inc -Wall -g -O3 -std=c11 -I../../inc -I../../src/inc -I../../src/fcontext -DHC_ASSERTION_CHECK -DHC_COMM_WORKER_STATS -I/usr/include/libxml2 -Wall -g -O3 -std=c11 -MT libhclib_la-hclib-thread-bind.lo -MD -MP -MF .deps/libhclib_la-hclib-thread-bind.Tpo -c ../../src/hclib-thread-bind.c  -fPIC -DPIC -o .libs/libhclib_la-hclib-thread-bind.o\r\n../../src/hclib-thread-bind.c:20:10: fatal error: xlocale.h: No such file or directory\r\n #include <xlocale.h>\r\n          ^~~~~~~~~~~\r\ncompilation terminated.\r\nMakefile:695: recipe for target 'libhclib_la-hclib-thread-bind.lo' failed\r\nmake[2]: *** [libhclib_la-hclib-thread-bind.lo] Error 1\r\nmake[2]: Leaving directory '/tmp/hclib/compileTree/src'\r\nMakefile:770: recipe for target 'all-recursive' failed\r\nmake[1]: *** [all-recursive] Error 1\r\nmake[1]: Leaving directory '/tmp/hclib/compileTree/src'\r\nMakefile:478: recipe for target 'all-recursive' failed\r\nmake: *** [all-recursive] Error 1\r\n```"},"comment":{"url":"https://api.github.com/repos/habanero-rice/hclib/issues/comments/363484235","html_url":"https://github.com/habanero-rice/hclib/issues/61#issuecomment-363484235","issue_url":"https://api.github.com/repos/habanero-rice/hclib/issues/61","id":363484235,"user":{"login":"cogumbreiro","id":2490181,"avatar_url":"https://avatars2.githubusercontent.com/u/2490181?v=4","gravatar_id":"","url":"https://api.github.com/users/cogumbreiro","html_url":"https://github.com/cogumbreiro","followers_url":"https://api.github.com/users/cogumbreiro/followers","following_url":"https://api.github.com/users/cogumbreiro/following{/other_user}","gists_url":"https://api.github.com/users/cogumbreiro/gists{/gist_id}","starred_url":"https://api.github.com/users/cogumbreiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cogumbreiro/subscriptions","organizations_url":"https://api.github.com/users/cogumbreiro/orgs","repos_url":"https://api.github.com/users/cogumbreiro/repos","events_url":"https://api.github.com/users/cogumbreiro/events{/privacy}","received_events_url":"https://api.github.com/users/cogumbreiro/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T16:42:05Z","updated_at":"2018-02-06T16:42:05Z","author_association":"NONE","body":"@ahayashi, with your changes I don't think we need to include `xlocale.h`. Here's the full patch below that allowed it to compile in my system:\r\n\r\n```patch\r\n@@ -15,9 +15,10 @@\r\n  */\r\n \r\n #include <stdio.h>\r\n+#include <locale.h>\r\n+#include <time.h>\r\n #define _GNU_SOURCE\r\n #define __USE_GNU\r\n-#include <xlocale.h>\r\n #include <unistd.h>\r\n #include <sched.h>\r\n #include <errno.h>\r\n```"}}
{"actor":{"display_login":"cogumbreiro"}}