Project

General

Profile

Replicant60BuildTips » History » Version 4

Denis 'GNUtoo' Carikli, 10/20/2019 06:05 PM

1 3 Denis 'GNUtoo' Carikli
h1. Tips for building Replicant 6.0
2 1 Wolfgang Wiedmeyer
3 4 Denis 'GNUtoo' Carikli
h2. /usr/bin/sed, /usr/bin/mkdir, /usr/bin/mkdir: No such file or directory
4
5
Associated bugreport: #1847
6
7
When budilding the toolchain, with debian stretch and potentially other distributions, it should fails with the following error:
8
<pre>
9
.../toolchain/src/binutils/binutils-2.25/bfd/configure: line 16741: /usr/bin/sed: No such file or directory
10
</pre>
11
12
To workaround this issue, first become root:
13
<pre>
14
$ sudo su
15
</pre>
16
17
Then go to the /usr/bin directory:
18
<pre>
19
# /cd /usr/bin
20
</pre>
21
22
And create some symlinks:
23
<pre>
24
# ln -s /bin/grep ./
25
# ln -s /bin/mkdir ./
26
# ln -s /bin/sed ./
27
</pre>
28
29
This workaround should make the issue disappear in the next build.
30
31 1 Wolfgang Wiedmeyer
h2. Build errors
32
33
On a less powerful build host, the following build error can happen:
34
<pre>
35
target Java: org.cyanogenmod.platform.sdk (/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes)
36
javac: file not found: /home/replicantbuilder/replicant-6.0/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/cyanogenmod/platform/Manifest.java
37
Usage: javac <options> <source files>
38
use -help for a list of possible options
39
build/core/java.mk:394: recipe for target '/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes-full-debug.jar' failed
40
make: *** [/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes-full-debug.jar] Error 41
41
</pre>
42
43
This can be fixed by building the specific target that fails:
44
<pre>
45
mka org.cyanogenmod.platform-res
46
</pre>
47
48
h2. Cleaning up
49 2 Wolfgang Wiedmeyer
50
Sometimes, you may want to start over again from the point where either nothing is built yet or only parts are already built. A reason could be that you are facing errors that didn't happen before.
51
52
h3. make targets
53
54
To remove everything, including the toolchain build, run
55
<pre>
56
make clobber
57
</pre>
58
59
If you want to keep the toolchain, but all binaries for the target device and all compiled host tools should be deleted, run
60
<pre>
61
make clean
62
</pre>
63
64
If only the built toolchain should go away, run
65
<pre>
66
make tcclean
67
</pre>
68
69
h3. Signing keys
70
71
Keys for signing the images can be deleted with
72
<pre>
73
rm -r vendor/replicant-security
74
</pre>
75
76
This can be helpful when there are issues with the @sign-build@ script. The keys will be regenerated the next time the @sign-build@ script runs. Please note that a factory reset on the device is needed when the images are signed with new keys.