Hi!
I tried to build current samba on older system - this time it is a debian
buster.
And ./configure fails while trying to verify if python is working:
-----------------------------------------------------------------------------------------------
Checking for python version >= 3.6.0
3.7.3
['python3.7', '-c', "\ntry:\n\tfrom distutils.sysconfig
import get_config_var, get_python_lib\nexcept ImportError:\n\tfrom sysconfig
import
get_config_var, get_path\n\tdef get_python_lib(*k,
**kw):\n\t\tkeyword='platlib' if kw.get('plat_specific') else
'purelib'\n\t\tif 'prefix' in
kw:\n\t\t\treturn get_path(keyword, vars={'installed_base':
kw['prefix'], 'platbase': kw['prefix']})\n\t\treturn
get_path(keyword)\n\nprint(repr(get_config_var('prefix') or
''))\nprint(repr(get_config_var('SO') or
''))\nprint(repr(get_config_var('EXT_SUFFIX') or
''))\nprint(repr(get_config_var('LDFLAGS') or
''))\nprint(repr(get_config_var('LIBDIR') or
''))\nprint(repr(get_config_var('LIBPL') or
''))\nprint(repr(get_config_var('INCLUDEPY') or
''))\nprint(repr(get_config_var('Py_ENABLE_SHARED') or
''))\nprint(repr(get_config_var('MACOSX_DEPLOYMENT_TARGET') or
''))\nprint(repr(get_config_var('LDSHARED') or
''))\nprint(repr(get_config_var('CFLAGS') or
''))\nprint(repr(get_config_var('LDVERSION') or
''))"]
err: Traceback (most recent call last):
File "<string>", line 12, in <module>
File "/usr/lib/python3.7/distutils/sysconfig.py", line 571, in
get_config_var
return get_config_vars().get(name)
File "/usr/lib/python3.7/distutils/sysconfig.py", line 503, in
get_config_vars
func()
File "/usr/lib/python3.7/distutils/sysconfig.py", line 463, in
_init_posix
_temp = __import__(name, globals(), locals(), ['build_time_vars'],
0)
ModuleNotFoundError: No module named
'_sysconfigdata__linux_x86_64-linux-gnu'
from /build/pkg/talloc-2.4.1/bld/python3.7: Could not run ['python3.7']
The interesting thing is that this code, when run from a file, Just Works:
$ echo -e "\ntry:\n\tfrom distutils.sysconfig import
get_config_var.....') or ''))" > t.py
$ cat t.py
try:
from distutils.sysconfig import get_config_var, get_python_lib
except ImportError:
from sysconfig import get_config_var, get_path
def get_python_lib(*k, **kw):
keyword='platlib' if kw.get('plat_specific') else
'purelib'
if 'prefix' in kw:
return get_path(keyword, vars={'installed_base':
kw['prefix'], 'platbase': kw['prefix']})
return get_path(keyword)
print(repr(get_config_var('prefix') or ''))
print(repr(get_config_var('SO') or ''))
print(repr(get_config_var('EXT_SUFFIX') or ''))
print(repr(get_config_var('LDFLAGS') or ''))
print(repr(get_config_var('LIBDIR') or ''))
print(repr(get_config_var('LIBPL') or ''))
print(repr(get_config_var('INCLUDEPY') or ''))
print(repr(get_config_var('Py_ENABLE_SHARED') or ''))
print(repr(get_config_var('MACOSX_DEPLOYMENT_TARGET') or ''))
print(repr(get_config_var('LDSHARED') or ''))
print(repr(get_config_var('CFLAGS') or ''))
print(repr(get_config_var('LDVERSION') or ''))
$ python3.7 t.py
'/usr'
t.py:13: DeprecationWarning: SO is deprecated, use EXT_SUFFIX
print(repr(get_config_var('SO') or ''))
'.cpython-37m-x86_64-linux-gnu.so'
'.cpython-37m-x86_64-linux-gnu.so'
' -Wl,-z,relro'
'/usr/lib'
'/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu'
'/usr/include/python3.7m'
1
''
'x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
-Wl,-z,relro'
'-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g
-fstack-protector-strong -Wformat -Werror=format-security -g -flto
-fuse-linker-plugin -ffat-lto-objects'
'3.7m'
I don't know python. What's going on there?
Thanks,
/mjt