Replicant42BuildDependenciesInstallation » History » Version 1
Denis 'GNUtoo' Carikli, 10/19/2019 05:50 PM
Move Replicant 4.2 build dependencies in a separate page
| 1 | 1 | Denis 'GNUtoo' Carikli | h1. Replicant 4.2 build dependencies installation |
|---|---|---|---|
| 2 | |||
| 3 | *Replicant can only be built on 64 bit x86 architectures, building on 32 bit x86 systems is no longer supported.* |
||
| 4 | However, some prebuilt tools are still 32 bit x86 executables and some host tools are generated as 32 bit x86 executables. |
||
| 5 | |||
| 6 | It is recommended to have at least 4GB of RAM available. |
||
| 7 | |||
| 8 | h3. Debian-based systems |
||
| 9 | |||
| 10 | *Trisquel 7.0* |
||
| 11 | |||
| 12 | Packages installation: |
||
| 13 | |||
| 14 | <pre> |
||
| 15 | dpkg --add-architecture i386 ; apt-get update |
||
| 16 | apt-get install build-essential |
||
| 17 | apt-get install g++-multilib |
||
| 18 | apt-get install bc git gnupg flex bison gperf zip curl openjdk-7-jre openjdk-7-jdk libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils libxml2-dev xsltproc zlib1g-dev:i386 repo |
||
| 19 | </pre> |
||
| 20 | |||
| 21 | *Debian 8* |
||
| 22 | |||
| 23 | Packages installation: |
||
| 24 | |||
| 25 | <pre> |
||
| 26 | dpkg --add-architecture i386 ; apt-get update |
||
| 27 | apt-get install bison flex git-core gperf libncurses-dev build-essential curl squashfs-tools openjdk-7-jre openjdk-7-jdk pngcrush wget zip zlib1g-dev lzma libxml2-utils libxml2-dev libc6-dev-i386 g++-multilib lib32z1-dev lib32readline-gplv2-dev lib32ncurses5-dev zlib1g-dev:i386 xsltproc |
||
| 28 | </pre> |
||
| 29 | |||
| 30 | h3. Tweaks |
||
| 31 | |||
| 32 | h4. libxml2.so |
||
| 33 | |||
| 34 | If you have the following error: |
||
| 35 | <pre> |
||
| 36 | $ ./vendor/replicant/build-toolchain |
||
| 37 | [...] |
||
| 38 | -- Clang version: 3.7.0 |
||
| 39 | -- Configuring done |
||
| 40 | -- Generating done |
||
| 41 | -- Build files have been written to: /home/replicant/replicant-6.0/toolchain/clang |
||
| 42 | + nproc |
||
| 43 | + echo 1 |
||
| 44 | + make -j 1 |
||
| 45 | [...] |
||
| 46 | [ 98%] Built target libclang |
||
| 47 | make[2]: *** No rule to make target '/usr/lib64/libxml2.so', needed by 'bin/c-index-test'. Stop. |
||
| 48 | CMakeFiles/Makefile2:13807: recipe for target 'tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/all' failed |
||
| 49 | make[1]: *** [tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/all] Error 2 |
||
| 50 | Makefile:149: recipe for target 'all' failed |
||
| 51 | make: *** [all] Error 2 |
||
| 52 | </pre> |
||
| 53 | make sure that you have libxml2-dev installed |
||
| 54 | |||
| 55 | h4. missing lib32readline5-dev |
||
| 56 | |||
| 57 | If the packages manager complains about @lib32readline5-dev@ being missing, it has to be replaced with @lib32readline-gplv2-dev@ in the command line. |
||
| 58 | |||
| 59 | h4. missing /usr/lib/zconf.h header |
||
| 60 | |||
| 61 | If the @/usr/lib/zconf.h@ header is missing, a symlink has to be created: |
||
| 62 | <pre> |
||
| 63 | ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/lib/zconf.h |
||
| 64 | </pre> |
||
| 65 | * If errors messages about incompatible library versions are shown, some symlinks have to be created. For instance: |
||
| 66 | <pre> |
||
| 67 | sudo ln -s /usr/lib32/libstdc++.so.6.0.14 /usr/lib32/libstdc++.so |
||
| 68 | sudo ln -s /usr/lib32/libz.so.1.2.3.4 /usr/lib32/libz.so |
||
| 69 | </pre> |
||
| 70 | |||
| 71 | |||
| 72 | h4. Replicant 4.2 export_includes |
||
| 73 | |||
| 74 | To fix the following: |
||
| 75 | <pre> |
||
| 76 | make: *** No rule to make target `.../out/target/product/maguro/obj/SHARED_LIBRARIES/libsamsung-ipc_intermediates/export_includes', needed by `.../out/target/product/maguro/obj/SHARED_LIBRARIES/libsamsung-ril_intermediates/import_includes'. Stop. |
||
| 77 | make: *** Waiting for unfinished jobs.... |
||
| 78 | </pre> |
||
| 79 | |||
| 80 | Run the following command: |
||
| 81 | <pre> |
||
| 82 | mkdir -p out/target/product/maguro/obj/SHARED_LIBRARIES/libsamsung-ipc_intermediates/export_includes |
||
| 83 | </pre> |
||
| 84 | |||
| 85 | h3. Arch Linux-based systems |
||
| 86 | |||
| 87 | *Parabola* |
||
| 88 | |||
| 89 | Base packages (from the Parabola repositories) installation: |
||
| 90 | <pre> |
||
| 91 | pacman -S --needed core/bison core/flex core/make core/ncurses core/xz core/zlib extra/bc extra/git extra/gperf extra/gperftools libre/jdk7-openjdk extra/openjdk7-src libre/jre7-openjdk extra/wget extra/zip community/squashfs-tools community/pngcrush libre/unzip community/repo |
||
| 92 | </pre> |
||
| 93 | |||
| 94 | Some additional repositories are required to retrieve some of the build dependencies. |
||
| 95 | |||
| 96 | To enable those repositories, the following should be added to @/etc/pacman.conf@: |
||
| 97 | <pre> |
||
| 98 | [libre-multilib] |
||
| 99 | Include = /etc/pacman.d/mirrorlist |
||
| 100 | |||
| 101 | [multilib] |
||
| 102 | Include = /etc/pacman.d/mirrorlist |
||
| 103 | </pre> |
||
| 104 | |||
| 105 | For these changes to take effect, the packages database should be updated: |
||
| 106 | <pre> |
||
| 107 | pacman -Syu |
||
| 108 | </pre> |
||
| 109 | |||
| 110 | Additional packages installation: |
||
| 111 | <pre> |
||
| 112 | pacman -S --needed multilib/lib32-glibc multilib/gcc-multilib multilib/lib32-readline multilib/lib32-ncurses multilib/lib32-zlib |
||
| 113 | </pre> |
||
| 114 | |||
| 115 | *Tweaks* |
||
| 116 | |||
| 117 | * repo may complain about experimental python 3 support: python 2 has to be set as default instead: |
||
| 118 | <pre> |
||
| 119 | ln -s /usr/bin/python2 /usr/local/bin/python |
||
| 120 | </pre> |