h1. Tips for building Replicant 6.0 {{toc}} h2. /usr/bin/grep, /usr/bin/sed, /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:
.../toolchain/src/binutils/binutils-2.25/bfd/configure: line 16741: /usr/bin/sed: No such file or directory
To workaround this issue, first become root:
$ sudo su
Then go to the /usr/bin directory:
# /cd /usr/bin
And create some symlinks:
# ln -s /bin/grep ./
# ln -s /bin/mkdir ./
# ln -s /bin/sed ./
This workaround should make the issue disappear in the next build. Affected distributions (not all might be able to build Replicant): * Debian stretch * Trisquel 8 h2. Build errors On a less powerful build host, the following build error can happen:
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  
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
This can be fixed by building the specific target that fails:
mka org.cyanogenmod.platform-res
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
make clobber
If you want to keep the toolchain, but all binaries for the target device and all compiled host tools should be deleted, run
make clean
If only the built toolchain should go away, run
make tcclean
h3. Signing keys Keys for signing the images can be deleted with
rm -r vendor/replicant-security
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.