Replicant60BuildTips » History » Version 5
Denis 'GNUtoo' Carikli, 10/20/2019 07:59 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 | 5 | Denis 'GNUtoo' Carikli | Affected distributions (not all might be able to build Replicant): |
| 32 | * Debian stretch |
||
| 33 | * Trisquel 8 |
||
| 34 | |||
| 35 | 1 | Wolfgang Wiedmeyer | h2. Build errors |
| 36 | |||
| 37 | On a less powerful build host, the following build error can happen: |
||
| 38 | <pre> |
||
| 39 | target Java: org.cyanogenmod.platform.sdk (/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes) |
||
| 40 | javac: file not found: /home/replicantbuilder/replicant-6.0/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/cyanogenmod/platform/Manifest.java |
||
| 41 | Usage: javac <options> <source files> |
||
| 42 | use -help for a list of possible options |
||
| 43 | 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 |
||
| 44 | make: *** [/home/replicantbuilder/replicant-6.0/out/target/common/obj/JAVA_LIBRARIES/org.cyanogenmod.platform.sdk_intermediates/classes-full-debug.jar] Error 41 |
||
| 45 | </pre> |
||
| 46 | |||
| 47 | This can be fixed by building the specific target that fails: |
||
| 48 | <pre> |
||
| 49 | mka org.cyanogenmod.platform-res |
||
| 50 | </pre> |
||
| 51 | |||
| 52 | h2. Cleaning up |
||
| 53 | 2 | Wolfgang Wiedmeyer | |
| 54 | 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. |
||
| 55 | |||
| 56 | h3. make targets |
||
| 57 | |||
| 58 | To remove everything, including the toolchain build, run |
||
| 59 | <pre> |
||
| 60 | make clobber |
||
| 61 | </pre> |
||
| 62 | |||
| 63 | If you want to keep the toolchain, but all binaries for the target device and all compiled host tools should be deleted, run |
||
| 64 | <pre> |
||
| 65 | make clean |
||
| 66 | </pre> |
||
| 67 | |||
| 68 | If only the built toolchain should go away, run |
||
| 69 | <pre> |
||
| 70 | make tcclean |
||
| 71 | </pre> |
||
| 72 | |||
| 73 | h3. Signing keys |
||
| 74 | |||
| 75 | Keys for signing the images can be deleted with |
||
| 76 | <pre> |
||
| 77 | rm -r vendor/replicant-security |
||
| 78 | </pre> |
||
| 79 | |||
| 80 | 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. |