Title: “lxml & xmlsec libxml2 library version mismatch” error under uWSGI · Issue #320 · xmlsec/python-xmlsec · GitHub
Open Graph Title: “lxml & xmlsec libxml2 library version mismatch” error under uWSGI · Issue #320 · xmlsec/python-xmlsec
X Title: “lxml & xmlsec libxml2 library version mismatch” error under uWSGI · Issue #320 · xmlsec/python-xmlsec
Description: If libxml2-dev was installed when uWSGI was built, then importing xmlsec within uWSGI leads to an incorrect error xmlsec.InternalError: (-1, 'lxml & xmlsec libxml2 library version mismatch'). There’s no such error outside of uWSGI. (I ca...
Open Graph Description: If libxml2-dev was installed when uWSGI was built, then importing xmlsec within uWSGI leads to an incorrect error xmlsec.InternalError: (-1, 'lxml & xmlsec libxml2 library version mismatch'). There...
X Description: If libxml2-dev was installed when uWSGI was built, then importing xmlsec within uWSGI leads to an incorrect error xmlsec.InternalError: (-1, 'lxml & xmlsec libxml2 library version mismatch&...
Opengraph URL: https://github.com/xmlsec/python-xmlsec/issues/320
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"“lxml \u0026 xmlsec libxml2 library version mismatch” error under uWSGI","articleBody":"If libxml2-dev was installed when uWSGI was built, then importing `xmlsec` within uWSGI leads to an incorrect error `xmlsec.InternalError: (-1, 'lxml \u0026 xmlsec libxml2 library version mismatch')`. There’s no such error outside of uWSGI.\n\n(I can work around this error with `--no-binary=lxml --no-binary=xmlsec`, but that wastes a lot more CI time and shouldn’t be necessary.)\n\nReproduction in a fresh container:\n\n```console\n$ docker run --rm -it ubuntu:22.04\nroot@076333186bac:/# apt update\n…\nroot@076333186bac:/# apt install -y gcc libxml2-dev python3-dev python3-venv pkg-config\n…\nroot@076333186bac:/# python3 -m venv venv\nroot@076333186bac:/# . venv/bin/activate\n(venv) root@076333186bac:/# pip install uWSGI xmlsec\n…\nSuccessfully installed lxml-5.2.1 uWSGI-2.0.25.1 xmlsec-1.3.14\n(venv) root@076333186bac:/# cat \u003e app.py \u003c\u003cEOF\nimport xmlsec\n\ndef application(env, start_response):\n start_response(\"200 OK\", [(\"Content-Type\", \"text/plain\")])\n return [b\"Hello, world!\\n\"]\n\nEOF\n(venv) root@076333186bac:/# python -c 'import xmlsec'\n(venv) root@076333186bac:/# uwsgi --http :9090 --wsgi-file app.py\n*** Starting uWSGI 2.0.25.1 (64bit) on [Mon May 6 22:18:16 2024] ***\ncompiled with version: 11.4.0 on 06 May 2024 22:17:53\nos: Linux-6.8.7 #1-NixOS SMP PREEMPT_DYNAMIC Wed Apr 17 09:23:43 UTC 2024\nnodename: 076333186bac\nmachine: x86_64\nclock source: unix\ndetected number of CPU cores: 12\ncurrent working directory: /\ndetected binary path: /venv/bin/uwsgi\n!!! no internal routing support, rebuild with pcre support !!!\nuWSGI running as root, you can use --uid/--gid/--chroot options\n*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** \n*** WARNING: you are running uWSGI without its master process manager ***\nyour memory page size is 4096 bytes\ndetected max file descriptor number: 1024\nlock engine: pthread robust mutexes\nthunder lock: disabled (you can enable it with --thunder-lock)\nuWSGI http bound on :9090 fd 4\nspawned uWSGI http 1 (pid: 4203)\nuwsgi socket 0 bound to TCP address 127.0.0.1:46691 (port auto-assigned) fd 3\nuWSGI running as root, you can use --uid/--gid/--chroot options\n*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** \nPython version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]\n*** Python threads support is disabled. You can enable it with --enable-threads ***\nPython main interpreter initialized at 0x55a23eea0bc0\nuWSGI running as root, you can use --uid/--gid/--chroot options\n*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** \nyour server socket listen backlog is limited to 100 connections\nyour mercy for graceful operations on workers is 60 seconds\nmapped 72904 bytes (71 KB) for 1 cores\n*** Operational MODE: single process ***\nTraceback (most recent call last):\n File \"app.py\", line 1, in \u003cmodule\u003e\n import xmlsec\nxmlsec.InternalError: (-1, 'lxml \u0026 xmlsec libxml2 library version mismatch')\nunable to load app 0 (mountpoint='') (callable not found or import error)\n*** no app loaded. going in full dynamic mode ***\nuWSGI running as root, you can use --uid/--gid/--chroot options\n*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** \n*** uWSGI is running in multiple interpreter mode ***\nspawned uWSGI worker 1 (and the only) (pid: 4202, cores: 1)\n```","author":{"url":"https://github.com/andersk","@type":"Person","name":"andersk"},"datePublished":"2024-05-06T22:28:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":21},"url":"https://github.com/320/python-xmlsec/issues/320"}
| 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:e9b406aa-3b0f-8a33-78a0-db32c90a29f5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83FC:1272F1:17A2B9:20F9C9:696A63C2 |
| html-safe-nonce | 50904d389518945b7cef493f3ce7fdc19f8bf92f6bce396dd601e35ecbca67c7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0ZDOjEyNzJGMToxN0EyQjk6MjBGOUM5OjY5NkE2M0MyIiwidmlzaXRvcl9pZCI6IjM0MDA2NTk4MTczMzQzMDIxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1446a7e1e15a02295cfb9651e11b45f435a84b848b46c8783fe58e70a58b8c1f |
| hovercard-subject-tag | issue:2281897093 |
| 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/xmlsec/python-xmlsec/320/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca9ef68e519942746818d34defb70e67f05dcaa52e2063d71264bae1410858c1/xmlsec/python-xmlsec/issues/320 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca9ef68e519942746818d34defb70e67f05dcaa52e2063d71264bae1410858c1/xmlsec/python-xmlsec/issues/320 |
| og:image:alt | If libxml2-dev was installed when uWSGI was built, then importing xmlsec within uWSGI leads to an incorrect error xmlsec.InternalError: (-1, 'lxml & xmlsec libxml2 library version mismatch'). There... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andersk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9b7735a184970dd9333b2cbe036c8f3c0a9108c64aaa93827c5a64fc70993392 |
| turbo-cache-control | no-preview |
| go-import | github.com/xmlsec/python-xmlsec git https://github.com/xmlsec/python-xmlsec.git |
| octolytics-dimension-user_id | 111647685 |
| octolytics-dimension-user_login | xmlsec |
| octolytics-dimension-repository_id | 27934955 |
| octolytics-dimension-repository_nwo | xmlsec/python-xmlsec |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27934955 |
| octolytics-dimension-repository_network_root_nwo | xmlsec/python-xmlsec |
| 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 | 87cbd411c2982752221b5751d583a515b23bf5fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width