summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-08-15 11:54:50 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2020-08-15 11:59:01 +0200
commit87a69f96d4a14004fbaa33f2eee18476a3083c86 (patch)
treea84a13361eca5b023449090e3b565e4ea82da291
parentf068d8b9fdf454907a523381fa6f8c197455022a (diff)
downloadprebuilts_build-tools-87a69f96d4a14004fbaa33f2eee18476a3083c86.tar.gz
prebuilts_build-tools-87a69f96d4a14004fbaa33f2eee18476a3083c86.tar.bz2
prebuilts_build-tools-87a69f96d4a14004fbaa33f2eee18476a3083c86.zip
Enable to use the host python2
This removes the python2 binaries to make sure that the host python2 is used as it the prebuilt python2 is in the PATH before the host python2. Without that fix we have the following build issue: [ 3% 2585/70375] build out/target/product/i9305/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_builder_opcodes.h FAILED: out/target/product/i9305/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_builder_opcodes.h /bin/bash -c "python external/mesa3d/src/compiler/nir/nir_builder_opcodes_h.py external/mesa3d/src/compiler/nir/nir_opcodes.py > out/target/product/i9305/gen/STATIC_LIBRARIES/libmesa_nir_intermediates/nir/nir_builder_opcodes.h" Traceback (most recent call last): File "external/mesa3d/src/compiler/nir/nir_builder_opcodes_h.py", line 106, in <module> from mako.template import Template ImportError: No module named mako.template 16:20:20 ninja failed with: exit status 1 Ideally it would be better to integrate python2-mako inside the Android build but it's not trivial: external/python packages use Android.bp and they are not even usable in make targets, so it's not simple to integrate it with the Android.mk build system that is used by Mesa. Converting Mesa to Android.bp is also not trivial as we would need to make sure that it could be configured as usual with BOARD_GPU_DRIVERS and it's not clear how to do that with Android.bp. Another solution that was not tried yet due to the lack of time would have been to use make sure that the prebuilt python2 was used and to use Android.mk to package package python-setutools again then use that to package python-mako which could then be installed in a location where ANDROID_PYTHON_PATH would point to. As the host python2 is used, it's also possible to use Guix to provide python2 and python2-mako in a manifest to improve reproducible builds, however that would need to be setup before sourcing build/envsetup.sh. Using the host PYTHONPATH also didn't work as it introduced other issues with python3 such as this build failure: [ 0% 3/83582] Gen Header: libfreedreno_registers <= a4xx.xml.h FAILED: out/target/product/i9300/gen/STATIC_LIBRARIES/libfreedreno_registers_intermediates/registers/a4xx.xml.h /bin/bash -c "python3 external/mesa3d/src/freedreno/registers/gen_header.py external/mesa3d/src/freedreno/registers/a4xx.xml > out/target/product/i9300/gen/STATIC_LIBRARIES /libfreedreno_registers_intermediates/registers/a4xx.xml.h" Fatal Python error: Py_Initialize: Unable to get the locale encoding File "/usr/lib/python2.7/encodings/__init__.py", line 123 raise CodecRegistryError,\ ^ SyntaxError: invalid syntax Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rwxr-xr-xdarwin-x86/bin/py2-cmdbin8936208 -> 0 bytes
-rwxr-xr-xlinux-x86/bin/py2-cmdbin9559886 -> 0 bytes
l---------path/darwin-x86/python1
l---------path/darwin-x86/python21
l---------path/darwin-x86/python2.71
l---------path/linux-x86/python1
l---------path/linux-x86/python21
l---------path/linux-x86/python2.71
8 files changed, 0 insertions, 6 deletions
diff --git a/darwin-x86/bin/py2-cmd b/darwin-x86/bin/py2-cmd
deleted file mode 100755
index af7ad51..0000000
--- a/darwin-x86/bin/py2-cmd
+++ /dev/null
Binary files differ
diff --git a/linux-x86/bin/py2-cmd b/linux-x86/bin/py2-cmd
deleted file mode 100755
index ff17ada..0000000
--- a/linux-x86/bin/py2-cmd
+++ /dev/null
Binary files differ
diff --git a/path/darwin-x86/python b/path/darwin-x86/python
deleted file mode 120000
index c34aaae..0000000
--- a/path/darwin-x86/python
+++ /dev/null
@@ -1 +0,0 @@
-../../darwin-x86/bin/py2-cmd \ No newline at end of file
diff --git a/path/darwin-x86/python2 b/path/darwin-x86/python2
deleted file mode 120000
index c34aaae..0000000
--- a/path/darwin-x86/python2
+++ /dev/null
@@ -1 +0,0 @@
-../../darwin-x86/bin/py2-cmd \ No newline at end of file
diff --git a/path/darwin-x86/python2.7 b/path/darwin-x86/python2.7
deleted file mode 120000
index c34aaae..0000000
--- a/path/darwin-x86/python2.7
+++ /dev/null
@@ -1 +0,0 @@
-../../darwin-x86/bin/py2-cmd \ No newline at end of file
diff --git a/path/linux-x86/python b/path/linux-x86/python
deleted file mode 120000
index 8ec5dcd..0000000
--- a/path/linux-x86/python
+++ /dev/null
@@ -1 +0,0 @@
-../../linux-x86/bin/py2-cmd \ No newline at end of file
diff --git a/path/linux-x86/python2 b/path/linux-x86/python2
deleted file mode 120000
index 8ec5dcd..0000000
--- a/path/linux-x86/python2
+++ /dev/null
@@ -1 +0,0 @@
-../../linux-x86/bin/py2-cmd \ No newline at end of file
diff --git a/path/linux-x86/python2.7 b/path/linux-x86/python2.7
deleted file mode 120000
index 8ec5dcd..0000000
--- a/path/linux-x86/python2.7
+++ /dev/null
@@ -1 +0,0 @@
-../../linux-x86/bin/py2-cmd \ No newline at end of file