Replicant60BuildTips » History » Version 7
Denis 'GNUtoo' Carikli, 01/28/2021 02:21 PM
fix title typo
| 1 | 3 | Denis 'GNUtoo' Carikli | h1. Tips for building Replicant 6.0 |
|---|---|---|---|
| 2 | 1 | Wolfgang Wiedmeyer | |
| 3 | 6 | Denis 'GNUtoo' Carikli | {{toc}} |
| 4 | |||
| 5 | 7 | Denis 'GNUtoo' Carikli | h2. /usr/bin/grep, /usr/bin/sed, /usr/bin/mkdir: No such file or directory |
| 6 | 4 | Denis 'GNUtoo' Carikli | |
| 7 | Associated bugreport: #1847 |
||
| 8 | |||
| 9 | When budilding the toolchain, with debian stretch and potentially other distributions, it should fails with the following error: |
||
| 10 | <pre> |
||
| 11 | .../toolchain/src/binutils/binutils-2.25/bfd/configure: line 16741: /usr/bin/sed: No such file or directory |
||
| 12 | </pre> |
||
| 13 | |||
| 14 | To workaround this issue, first become root: |
||
| 15 | <pre> |
||
| 16 | $ sudo su |
||
| 17 | </pre> |
||
| 18 | |||
| 19 | Then go to the /usr/bin directory: |
||
| 20 | <pre> |
||
| 21 | # /cd /usr/bin |
||
| 22 | </pre> |
||
| 23 | |||
| 24 | And create some symlinks: |
||
| 25 | <pre> |
||
| 26 | # ln -s /bin/grep ./ |
||
| 27 | # ln -s /bin/mkdir ./ |
||
| 28 | # ln -s /bin/sed ./ |
||
| 29 | </pre> |
||
| 30 | |||
| 31 | This workaround should make the issue disappear in the next build. |
||
| 32 | |||
| 33 | 5 | Denis 'GNUtoo' Carikli | Affected distributions (not all might be able to build Replicant): |
| 34 | * Debian stretch |
||
| 35 | * Trisquel 8 |
||
| 36 | |||
| 37 | 1 | Wolfgang Wiedmeyer | h2. Build errors |
| 38 | |||
| 39 | On a less powerful build host, the following build error can happen: |
||
| 40 | <pre> |
||
| 41 | target Java: org.cyanogenmod.platform.sdk (/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes) |
||
| 42 | javac: file not found: /home/replicantbuilder/replicant-6.0/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/cyanogenmod/platform/Manifest.java |
||
| 43 | Usage: javac <options> <source files> |
||
| 44 | use -help for a list of possible options |
||
| 45 | 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 |
||
| 46 | make: *** [/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes-full-debug.jar] Error 41 |
||
| 47 | </pre> |
||
| 48 | |||
| 49 | This can be fixed by building the specific target that fails: |
||
| 50 | <pre> |
||
| 51 | mka org.cyanogenmod.platform-res |
||
| 52 | </pre> |
||
| 53 | |||
| 54 | h2. Cleaning up |
||
| 55 | 2 | Wolfgang Wiedmeyer | |
| 56 | 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. |
||
| 57 | |||
| 58 | h3. make targets |
||
| 59 | |||
| 60 | To remove everything, including the toolchain build, run |
||
| 61 | <pre> |
||
| 62 | make clobber |
||
| 63 | </pre> |
||
| 64 | |||
| 65 | If you want to keep the toolchain, but all binaries for the target device and all compiled host tools should be deleted, run |
||
| 66 | <pre> |
||
| 67 | make clean |
||
| 68 | </pre> |
||
| 69 | |||
| 70 | If only the built toolchain should go away, run |
||
| 71 | <pre> |
||
| 72 | make tcclean |
||
| 73 | </pre> |
||
| 74 | |||
| 75 | h3. Signing keys |
||
| 76 | |||
| 77 | Keys for signing the images can be deleted with |
||
| 78 | <pre> |
||
| 79 | rm -r vendor/replicant-security |
||
| 80 | </pre> |
||
| 81 | |||
| 82 | 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. |