-
Type:
Bug
-
Status: Done
-
Priority:
Low
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.6.40-26.25, 5.7.22-29.26
-
Component/s: None
-
Labels:None
PXC fails to build with Python3, because Scons' Sconstruct script was written for PYthon 2.x.
The workaround is to use 2to3 binary.
Diff below:
--- SConstruct (original) +++ SConstruct (refactored) @@ -46,7 +46,7 @@ sysname = os.uname()[0].lower() machine = platform.machine() bits = ARGUMENTS.get('bits', platform.architecture()[0]) -print('Host: ' + sysname + ' ' + machine + ' ' + bits) +print(('Host: ' + sysname + ' ' + machine + ' ' + bits)) x86 = any(arch in machine for arch in [ 'x86', 'amd64', 'i686', 'i386', 'i86pc' ]) @@ -162,7 +162,7 @@ # export to any module that might have use of those Export('GALERA_VER', 'GALERA_REV') -print('Signature: version: ' + GALERA_VER + ', revision: ' + GALERA_REV) +print(('Signature: version: ' + GALERA_VER + ', revision: ' + GALERA_REV)) LIBBOOST_PROGRAM_OPTIONS_A = ARGUMENTS.get('bpostatic', '') LIBBOOST_SYSTEM_A = LIBBOOST_PROGRAM_OPTIONS_A.replace('boost_program_options', 'boost_system') @@ -197,10 +197,10 @@ cc_version = read_first_line(env['CC'].split() + ['--version']) cxx_version = read_first_line(env['CXX'].split() + ['--version']) -print('Using C compiler executable: ' + env['CC']) -print('C compiler version is: ' + cc_version) -print('Using C++ compiler executable: ' + env['CXX']) -print('C++ compiler version is: ' + cxx_version) +print(('Using C compiler executable: ' + env['CC'])) +print(('C compiler version is: ' + cc_version)) +print(('Using C++ compiler executable: ' + env['CXX'])) +print(('C++ compiler version is: ' + cxx_version)) # Initialize CPPFLAGS and LIBPATH from environment to get user preferences env.Replace(CPPFLAGS = os.getenv('CPPFLAGS', '')) @@ -472,7 +472,7 @@ def check_boost_library(libBaseName, header, configuredLibPath, autoadd = 1): libName = libBaseName + boost_library_suffix if configuredLibPath != '' and not os.path.isfile(configuredLibPath): - print("Error: file '%s' does not exist" % configuredLibPath) + print(("Error: file '%s' does not exist" % configuredLibPath)) Exit(1) if configuredLibPath == '': for libpath in boost_libpaths: @@ -482,7 +482,7 @@ break if configuredLibPath != '': if not conf.CheckCXXHeader(header): - print("Error: header '%s' does not exist" % header) + print(("Error: header '%s' does not exist" % header)) Exit (1) if autoadd: conf.env.Append(LIBS=File(configuredLibPath)) @@ -493,7 +493,7 @@ header=header, language='CXX', autoadd=autoadd): - print('Error: library %s does not exist' % libName) + print(('Error: library %s does not exist' % libName)) Exit (1) return [libName] @@ -573,7 +573,7 @@ print('Global flags:') for f in ['CFLAGS', 'CXXFLAGS', 'CCFLAGS', 'CPPFLAGS']: - print(f + ': ' + env[f].strip()) + print((f + ': ' + env[f].strip()))