Replicant60BuildDependenciesInstallation » History » Version 70
dl lud, 08/20/2019 05:31 PM
BuildDependenciesInstallation is now a child of Build.
1 | 43 | Paul Kocialkowski | h1. Build dependencies installation |
---|---|---|---|
2 | 6 | Paul Kocialkowski | |
3 | 40 | Paul Kocialkowski | *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 | 19 | Paul Kocialkowski | |
6 | 58 | Wolfgang Wiedmeyer | It is recommended to have at least 4GB of RAM available. |
7 | |||
8 | 54 | Wolfgang Wiedmeyer | h2. Replicant 6.0 |
9 | 19 | Paul Kocialkowski | |
10 | 54 | Wolfgang Wiedmeyer | h3. Debian-based systems |
11 | 1 | Paul Kocialkowski | |
12 | 54 | Wolfgang Wiedmeyer | *Debian 9* |
13 | |||
14 | 49 | Paul Kocialkowski | Packages installation: |
15 | 1 | Paul Kocialkowski | |
16 | <pre> |
||
17 | 54 | Wolfgang Wiedmeyer | dpkg --add-architecture i386 ; apt-get update |
18 | apt-get build-dep gcc binutils llvm-defaults |
||
19 | 61 | Fil Bergamo | apt-get install gcc-arm-none-eabi cmake python-dev swig ant bc proguard maven-debian-helper libemma-java libasm4-java libguava-java libnb-platform18-java libnb-org-openide-util-java libandroidsdk-ddmlib-java libmaven-source-plugin-java libfreemarker-java libmaven-javadoc-plugin-java ca-cacert curl gawk libgmp3-dev libmpfr-dev libmpc-dev git-core gperf libncurses-dev squashfs-tools pngcrush zip zlib1g-dev lzma libc6-dev-i386 g++-multilib lib32z1-dev lib32readline-dev lib32ncurses5-dev zlib1g-dev:i386 xsltproc python-mako schedtool gradle dirmngr libandroidsdk-sdklib-java eclipse-jdt libgradle-android-plugin-java android-sdk-build-tools android-sdk-platform-23 aapt lzop rsync |
20 | 1 | Paul Kocialkowski | </pre> |
21 | 55 | Wolfgang Wiedmeyer | |
22 | The @repo@ tool for downloading the Replicant source code "is available in the contrib repository":https://packages.debian.org/stretch/repo (see "bug #855846":https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=%23855846 for the reasons why it was moved to contrib). |
||
23 | 54 | Wolfgang Wiedmeyer | |
24 | 59 | Denis 'GNUtoo' Carikli | h3. Tips to make it build: |
25 | |||
26 | * #1847 |
||
27 | 60 | Denis 'GNUtoo' Carikli | * #1848 |
28 | 59 | Denis 'GNUtoo' Carikli | |
29 | 54 | Wolfgang Wiedmeyer | h2. Replicant 4.2 |
30 | |||
31 | h3. Debian-based systems |
||
32 | |||
33 | *Trisquel 7.0* |
||
34 | |||
35 | Packages installation: |
||
36 | |||
37 | <pre> |
||
38 | 65 | Denis 'GNUtoo' Carikli | dpkg --add-architecture i386 ; apt-get update |
39 | 67 | Denis 'GNUtoo' Carikli | apt-get install build-essential |
40 | apt-get install g++-multilib |
||
41 | 68 | Denis 'GNUtoo' Carikli | 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 |
42 | 1 | Paul Kocialkowski | </pre> |
43 | 40 | Paul Kocialkowski | |
44 | 54 | Wolfgang Wiedmeyer | *Debian 8* |
45 | 49 | Paul Kocialkowski | |
46 | 1 | Paul Kocialkowski | Packages installation: |
47 | 52 | Wolfgang Wiedmeyer | |
48 | 40 | Paul Kocialkowski | <pre> |
49 | 1 | Paul Kocialkowski | dpkg --add-architecture i386 ; apt-get update |
50 | 62 | Denis 'GNUtoo' Carikli | 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 |
51 | 1 | Paul Kocialkowski | </pre> |
52 | |||
53 | 63 | Denis 'GNUtoo' Carikli | h3. Tweaks |
54 | 1 | Paul Kocialkowski | |
55 | 63 | Denis 'GNUtoo' Carikli | h4. libxml2.so |
56 | |||
57 | If you have the following error: |
||
58 | <pre> |
||
59 | $ ./vendor/replicant/build-toolchain |
||
60 | [...] |
||
61 | -- Clang version: 3.7.0 |
||
62 | -- Configuring done |
||
63 | -- Generating done |
||
64 | -- Build files have been written to: /home/replicant/replicant-6.0/toolchain/clang |
||
65 | + nproc |
||
66 | + echo 1 |
||
67 | + make -j 1 |
||
68 | [...] |
||
69 | [ 98%] Built target libclang |
||
70 | make[2]: *** No rule to make target '/usr/lib64/libxml2.so', needed by 'bin/c-index-test'. Stop. |
||
71 | CMakeFiles/Makefile2:13807: recipe for target 'tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/all' failed |
||
72 | make[1]: *** [tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/all] Error 2 |
||
73 | Makefile:149: recipe for target 'all' failed |
||
74 | make: *** [all] Error 2 |
||
75 | </pre> |
||
76 | make sure that you have libxml2-dev installed |
||
77 | |||
78 | h4. missing lib32readline5-dev |
||
79 | |||
80 | If the packages manager complains about @lib32readline5-dev@ being missing, it has to be replaced with @lib32readline-gplv2-dev@ in the command line. |
||
81 | |||
82 | 64 | Denis 'GNUtoo' Carikli | h4. missing /usr/lib/zconf.h header |
83 | 63 | Denis 'GNUtoo' Carikli | |
84 | If the @/usr/lib/zconf.h@ header is missing, a symlink has to be created: |
||
85 | 21 | Paul Kocialkowski | <pre> |
86 | 49 | Paul Kocialkowski | ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/lib/zconf.h |
87 | 19 | Paul Kocialkowski | </pre> |
88 | * If errors messages about incompatible library versions are shown, some symlinks have to be created. For instance: |
||
89 | 1 | Paul Kocialkowski | <pre> |
90 | sudo ln -s /usr/lib32/libstdc++.so.6.0.14 /usr/lib32/libstdc++.so |
||
91 | 26 | Denis 'GNUtoo' Carikli | sudo ln -s /usr/lib32/libz.so.1.2.3.4 /usr/lib32/libz.so |
92 | 1 | Paul Kocialkowski | </pre> |
93 | |||
94 | 69 | Denis 'GNUtoo' Carikli | |
95 | h4. Replicant 4.2 export_includes |
||
96 | |||
97 | To fix the following: |
||
98 | <pre> |
||
99 | 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. |
||
100 | make: *** Waiting for unfinished jobs.... |
||
101 | </pre> |
||
102 | |||
103 | Run the following command: |
||
104 | <pre> |
||
105 | mkdir -p out/target/product/maguro/obj/SHARED_LIBRARIES/libsamsung-ipc_intermediates/export_includes |
||
106 | </pre> |
||
107 | |||
108 | 54 | Wolfgang Wiedmeyer | h3. Arch Linux-based systems |
109 | 26 | Denis 'GNUtoo' Carikli | |
110 | 54 | Wolfgang Wiedmeyer | *Parabola* |
111 | 26 | Denis 'GNUtoo' Carikli | |
112 | 47 | Paul Kocialkowski | Base packages (from the Parabola repositories) installation: |
113 | 7 | Denis 'GNUtoo' Carikli | <pre> |
114 | 57 | Wolfgang Wiedmeyer | 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 |
115 | 1 | Paul Kocialkowski | </pre> |
116 | 47 | Paul Kocialkowski | |
117 | Some additional repositories are required to retrieve some of the build dependencies. |
||
118 | |||
119 | 28 | Denis 'GNUtoo' Carikli | To enable those repositories, the following should be added to @/etc/pacman.conf@: |
120 | <pre> |
||
121 | [libre-multilib] |
||
122 | 39 | Paul Kocialkowski | Include = /etc/pacman.d/mirrorlist |
123 | 29 | Denis 'GNUtoo' Carikli | |
124 | 1 | Paul Kocialkowski | [multilib] |
125 | 39 | Paul Kocialkowski | Include = /etc/pacman.d/mirrorlist |
126 | 26 | Denis 'GNUtoo' Carikli | </pre> |
127 | 47 | Paul Kocialkowski | |
128 | 1 | Paul Kocialkowski | For these changes to take effect, the packages database should be updated: |
129 | <pre> |
||
130 | 47 | Paul Kocialkowski | pacman -Syu |
131 | 1 | Paul Kocialkowski | </pre> |
132 | 47 | Paul Kocialkowski | |
133 | Additional packages installation: |
||
134 | <pre> |
||
135 | 53 | Denis 'GNUtoo' Carikli | pacman -S --needed multilib/lib32-glibc multilib/gcc-multilib multilib/lib32-readline multilib/lib32-ncurses multilib/lib32-zlib |
136 | 40 | Paul Kocialkowski | </pre> |
137 | |||
138 | 54 | Wolfgang Wiedmeyer | *Tweaks* |
139 | 40 | Paul Kocialkowski | |
140 | 48 | Paul Kocialkowski | * repo may complain about experimental python 3 support: python 2 has to be set as default instead: |
141 | 40 | Paul Kocialkowski | <pre> |
142 | ln -s /usr/bin/python2 /usr/local/bin/python |
||
143 | 1 | Paul Kocialkowski | </pre> |