{"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":4,"created_at":"2015-01-11T01:18:05Z","updated_at":"2015-01-19T17:46:55Z","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/70533366","html_url":"https://github.com/openwrt/packages/issues/767#issuecomment-70533366","issue_url":"https://api.github.com/repos/openwrt/packages/issues/767","id":70533366,"user":{"login":"commodo","id":2766732,"avatar_url":"https://avatars.githubusercontent.com/u/2766732?v=3","gravatar_id":"","url":"https://api.github.com/users/commodo","html_url":"https://github.com/commodo","followers_url":"https://api.github.com/users/commodo/followers","following_url":"https://api.github.com/users/commodo/following{/other_user}","gists_url":"https://api.github.com/users/commodo/gists{/gist_id}","starred_url":"https://api.github.com/users/commodo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/commodo/subscriptions","organizations_url":"https://api.github.com/users/commodo/orgs","repos_url":"https://api.github.com/users/commodo/repos","events_url":"https://api.github.com/users/commodo/events{/privacy}","received_events_url":"https://api.github.com/users/commodo/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T17:46:55Z","updated_at":"2015-01-19T17:46:55Z","body":"So, I decided to test this again and pay a bit more attention (in case I didn't before).\r\nAdding `MACHDEP=linux2` seems to disable the creation of `libpython.so` and builds a monolithic python executable.\r\nStill no idea why.\r\nIf this would not happen, I'd have no objection to adding this patch.\r\n\r\nIf you say that it works on FreeBSD, then I'd like to take the lazy way and not try to fix/investigate this further.\r\nJust to clarify: the build tools issue you're having is not related to Python, right ?\r\n\r\nI'll keep the patch for later consideration :)\r\nThanks for pointing it out.\r\n\r\nPython differs a lot from 2.7.3 to 2.7.9 build-wise, in the sense that the cross-compilation is a bit better."}}