[issue45002] won't match correct version of tcl/tk

2021-09-18 Thread 郑之为

郑之为  added the comment:

OK... It's fine now, tests are still failing

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45002] won't match correct version of tcl/tk

2021-08-25 Thread Ned Deily


Ned Deily  added the comment:

It is difficult to offer suggestions based on minimal information. You may be 
running into an arch mismatch: since you are requesting a universal2 build 
(x86_64 and arm64), all the third-party libraries your build links with must 
also be built with both architectures. Or it still could be a mismatched path 
problem. You can use the otool -L command I suggested before on the renamed 
_tkinter.so file left in your build/lib.macosx-11.5-universal2-3.11 directory 
to determine what path to the Tcl and Tk libraries it is using; it should be an 
absolute path to the Homebrew libraries.  You can also use the "file" command 
on the _tkinter file and on the Tcl and Tk library files to determine which 
archs are present in each. If this is your first attempt at building Python on 
macOS, I suggest you start with a simpler ./configure command and then consider 
adding other options after you have that working. To start with you should only 
need something like:

./configure --prefix=... --with-openssl=... --with-tcltk-includes=... 
--with-tcltk-libs=...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45002] won't match correct version of tcl/tk

2021-08-25 Thread 郑之为

郑之为  added the comment:

now it's more like:
*** WARNING: renaming "_tkinter" since importing it failed: 
dlopen(/Users/jett/cpython/build/lib.macosx-11.5-universal2-3.11/_tkinter.cpython-311-darwin.so,
 2): Symbol not found: _TclBN_mp_clear
  Referenced from: 
/Users/jett/cpython/build/lib.macosx-11.5-universal2-3.11/_tkinter.cpython-311-darwin.so
  Expected in: flat namespace
 in 
/Users/jett/cpython/build/lib.macosx-11.5-universal2-3.11/_tkinter.cpython-311-darwin.so

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_gdbm ossaudiodev   spwd   
To find the necessary bits, look in setup.py in detect_modules() for the 
module's name.


The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
_abc  pwd   time   


Following modules built successfully but were removed because they could not be 
imported:
_tkinter  


and this:
jett@zhengzhweidembp iucn % /Users/jett/python311/bin/python3.11 guimain.py 
 Traceback (most recent call last):  File 
"/Users/jett/Desktop/GitHub/Repos/iucn/guimain.py", line 1, in 
from tkinter import *
^
  File "/Users/jett/python311/lib/python3.11/tkinter/__init__.py", line 37, in 

import _tkinter # If this fails your Python may not be configured for Tk
^^^
ModuleNotFoundError: No module named '_tkinter'

ans this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45002] won't match correct version of tcl/tk

2021-08-25 Thread Ned Deily


Ned Deily  added the comment:

Can you be more specific about what you mean by "executable" and "library"?

In particular, please show the results of, where /path/to/python is replaced by 
the path to the python you have built or installed:

otool -L $(/path/to/python -c 'import _tkinter;print(_tkinter.__file__)')

Most likely the issue is that you need to use additional ./configure arguments 
rather than trying to modify CFLAGS et al:

  --with-tcltk-includes='-I...'
  override search for Tcl and Tk include files
  --with-tcltk-libs='-L...'
  override search for Tcl and Tk libs

or set up the path to pkg-config info for Homebrew's Tcl and Tk packages.  See 
the comments in setup.py for more info:

https://github.com/python/cpython/blob/main/setup.py#L1898

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45002] won't match correct version of tcl/tk

2021-08-25 Thread 郑之为

New submission from 郑之为 :

I used the following config:
./configure --prefix=/Users/jett/python311 --enable-optimizations --enable-ipv6 
--enable-big-digits=30 --with-lto=full 
--with-experimental-isolated-subinterpreters --with-static-libpython 
--enable-universalsdk --with-universal-archs=universal2 
--with-openssl=/opt/homebrew/opt/openssl@1.1

export CFLAGS="-I/opt/homebrew/opt/xz/include 
-I/opt/homebrew/opt/tcl-tk/include"
export CPPFLAGS="-I/opt/homebrew/opt/xz/include 
-I/opt/homebrew/opt/tcl-tk/include"
export LDFLAGS="-L/opt/homebrew/opt/tcl-tk/lib"

and got a version mismatch error: the executable is 8.6 and the library is 8.5

--
components: Build
messages: 400272
nosy: jett8998
priority: normal
severity: normal
status: open
title: won't match correct version of tcl/tk
type: behavior
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com