Project

General

Profile

Replicant60BuildDependenciesInstallation » History » Revision 71

Revision 70 (dl lud, 08/20/2019 05:31 PM) → Revision 71/89 (Denis 'GNUtoo' Carikli, 08/28/2019 02:51 PM)

h1. Build dependencies installation 

 *Replicant can only be built on 64 bit x86 architectures, building on 32 bit x86 systems is no longer supported.* 
 However, some prebuilt tools are still 32 bit x86 executables and some host tools are generated as 32 bit x86 executables. 

 It is recommended to have at least 4GB of RAM available. 

 h2. Replicant 6.0 

 

 h3. Debian-based systems 

 *Debian 9* 

 Packages installation: 

 <pre> 
 dpkg --add-architecture i386 ; apt-get update 
 apt-get build-dep gcc binutils llvm-defaults 
 apt-get install bash 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 
 </pre> 

 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). 

 

 h3. Tips to make it build: 

 * #1847 
 * #1848 

 h2. Replicant 4.2 

 h3. Debian-based systems 

 *Trisquel 7.0* 

 Packages installation: 

 <pre> 
 dpkg --add-architecture i386 ; apt-get update 
 apt-get install build-essential 
 apt-get install g++-multilib 
 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 
 </pre> 

 *Debian 8* 

 Packages installation: 

 <pre> 
 dpkg --add-architecture i386 ; apt-get update 
 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 
 </pre> 

 h3. Tweaks 

 h4. libxml2.so 

 If you have the following error: 
 <pre> 
 $ ./vendor/replicant/build-toolchain 
 [...] 
 -- Clang version: 3.7.0 
 -- Configuring done 
 -- Generating done 
 -- Build files have been written to: /home/replicant/replicant-6.0/toolchain/clang 
 + nproc 
 + echo 1 
 + make -j 1 
 [...] 
 [ 98%] Built target libclang 
 make[2]: *** No rule to make target '/usr/lib64/libxml2.so', needed by 'bin/c-index-test'.    Stop. 
 CMakeFiles/Makefile2:13807: recipe for target 'tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/all' failed 
 make[1]: *** [tools/clang/tools/c-index-test/CMakeFiles/c-index-test.dir/all] Error 2 
 Makefile:149: recipe for target 'all' failed 
 make: *** [all] Error 2 
 </pre> 
 make sure that you have libxml2-dev installed 

 h4. missing lib32readline5-dev 

 If the packages manager complains about @lib32readline5-dev@ being missing, it has to be replaced with @lib32readline-gplv2-dev@ in the command line. 

 h4. missing /usr/lib/zconf.h header 

 If the @/usr/lib/zconf.h@ header is missing, a symlink has to be created: 
 <pre> 
 ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/lib/zconf.h 
 </pre> 
 * If errors messages about incompatible library versions are shown, some symlinks have to be created. For instance: 
 <pre> 
 sudo ln -s /usr/lib32/libstdc++.so.6.0.14 /usr/lib32/libstdc++.so 
 sudo ln -s /usr/lib32/libz.so.1.2.3.4 /usr/lib32/libz.so 
 </pre> 


 h4. Replicant 4.2 export_includes 

 To fix the following: 
 <pre> 
 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. 
 make: *** Waiting for unfinished jobs.... 
 </pre> 

 Run the following command: 
 <pre> 
 mkdir -p out/target/product/maguro/obj/SHARED_LIBRARIES/libsamsung-ipc_intermediates/export_includes 
 </pre> 

 h3. Arch Linux-based systems 

 *Parabola* 

 Base packages (from the Parabola repositories) installation: 
 <pre> 
 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 
 </pre> 

 Some additional repositories are required to retrieve some of the build dependencies. 

 To enable those repositories, the following should be added to @/etc/pacman.conf@: 
 <pre> 
 [libre-multilib] 
 Include = /etc/pacman.d/mirrorlist 

 [multilib] 
 Include = /etc/pacman.d/mirrorlist 
 </pre> 

 For these changes to take effect, the packages database should be updated: 
 <pre> 
 pacman -Syu 
 </pre> 

 Additional packages installation: 
 <pre> 
 pacman -S --needed multilib/lib32-glibc multilib/gcc-multilib multilib/lib32-readline multilib/lib32-ncurses multilib/lib32-zlib 
 </pre> 

 *Tweaks* 

 * repo may complain about experimental python 3 support: python 2 has to be set as default instead: 
 <pre> 
 ln -s /usr/bin/python2 /usr/local/bin/python 
 </pre>