{"action":"created","issue":{"url":"https://api.github.com/repos/rescrv/libmacaroons/issues/43","repository_url":"https://api.github.com/repos/rescrv/libmacaroons","labels_url":"https://api.github.com/repos/rescrv/libmacaroons/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/rescrv/libmacaroons/issues/43/comments","events_url":"https://api.github.com/repos/rescrv/libmacaroons/issues/43/events","html_url":"https://github.com/rescrv/libmacaroons/issues/43","id":168097698,"number":43,"title":"No installation documentation + Linux installation problems","user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-28T13:38:40Z","updated_at":"2016-07-29T12:13:09Z","closed_at":null,"body":"There seems to be nothing in the repository that documents how\r\nto build the libmacaroons library.\r\n\r\nI got as far as:\r\n\r\n    autoconf\r\n    ./configure\r\n    make\r\n\r\nAt this point, we get this error:\r\n\r\n\tmake --no-print-directory all-am\r\n\t  CC       base64.lo\r\n\t  CC       macaroons.lo\r\n\tmacaroons.c:48:2: error: #error portability problem\r\n\t #error portability problem\r\n\t  ^\r\n\tmake[1]: *** [macaroons.lo] Error 1\r\n\tmake: *** [all] Error 2\r\n\r\nbecause libbsd (which doesn't exist on Linux) is required.\r\nIt seems that this is to get the arc4random_buf function,\r\nwhich doesn't exist in Linux. How about using [getrandom](http://man7.org/linux/man-pages/man2/getrandom.2.html) instead in Linux? ... except that getrandom\r\ndoesn't appear to exist in Ubuntu 14.04 which I'm using. Perhaps\r\nthe only decent solution is to open /dev/urandom directly.\r\n\r\nIf that include is deleted, we then get a bunch of errors like this:\r\n\r\n\tport.c: In function 'macaroon_bin2hex':\r\n\tport.c:130:5: error: 'for' loop initial declarations are only allowed in C99 mode\r\n\t     for (size_t i = 0; i < bin_sz; ++i)\r\n\t     ^\r\n\tport.c:130:5: note: use option -std=c99 or -std=gnu99 to compile your code\r\n\tmake[1]: *** [port.lo] Error 1\r\n\tmake: *** [all] Error 2\r\n\r\nbecause declaring variables inside for loops isn't pre-C99 standard C.\r\nHaving fixed that, it finally compiles (but really it shouldn't because\r\nthere's no definition of arc4random_buf available - if the declaration in\r\nport.c was removed, then at least the compile *should* fail correctly,\r\nbut it doesn't because somehow the warnings for use of undeclared functions\r\nseem to be disabled).\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rescrv/libmacaroons/issues/comments/236165039","html_url":"https://github.com/rescrv/libmacaroons/issues/43#issuecomment-236165039","issue_url":"https://api.github.com/repos/rescrv/libmacaroons/issues/43","id":236165039,"user":{"login":"rogpeppe","id":66491,"avatar_url":"https://avatars.githubusercontent.com/u/66491?v=3","gravatar_id":"","url":"https://api.github.com/users/rogpeppe","html_url":"https://github.com/rogpeppe","followers_url":"https://api.github.com/users/rogpeppe/followers","following_url":"https://api.github.com/users/rogpeppe/following{/other_user}","gists_url":"https://api.github.com/users/rogpeppe/gists{/gist_id}","starred_url":"https://api.github.com/users/rogpeppe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogpeppe/subscriptions","organizations_url":"https://api.github.com/users/rogpeppe/orgs","repos_url":"https://api.github.com/users/rogpeppe/repos","events_url":"https://api.github.com/users/rogpeppe/events{/privacy}","received_events_url":"https://api.github.com/users/rogpeppe/received_events","type":"User","site_admin":false},"created_at":"2016-07-29T12:13:09Z","updated_at":"2016-07-29T12:13:09Z","body":"I tried to run autoconf under Mac OS X 14.1.0 and got errors about undefined macros (AM_INIT_AUTOMAKE, AM_PATH_PYTHON, AC_PYTHON_DEVEL and AM_CONDITIONAL)\r\n\r\nAs usual the whole autoconf system is almost impossible to debug.\r\n\r\nI also tried to get a bit further with compiling under Ubuntu 14.04 by defining a getrandom function that read from /dev/urandom. I got a simple C program working OK, but then I was unable to build the bindings/python code. I get the following cython error:\r\n\r\n\t% make distdir\r\n\t  PYX      bindings/python/macaroons.c\r\n\t\r\n\tError compiling Cython file:\r\n\t------------------------------------------------------------\r\n\t...\r\n\t        MACAROON_V1\r\n\t        MACAROON_V2\r\n\t        MACAROON_V2J\r\n\t    cdef macaroon_format MACAROON_LATEST\r\n\t    cdef macaroon_format MACAROON_LATEST_JSON\r\n\t    size_t macaroon_serialize_size_hint(const macaroon* M, macaroon_format f);\r\n\t                                                                            ^\r\n\t------------------------------------------------------------\r\n\t\r\n\tbindings/python/macaroons.pyx:81:77: Syntax error in C variable declaration\r\n\tmake: *** [bindings/python/macaroons.c] Error 1\r\n\r\nUnfortunately I'm not familiar enough with cython to know what the problem is here.\r\n"}}
{"actor":{"display_login":"rogpeppe"}}