Replicant60BuildTips » History » Revision 4
Revision 3 (Denis 'GNUtoo' Carikli, 10/19/2019 05:28 PM) → Revision 4/7 (Denis 'GNUtoo' Carikli, 10/20/2019 06:05 PM)
h1. Tips for building Replicant 6.0
h2. /usr/bin/sed, /usr/bin/mkdir, /usr/bin/mkdir: No such file or directory
Associated bugreport: #1847
When budilding the toolchain, with debian stretch and potentially other distributions, it should fails with the following error:
<pre>
.../toolchain/src/binutils/binutils-2.25/bfd/configure: line 16741: /usr/bin/sed: No such file or directory
</pre>
To workaround this issue, first become root:
<pre>
$ sudo su
</pre>
Then go to the /usr/bin directory:
<pre>
# /cd /usr/bin
</pre>
And create some symlinks:
<pre>
# ln -s /bin/grep ./
# ln -s /bin/mkdir ./
# ln -s /bin/sed ./
</pre>
This workaround should make the issue disappear in the next build.
h2. Build errors
On a less powerful build host, the following build error can happen:
<pre>
target Java: org.cyanogenmod.platform.sdk (/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes)
javac: file not found: /home/replicantbuilder/replicant-6.0/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/cyanogenmod/platform/Manifest.java
Usage: javac <options> <source files>
use -help for a list of possible options
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
make: *** [/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes-full-debug.jar] Error 41
</pre>
This can be fixed by building the specific target that fails:
<pre>
mka org.cyanogenmod.platform-res
</pre>
h2. Cleaning up
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.
h3. make targets
To remove everything, including the toolchain build, run
<pre>
make clobber
</pre>
If you want to keep the toolchain, but all binaries for the target device and all compiled host tools should be deleted, run
<pre>
make clean
</pre>
If only the built toolchain should go away, run
<pre>
make tcclean
</pre>
h3. Signing keys
Keys for signing the images can be deleted with
<pre>
rm -r vendor/replicant-security
</pre>
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.