payload: {"action":"created","issue":{"url":"https://api.github.com/repos/nh2/static-haskell-nix/issues/68","repository_url":"https://api.github.com/repos/nh2/static-haskell-nix","labels_url":"https://api.github.com/repos/nh2/static-haskell-nix/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/nh2/static-haskell-nix/issues/68/comments","events_url":"https://api.github.com/repos/nh2/static-haskell-nix/issues/68/events","html_url":"https://github.com/nh2/static-haskell-nix/issues/68","id":530842044,"node_id":"MDU6SXNzdWU1MzA4NDIwNDQ=","number":68,"title":"nixpkgs master build: openssh/krb5 build error","user":{"login":"nh2","id":399535,"node_id":"MDQ6VXNlcjM5OTUzNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/399535?v=4","gravatar_id":"","url":"https://api.github.com/users/nh2","html_url":"https://github.com/nh2","followers_url":"https://api.github.com/users/nh2/followers","following_url":"https://api.github.com/users/nh2/following{/other_user}","gists_url":"https://api.github.com/users/nh2/gists{/gist_id}","starred_url":"https://api.github.com/users/nh2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nh2/subscriptions","organizations_url":"https://api.github.com/users/nh2/orgs","repos_url":"https://api.github.com/users/nh2/repos","events_url":"https://api.github.com/users/nh2/events{/privacy}","received_events_url":"https://api.github.com/users/nh2/received_events","type":"User","site_admin":false},"labels":[{"id":963033519,"node_id":"MDU6TGFiZWw5NjMwMzM1MTk=","url":"https://api.github.com/repos/nh2/static-haskell-nix/labels/bug","name":"bug","color":"d73a4a","default":true,"description":"Something isn't working"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-12-02T01:49:26Z","updated_at":"2019-12-02T01:59:57Z","closed_at":null,"author_association":"OWNER","body":"https://buildkite.com/nh2/static-haskell-nix/builds/158#eae147db-3177-4ab0-9a49-3140285d13fa/23-10930\r\n\r\n```\r\nIn file included from ../openbsd-compat/openbsd-compat.h:193,\r\n                 from ../includes.h:174,\r\n                 from port-aix.c:27:\r\n../openbsd-compat/bsd-misc.h:134:39: error: expected identifier or ‘(’ before ‘do’\r\n # define krb5_free_error_message(a,b) do { } while(0)\r\n                                       ^~\r\n../openbsd-compat/bsd-misc.h:134:46: error: expected identifier or ‘(’ before ‘while’\r\n # define krb5_free_error_message(a,b) do { } while(0)\r\n                                              ^~~~~\r\nIn file included from /nix/store/ivxdscf0zmi2jjkjmhj5dxk0zmrxvv2x-libkrb5-1.17-dev/include/krb5/krb5.h:8598,\r\n                 from /nix/store/ivxdscf0zmi2jjkjmhj5dxk0zmrxvv2x-libkrb5-1.17-dev/include/krb5.h:8,\r\n                 from ../auth.h:40,\r\n                 from port-aix.c:34:\r\n/nix/store/ivxdscf0zmi2jjkjmhj5dxk0zmrxvv2x-libkrb5-1.17-dev/include/com_err.h:54:65: error: conflicting types for ‘error_message’\r\n extern /*@observer@*//*@dependent@*/ const char * KRB5_CALLCONV error_message\r\n                                                                 ^~~~~~~~~~~~~\r\nIn file included from ../includes.h:171,\r\n                 from port-aix.c:27:\r\n../defines.h:665:43: note: previous declaration of ‘error_message’ was here\r\n #  define krb5_get_err_text(context,code) error_message(code)\r\n                                           ^~~~~~~~~~~~~\r\nmake[1]: *** [Makefile:99: port-aix.o] Error 1\r\nmake[1]: Leaving directory '/build/openssh-8.1p1/openbsd-compat'\r\nmake: *** [Makefile:170: openbsd-compat/libopenbsd-compat.a] Error 2\r\nbuilder for '/nix/store/ll53yyymwwflgj5l4i5gpk6bwlh7dh9d-openssh-8.1p1.drv' failed with exit code 2\r\n```\r\n\r\nExplanation: https://gist.github.com/stumbles/67c54b228df0a5d2b65d53190e4cbea4#gistcomment-3097757\r\n\r\nAh, I've got it: this is the error message you get when you define function with the same name as a macro that already exists. Example:\r\n\r\n```\r\n# define krb5_free_error_message(a,b) do { } while(0)\r\n\r\nvoid krb5_free_error_message(a,b) {}\r\n```\r\n\r\nSo this must mean that after https://github.com/openssh/openssh-portable/blob/2ff822eabd7d4461743f22d3b9ba35ab76069df5/openbsd-compat/bsd-misc.h#L134-L136\r\n\r\n```c\r\n#ifndef HAVE_KRB5_FREE_ERROR_MESSAGE\r\n# define krb5_free_error_message(a,b) do { } while(0)\r\n#endif\r\n```\r\n\r\nis executed, something `#include`s the `krb5.h` header file that defines `krb5_free_error_message` as a function.\r\n\r\n---\r\n\r\nDoing `grep -R krb5_free_error_message .` in the `--keep-failed` dir I seen in `config.log`:\r\n\r\n```\r\n  $ ./configure --prefix=/nix/store/ndgg2ayi185j5r12s66fgi1937l462s9-openssh-8.1p1 --sbindir=${out}/bin --localstatedir=/var --with-pid-dir=/run --with-mantype=man --with-libedit=yes --disable-strip --with-pam --sysconfdir=/etc/ssh --with-kerberos5=/nix/store/4ra3djsv1shbx2ycwjfgjvj0l1fz06fg-libkrb5-1.17\r\n...\r\n... lots more krb5 linker errors ...\r\n...\r\n/nix/store/jj5wh2i04zqjmsqiw2kq3fdzm0sl97d7-binutils-2.31.1/bin/ld: /nix/store/4ra3djsv1shbx2ycwjfgjvj0l1fz06fg-libkrb5-1.17/lib/libkrb5.a(kerrs.o): in function `krb5_free_error_message':\r\n(.text+0x4ad): undefined reference to `k5_free_error'\r\n...\r\n... lots more krb5 linker errors ...\r\n...\r\nac_cv_func_krb5_free_error_message=no\r\n```\r\n\r\nand in the `configure` output:\r\n\r\n```\r\nchecking for krb5_free_error_message... no\r\n...\r\n                 KerberosV support: yes\r\n```\r\n\r\nSo it enabled kerberos support (`yes`), but its internal checks for e.g. `ac_cv_func_krb5_free_error_message` failed, but not because (as was probably intended) the function isn't defined in the header, but because of a linker error.\r\n\r\nSo then autoconf silently continues (as usual :-1:), with krb5 support on but the `HAVE_` set to false, does its own define of `krb5_free_error_message`, includes `krb.h` and then fails.\r\n\r\nSo I think 2 (IMO) garbage behaviours of autoconf are at play:\r\n\r\n* Enabling `krb5` support when it clearly doesn't work (maybe the `configure.ac` of openssh is written incorrectly?)\r\n* Claiming that a linker error indicates absence of a function, as opposed to a programmer error."},"comment":{"url":"https://api.github.com/repos/nh2/static-haskell-nix/issues/comments/560194322","html_url":"https://github.com/nh2/static-haskell-nix/issues/68#issuecomment-560194322","issue_url":"https://api.github.com/repos/nh2/static-haskell-nix/issues/68","id":560194322,"node_id":"MDEyOklzc3VlQ29tbWVudDU2MDE5NDMyMg==","user":{"login":"nh2","id":399535,"node_id":"MDQ6VXNlcjM5OTUzNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/399535?v=4","gravatar_id":"","url":"https://api.github.com/users/nh2","html_url":"https://github.com/nh2","followers_url":"https://api.github.com/users/nh2/followers","following_url":"https://api.github.com/users/nh2/following{/other_user}","gists_url":"https://api.github.com/users/nh2/gists{/gist_id}","starred_url":"https://api.github.com/users/nh2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nh2/subscriptions","organizations_url":"https://api.github.com/users/nh2/orgs","repos_url":"https://api.github.com/users/nh2/repos","events_url":"https://api.github.com/users/nh2/events{/privacy}","received_events_url":"https://api.github.com/users/nh2/received_events","type":"User","site_admin":false},"created_at":"2019-12-02T01:59:57Z","updated_at":"2019-12-02T01:59:57Z","author_association":"OWNER","body":"Adding `openssh = previous.openssh.override { withKerberos = false; };` is one fix.\r\n\r\nThe alternative would be to somehow fix it so that the `configure` test links correctly."}}
other: {"actor":{"display_login":"nh2"}}