Hi,

I tried to build Replicant 10 during the past few days and encountered some issues.

In this mailing list submission I'd like to describe these issues and provide possible solutions for them.

All patches that need to be made can be found in the attachments.


1) The first issues occured when selecting the device Replicant should be built for. This issue was caused because the devices were not correctly integrated in the build system. I wrote patches for i9300 and i9305 that solve this problem.

2) Some issues were undeclared properties (like you can find them in the build.prop file). These properties were declared in repositories from LineageOS that Replicant didn't fork. Rebasing all forked directories helped me to solve these errors, which are a result of the divergence of the repositories. The manifest needs to be rebased, too.

3) When building mesa, errors like "using <name of the program> is not allowed" occurred. I found out that these errors happen because of some limits Soong (a part of the build system) introduces. Soong uses a configuration list containing programs that can be used for building Android and because the mesa build needs some programs that are not on the list, an error message is being displayed. However, the solution is simple: just add the names of the programs to that list. In the attachments you can find the patch allowing the programs needed for the mesa builds. Unfortunately, we need to fork build/soong for introducing this patch permanently.

4) Another error occurring during the mesa build was an ImportError raised by Python, stating a module named 'mako' is not being found. Installing mako using apt or pip did not work for me. I needed to download mako from PyPI and copy the module to development/python-packages. However, this solution would require us to fork the development directory and I think there are better solutions. A reason that installing mako did not work could arise if Android uses its own python environment, but I don't know if that actually is the case. If you have a better solution for that problem, please let me know.

After making all changes described above I was able to compile Replicant 10 and flash it to an i9300 in Dowload Mode using heimdall.


Yours,


Tobias

>From 895dbbda47660f78057d23d4908db36a9461e503 Mon Sep 17 00:00:00 2001
From: Tobias Tefke <[email protected]>
Date: Mon, 22 Jun 2020 18:38:35 +0200
Subject: [PATCH 1/2] i9300: replace vendorsetup.sh by COMMON_LUNCH_CHOICES

---
 AndroidProducts.mk |  3 +++
 vendorsetup.sh     | 18 ------------------
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100644 vendorsetup.sh

diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index b168b09..2ce318b 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -16,3 +16,6 @@
 
 PRODUCT_MAKEFILES := \
     $(LOCAL_DIR)/lineage_i9300.mk
+
+COMMON_LUNCH_CHOICES := \
+    lineage_i9300-userdebug
diff --git a/vendorsetup.sh b/vendorsetup.sh
deleted file mode 100644
index d21fbce..0000000
--- a/vendorsetup.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Copyright 2018 Joonas Kylmälä
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-add_lunch_combo lineage_i9300-userdebug
-add_lunch_combo lineage_i9300-userdebug
-- 
2.17.1

>From fad350cde930bb78c54d86eab46dc90da4793187 Mon Sep 17 00:00:00 2001
From: Tobias Tefke <[email protected]>
Date: Mon, 22 Jun 2020 18:43:57 +0200
Subject: [PATCH 2/2] i9300: properly inherit from LineageOS

---
 lineage_i9300.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lineage_i9300.mk b/lineage_i9300.mk
index 12ba55b..ac40c1e 100644
--- a/lineage_i9300.mk
+++ b/lineage_i9300.mk
@@ -17,7 +17,7 @@
 $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_p.mk)
 $(call inherit-product, device/samsung/i9300/device.mk)
-$(call inherit-product, vendor/lineage/config/common_phone.mk)
+$(call inherit-product, vendor/lineage/config/common_full.mk)
 $(call inherit-product, hardware/samsung/Android.mk)
 
 PRODUCT_NAME := lineage_i9300
-- 
2.17.1

>From e1c1e9c14ff0e386e3248c608dbc0ac17d1ce9f5 Mon Sep 17 00:00:00 2001
From: Tobias Tefke <[email protected]>
Date: Mon, 22 Jun 2020 18:42:25 +0200
Subject: [PATCH] i9305: replace vendorsetup.sh by COMMON_LUNCH_CHOICES

---
 AndroidProducts.mk |  3 +++
 vendorsetup.sh     | 17 -----------------
 2 files changed, 3 insertions(+), 17 deletions(-)
 delete mode 100644 vendorsetup.sh

diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 37e30b4..5cdccd6 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -16,3 +16,6 @@
 
 PRODUCT_MAKEFILES := \
     $(LOCAL_DIR)/lineage_i9305.mk
+
+COMMON_LUNCH_CHOICES := \
+    lineage_i9305-userdebug
diff --git a/vendorsetup.sh b/vendorsetup.sh
deleted file mode 100644
index bf5fcfb..0000000
--- a/vendorsetup.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright 2018 Joonas Kylmälä
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-add_lunch_combo lineage_i9305-userdebug
-- 
2.17.1

>From b6691459cc196b69bf9d951634f09be4db5947ba Mon Sep 17 00:00:00 2001
From: Tobias Tefke <[email protected]>
Date: Tue, 23 Jun 2020 15:50:36 +0200
Subject: [PATCH] Soong: allow tools for building mesa

Change-Id: Ife48e4ddf2f638b992a58e786a9680c98a40208b
---
 ui/build/paths/config.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ui/build/paths/config.go b/ui/build/paths/config.go
index d17b9f77..becd9336 100644
--- a/ui/build/paths/config.go
+++ b/ui/build/paths/config.go
@@ -94,6 +94,8 @@ var Configuration = map[string]PathConfig{
 	"javap":    Allowed,
 	"lsof":     Allowed,
 	"m4":       Allowed,
+	"msgfmt":   Allowed,
+	"msgmerge": Allowed,
 	"nproc":    Allowed,
 	"openssl":  Allowed,
 	"patch":    Allowed,
@@ -107,6 +109,7 @@ var Configuration = map[string]PathConfig{
 	"timeout":  Allowed,
 	"tr":       Allowed,
 	"unzip":    Allowed,
+	"xgettext": Allowed,
 	"xz":       Allowed,
 	"zip":      Allowed,
 	"zipinfo":  Allowed,
-- 
2.17.1

_______________________________________________
Replicant mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/replicant

Reply via email to