{"action":"created","issue":{"url":"https://api.github.com/repos/openwrt/packages/issues/767","labels_url":"https://api.github.com/repos/openwrt/packages/issues/767/labels{/name}","comments_url":"https://api.github.com/repos/openwrt/packages/issues/767/comments","events_url":"https://api.github.com/repos/openwrt/packages/issues/767/events","html_url":"https://github.com/openwrt/packages/issues/767","id":53977892,"number":767,"title":"python 2.7.3 fails to build on MAC OS X / BSD","user":{"login":"plntyk","id":8328897,"avatar_url":"https://avatars.githubusercontent.com/u/8328897?v=3","gravatar_id":"","url":"https://api.github.com/users/plntyk","html_url":"https://github.com/plntyk","followers_url":"https://api.github.com/users/plntyk/followers","following_url":"https://api.github.com/users/plntyk/following{/other_user}","gists_url":"https://api.github.com/users/plntyk/gists{/gist_id}","starred_url":"https://api.github.com/users/plntyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plntyk/subscriptions","organizations_url":"https://api.github.com/users/plntyk/orgs","repos_url":"https://api.github.com/users/plntyk/repos","events_url":"https://api.github.com/users/plntyk/events{/privacy}","received_events_url":"https://api.github.com/users/plntyk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-11T01:18:05Z","updated_at":"2015-01-15T23:21:05Z","closed_at":null,"body":"there was a patch but it was not applied for unknown reasons\r\n\r\nforum report: https://forum.openwrt.org/viewtopic.php?id=50205\r\nprev patchwork entry 3424\r\n\r\nSince this is the second time this issue popped up maybe applying this makes sense?\r\nI don't have MacOS X so I cannot test this\r\n\r\n```\r\nHi,\r\n\r\nthis small fix allows cross-compile of python on BSD hosts.\r\n\r\nSigned-off-by: Waldemar Brodkorb <mail@waldemar-brodkorb.de>\r\n\r\nPatch\r\n\r\nIndex: lang/python/Makefile\r\n===================================================================\r\n--- lang/python/Makefile    (revision 35899)\r\n+++ lang/python/Makefile    (working copy)\r\n@@ -9,7 +9,7 @@ \r\n \r\n PKG_NAME:=python\r\n PKG_VERSION:=2.7.3\r\n-PKG_RELEASE:=2\r\n+PKG_RELEASE:=3\r\n \r\n PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz\r\n PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)\r\n@@ -162,6 +162,7 @@ \r\n         --with-threads \\\r\n         --with-system-ffi=\"$(STAGING_DIR)/usr\" \\\r\n         $(ENABLE_IPV6) \\\r\n+        MACHDEP=linux2 \\\r\n         ac_cv_have_chflags=no \\\r\n         ac_cv_have_lchflags=no \\\r\n         ac_cv_py_format_size_t=no \\\r\n```"},"comment":{"url":"https://api.github.com/repos/openwrt/packages/issues/comments/70181836","html_url":"https://github.com/openwrt/packages/issues/767#issuecomment-70181836","issue_url":"https://api.github.com/repos/openwrt/packages/issues/767","id":70181836,"user":{"login":"plntyk","id":8328897,"avatar_url":"https://avatars.githubusercontent.com/u/8328897?v=3","gravatar_id":"","url":"https://api.github.com/users/plntyk","html_url":"https://github.com/plntyk","followers_url":"https://api.github.com/users/plntyk/followers","following_url":"https://api.github.com/users/plntyk/following{/other_user}","gists_url":"https://api.github.com/users/plntyk/gists{/gist_id}","starred_url":"https://api.github.com/users/plntyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plntyk/subscriptions","organizations_url":"https://api.github.com/users/plntyk/orgs","repos_url":"https://api.github.com/users/plntyk/repos","events_url":"https://api.github.com/users/plntyk/events{/privacy}","received_events_url":"https://api.github.com/users/plntyk/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T23:21:05Z","updated_at":"2015-01-15T23:21:05Z","body":"I just reported the issue from the forum here - but\r\nI am atm struggling with setting up BSD and testing the build there (several traps there)\r\n\r\nShort summary:\r\n- I do not have a MacOS X machine nor access to one where this issue was last seen (forum, 2014)\r\n__So I cannot say anything about MacOSX // looking up the m4/autoconf internals will take too much time (and I am not sure I can even understand these)__\r\n\r\n- PC-BSD 10.1 throws several errors in tools (similar to FreeBSD) atm I stopped testing there (frustrating ^^)\r\n- __FreeBSD 9.3 compiles python 2.7.9 without errors__ (has same tools issue)\r\n\r\nhowever atm there are 4 \"patches\" to get compile on FreeBSD 9.3 to packages stage:\r\n- revert r37183 (I dont have any idea about side effects on Linux compilation or why there are these headers in the first place) to make tools/xz compile\r\n- add \"--enable-iconv=no --with-libiconv=gnu\" and \"usr/local/{include,lib} -liconv\" LD/CFLAGS to tools/pkg-config makefile to make \r\n- tools/mpfr needs for gcc49 : https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193340\r\n- prevent tools/mkimage (unresolved) - I cannot even get tools from vanilla u-boot git tree built in FreeBSD either (-nostdinc is used and this prevents including a headerfile thats \"not found\" sys/_types.h)\r\n\r\nSo from preliminary test this does not seem to be an issue with BSD anymore. (only speaking for FreeBSD) \r\nIf there are side effects of using the patch from Waldemar with Linux which is arguably the main build platform then just stash this away - until some developer with a MacOS X is coming around to test/debug/review\r\n\r\n"}}