Title: Envvars not set in subshell in macOS Python 3.7-3.9 configure invocation · Issue #1049 · python/devguide · GitHub
Open Graph Title: Envvars not set in subshell in macOS Python 3.7-3.9 configure invocation · Issue #1049 · python/devguide
X Title: Envvars not set in subshell in macOS Python 3.7-3.9 configure invocation · Issue #1049 · python/devguide
Description: Describe the bug I've tried building Python 3.9.16 on macOS following the dev guide and I believe there is an issue with the command as pkg-config fails to get the value set for PKG_CONFIG_PATH as, in my limited knowledge of the shell, I...
Open Graph Description: Describe the bug I've tried building Python 3.9.16 on macOS following the dev guide and I believe there is an issue with the command as pkg-config fails to get the value set for PKG_CONFIG_PATH as,...
X Description: Describe the bug I've tried building Python 3.9.16 on macOS following the dev guide and I believe there is an issue with the command as pkg-config fails to get the value set for PKG_CONFIG_PATH...
Opengraph URL: https://github.com/python/devguide/issues/1049
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Envvars not set in subshell in macOS Python 3.7-3.9 configure invocation","articleBody":"**Describe the bug**\r\n\r\nI've tried building Python 3.9.16 on macOS following the dev guide and I believe there is an issue with the command as `pkg-config` fails to get the value set for `PKG_CONFIG_PATH` as, in my limited knowledge of the shell, I believe `pkg-config --libs tcl tk` runs on a subshell.\r\n\r\nThe current `configure` command produces the following output:\r\n\r\n```sh\r\n$ CFLAGS=\"-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include\" \\\r\n LDFLAGS=\"-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib\" \\\r\n PKG_CONFIG_PATH=\"$(brew --prefix tcl-tk)/lib/pkgconfig\" \\\r\n ./configure --with-pydebug \\\r\n --with-openssl=$(brew --prefix openssl@1.1) \\\r\n --with-tcltk-libs=\"$(pkg-config --libs tcl tk)\" \\\r\n --with-tcltk-includes=\"$(pkg-config --cflags tcl tk)\"\r\nPackage tcl was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `tcl.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'tcl' found\r\nPackage tk was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `tk.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'tk' found\r\nPackage tcl was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `tcl.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'tcl' found\r\nPackage tk was not found in the pkg-config search path.\r\nPerhaps you should add the directory containing `tk.pc'\r\nto the PKG_CONFIG_PATH environment variable\r\nNo package 'tk' found\r\n```\r\n\r\n**Expected behavior**\r\n\r\nThe one-line command should properly set `PKG_CONFIG_PATH`.\r\n\r\nI've had success running the following:\r\n\r\n```sh\r\n$ export PKG_CONFIG_PATH=\"$(brew --prefix tcl-tk)/lib/pkgconfig\"; \\\r\nCFLAGS=\"-I$(brew --prefix gdbm)/include -I$(brew --prefix xz)/include\" \\\r\nLDFLAGS=\"-L$(brew --prefix gdbm)/lib -L$(brew --prefix xz)/lib\" \\\r\n./configure --with-pydebug \\\r\n --with-openssl=$(brew --prefix openssl@1.1) \\\r\n --with-tcltk-libs=\"$(pkg-config --libs tcl tk)\" \\\r\n --with-tcltk-includes=\"$(pkg-config --cflags tcl tk)\"\r\nchecking build system type... aarch64-apple-darwin22.3.0\r\nchecking host system type... aarch64-apple-darwin22.3.0\r\nchecking for python3.9... python3.9\r\nchecking for --enable-universalsdk... no\r\nchecking for --with-universal-archs... no\r\nchecking MACHDEP... \"darwin\"\r\nchecking for gcc... gcc\r\nchecking whether the C compiler works... yes\r\nchecking for C compiler default output file name... a.out\r\nchecking for suffix of executables...\r\nchecking whether we are cross compiling... no\r\nchecking for suffix of object files... o\r\nchecking whether we are using the GNU C compiler... yes\r\nchecking whether gcc accepts -g... yes\r\nchecking for gcc option to accept ISO C89... none needed\r\nchecking how to run the C preprocessor... gcc -E\r\nchecking for grep that handles long lines and -e... /usr/bin/grep\r\nchecking for a sed that does not truncate output... /usr/bin/sed\r\nchecking for --with-cxx-main=\u003ccompiler\u003e... no\r\nchecking for g++... no\r\nconfigure:\r\n\r\n By default, distutils will build C++ extension modules with \"g++\".\r\n If this is not intended, then set CXX on the configure command line.\r\n\r\nchecking for the platform triplet based on compiler characteristics... darwin\r\nchecking for multiarch...\r\nchecking for -Wl,--no-as-needed... no\r\nchecking for egrep... /usr/bin/grep -E\r\nchecking for ANSI C header files... yes\r\nchecking for sys/types.h... yes\r\nchecking for sys/stat.h... yes\r\nchecking for stdlib.h... yes\r\nchecking for string.h... yes\r\nchecking for memory.h... yes\r\nchecking for strings.h... yes\r\nchecking for inttypes.h... yes\r\nchecking for stdint.h... yes\r\nchecking for unistd.h... yes\r\nchecking minix/config.h usability... no\r\nchecking minix/config.h presence... ^C%\r\n```\r\n\r\n**Additional context**\r\n\r\nThere must be something that can be done differently, but I know I'm no expert in the matter.\r\n","author":{"url":"https://github.com/cesarcoatl","@type":"Person","name":"cesarcoatl"},"datePublished":"2023-02-09T16:37:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/1049/devguide/issues/1049"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a2705e2c-00dc-c284-9c19-6acd102a8c4c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B49A:26204A:A3F8E6:DC4BF7:696991DE |
| html-safe-nonce | c0f33199b39f7697f4a16aaa9dadf9bb5289a5a440f53b5554732de1103e2001 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDlBOjI2MjA0QTpBM0Y4RTY6REM0QkY3OjY5Njk5MURFIiwidmlzaXRvcl9pZCI6IjI5MjgwMTIxODgyMjkxNDUwNTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d2da843c9bd7971578dc8bb44938cbeb7554196b7f0121ee80a079cf866fe691 |
| hovercard-subject-tag | issue:1578227837 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/devguide/1049/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8e02375b481c19abf6653ca331c90af612404262128770668d37a2487dd2db48/python/devguide/issues/1049 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8e02375b481c19abf6653ca331c90af612404262128770668d37a2487dd2db48/python/devguide/issues/1049 |
| og:image:alt | Describe the bug I've tried building Python 3.9.16 on macOS following the dev guide and I believe there is an issue with the command as pkg-config fails to get the value set for PKG_CONFIG_PATH as,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cesarcoatl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3542e147982176a7ebaa23dfb559c8af16f721c03ec560c68c56b64a0f35e751 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/devguide git https://github.com/python/devguide.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 63972479 |
| octolytics-dimension-repository_nwo | python/devguide |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 63972479 |
| octolytics-dimension-repository_network_root_nwo | python/devguide |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | af80af7cc9e3de9c336f18b208a600950a3c187c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width