Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

_tkinter build issue on Centos7 due changing TK/TCL detection by configure script. #95957

Copy link
Copy link
@sharewax

Description

@sharewax
Issue body actions

Bug report

I'm trying to build python 3.11rc1 and faced with issue with correct importing _tkinter module due RPM build.
Connected issues 90005 and pull request 31698.

I've installed tk-devel and tcl-devel packages on Centos7, but they are quite old (2015 year), but still usable and should be supported by python3.11. It doesn't contain needed .pc files for pkg-config, so during compilation correct flags aren't added.

During compilation and building debug environment I've got:

gcc -pthread -shared -L/opt/wargaming/wargaming-python311/root/usr/lib64-Wl,-z,relro -Wl,-rpath,/opt/wargaming/wargaming-python311/root/usr/lib64 -
Wl,--enable-new-dtags -g -L/usr/lib64/openssl11 -L/usr/lib64 -L/opt/wargaming/wargaming-python311/root/usr/lib64-Wl,-z,relro -Wl,-rpath,/opt/wargam
ing/wargaming-python311/root/usr/lib64 -Wl,--enable-new-dtags -g -L/usr/lib64/openssl11 -L/usr/lib64 -L/opt/wargaming/wargaming-python311/root/usr/
lib64-Wl,-z,relro -Wl,-rpath,/opt/wargaming/wargaming-python311/root/usr/lib64 -Wl,--enable-new-dtags -g -L/usr/lib64/openssl11 -L/usr/lib64 -flto
-fuse-linker-plugin -ffat-lto-objects -flto-partition=none -g -L/opt/wargaming/wargaming-python311/root/usr/lib64-Wl,-z,relro -Wl,-rpath,/opt/warga
ming/wargaming-python311/root/usr/lib64 -Wl,--enable-new-dtags -g -L/usr/lib64/openssl11 -L/usr/lib64 -L/opt/wargaming/wargaming-python311/root/usr
/lib64-Wl,-z,relro -Wl,-rpath,/opt/wargaming/wargaming-python311/root/usr/lib64 -Wl,--enable-new-dtags -g -L/usr/lib64/openssl11 -L/usr/lib64 -I/op
t/wargaming/wargaming-python311/root/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffe
r-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/usr/include/openssl11 -I/usr/include build/temp.linux-x86_64-3.11
-pydebug/builddir/build/BUILD/Python-3.11.0rc1/Modules/_ctypes/_ctypes.o build/temp.linux-x86_64-3.11-pydebug/builddir/build/BUILD/Python-3.11.0rc1
/Modules/_ctypes/callbacks.o build/temp.linux-x86_64-3.11-pydebug/builddir/build/BUILD/Python-3.11.0rc1/Modules/_ctypes/callproc.o build/temp.linux
-x86_64-3.11-pydebug/builddir/build/BUILD/Python-3.11.0rc1/Modules/_ctypes/cfield.o build/temp.linux-x86_64-3.11-pydebug/builddir/build/BUILD/Pytho
n-3.11.0rc1/Modules/_ctypes/stgdict.o -L. -L/opt/wargaming/wargaming-python311/root/usr/lib64 -L/usr/lib64/openssl11 -L/usr/lib64 -L/usr/local/lib
-lffi -ldl -o build/lib.linux-x86_64-3.11-pydebug/_ctypes.cpython-311d-x86_64-linux-gnu.so
*** WARNING: renaming "_tkinter" since importing it failed: /builddir/build/BUILD/Python-3.11.0rc1/build/debug/build/lib.linux-x86_64-3.11-pydebug/
_tkinter.cpython-311d-x86_64-linux-gnu.so: undefined symbol: Tcl_AddErrorInfo
Following modules built successfully but were removed because they could not be imported:
_tkinter

It seems that I need correct TCLTK_CFLAGS and TCLTK_LIBS, but it's quite problematic to find it manually and it's better than on Centos7 it will be detected automatically.

Adding in SPEC file the next string:
export TCLTK_LIBS="-ltk8.5 -ltcl8.5"
solves the issue.

Your environment

docker with mock inside, devtoolset-9 is present, openssl11.

  • CPython versions tested on: 3.11rc1
  • Operating system and architecture: Centos7, x86_64
Reactions are currently unavailable

Metadata

Metadata

Labels

docsDocumentation in the Doc dirDocumentation in the Doc dirtriagedThe issue has been accepted as valid by a triager.The issue has been accepted as valid by a triager.
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.