Le blog de Jean David TECHER, un Réunionnais à Saint-Priest/Lyon

Aller au contenu | Aller au menu | Aller à la recherche


1 2 >

samedi 11 août 2018

[Documentation] MinGW32 Linux Distro - A lot of new packages!

I was pretty busy for the two past weeks, investigating both my time and my energy on writting and testing some packages for my own MinGW32 Linux Distro. I stopped working on it for the 4 past months.Yep that's it! It takes a lot of time to search on the internet to find needed information to build your own packages.

Finaly we added a lot of new packages.

  1. Lcms2 2.9
  2. Zziplib 0.13.69
  3. PDFlib-Lite 7.0.5p3
  4. UnixODBC 2.3.6
  5. Gdbm 1.17
  6. Sqlite 3.24.0
  7. Cyrus-SASL 2.1.27-rc7
  8. Mman-win32 20180604
  9. Berkeley-DB 4.8.30
  10. Regex-POSIX-Gnulib 20090805
  11. OpenLDAP 2.4.45 (with LibreSSL + Cyrus-SASL + HDB/BDB)
  12. Libfdk-aac 0.1.6
  13. Opencore-amr 0.1.5
  14. Vo-aacenc 0.1.3
  15. Vo-amrwbenc 0.1.3
  16. Xvidcode 1.3.5
  17. Orc 4.28
  18. Liboil 0.3.17
  19. Schroedinger 1.0.11
  20. Faad 2.8.8
  21. Faac 1.29.9.2 with DRM (Digital Radio Mondiale support)
  22. Faac 1.29.9.2 without DRM (Digital Radio Mondiale support)
  23. Fribidi 1.0.5
  24. Graphite2 1.3.11
  25. Harfbuzz 1.8.6
  26. Libass 0.14.0
  27. Openjpeg2 2.3.0
  28. Openjpeg 1.5.2
  29. Gavl 1.4.0
  30. Frei0r-plugins 1.6.1
  31. Libsoxr 0.1.3
  32. L-smash 2.14.5
  33. X264 r2665-a01e339 (for FFmpeg 2.2.16)
  34. X264 r2901-7d0ff22 (not installed)
  35. Gsm 1.0.18
  36. Libvpx 1.7.0
  37. Librtmp 20151223
  38. Jasper 2.0.14
  39. Libcroco 0.6.12
  40. Gdk-pixbuf 2.36.12
  41. Pango 1.42.3
  42. Librsvg 2.40.20
  43. X265 2.8
  44. Libluray 1.0.2
  45. Libaacs 0.9.0
  46. Libbdplus 0.1.2
MinGW32 Linux Distro is just a simple prebuilt toolchain based on MinGW-w64 5.0.3 and GCC 7.0.2. I do it only for fun
  • My main idea is to have a prebuilt to chain for archival purposes for Win32 OS like ReactOS and to use some Windows tools on Wine -- I am a big fan --
  • Packages are built using makeself 2.3.1 from https://github.com/megastep/makeself
  • 90% of instructions to build binaries (*.exe, *.dll) from packages are taken from either from AUR web site or MINGW-packages. I just read their PKGBUILD. Instructions are updated/modifed for my own personal needs (adding/removing some options)

lundi 19 mars 2018

[Documentation] WIP Prebuilt Toochain Linux 32 Bits: MinGW-w64 5.0.3 and GCC 7.2.0 (Posix Support) - version 003

This is a work in progress. Documentation is available at http://www.davidgis.fr/documentation/Build_Prebuilt_Toolchain_MinGW-w64_for_Linux-32bits_GCC-7.2.0_Testing/
  • Packages: Added some missing URLs for a few packages
  • Toolchain: removed --with-sysroot option, added some options for the compiler
  • Distro: added makeself
  • enhanced some commands for some packages
The main idea is to try to backport some commands used for Arch (aka mingw-w64-) but for Debian/Ubuntu on Linux 32 Bit. This is done only for the fun. There is already nice tools like MXE. I just wanted to learn by myself how to do this from scratch

samedi 17 mars 2018

[Documentation] WIP Prebuilt Toochain Linux 32 Bits: MinGW-w64 5.0.3 and GCC 7.2.0 (Posix Support) - version 002

This is a work in progress. Documentation is available at http://www.davidgis.fr/documentation/Build_Prebuilt_Toolchain_MinGW-w64_for_Linux-32bits_GCC-7.2.0_Testing/

mercredi 7 février 2018

[Build your own automatic toolchain]: CMake-based MinGW-w64 Cross Toolchain [Modified for MinGW-w64 5.0.3]

Project on Githhub

Pros Cons
  • MinGW-w64 points to the GitHub repository (head/master bran), which is pretty a wrong choice because it can break stability for any program. Better to get it pointing to 5.0.3 (stable version)
  • Not portable because it depends on some packages being installed on your system like GMP version.... But it can be easily fixed by adding/building theses dependancies GMP/MPC/MPFR in the toolchain -- not covered here !!!--

Some notes

I will recommend this project because it uses cmake so it can be maintained easily. Its code is pretty understandable. Surely better than pure bash script. MXE is pretty well-known to install a cross toolchain quickly. But if you were wondering if there is any other project that can do it, I will say that this one is prety cool. You can
  • reuse its code
  • add/build your own packages
  • Cmake-language is a nice language -- just one or 2 levels over shell script
For the incoming weeks I think I will add GMP/MPC/MPFR to make it portable. Keeping in mind that this project was not supposed to be portable that should be interesting to test this -- maybe a fork !!! ---

Install dependancies

apt install git gcc g++ ragel make ninja-build gyp mercurial nasm autotools-dev autoconf automake libgmp-dev libmpfr-dev libmpc-dev

Update my PATH to poin to Meson 0.44.0, ninja 1.8.2 et cmake (Optional because my Ubuntu is 14.10)

export PATH=/opt/ninja/1.8.2/bin/:/opt/meson/0.44.0/bin/:${PATH}
export PYTHONPATH=/opt/meson/0.44.0/lib/python3.4/site-packages/:$PYTHONPATH
export PATH=/opt/cmake/3.9.3/bin/:$PATH

Download/Build and Install some packages

Download Sources

root@amdgaming:/opt/Sources# git clone https://github.com/lachs0r/mingw-w64-cmake.git
Clonage dans 'mingw-w64-cmake'...
remote: Counting objects: 1685, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 1685 (delta 0), reused 0 (delta 0), pack-reused 1682
Réception d'objets: 100% (1685/1685), 385.48 KiB | 482.00 KiB/s, fait.
Résolution des deltas: 100% (1146/1146), fait.
Vérification de la connectivité... fait.

Modify the project to point to MinGW-w64 version 5.0.3

    Go to the folder et edit toolchain/CMakeLists.txt
  • root@amdgaming:/opt/Sources# cd mingw-w64-cmake/
     root@amdgaming:/opt/Sources/mingw-w64-cmake# vim toolchain/CMakeLists.txt 
     
  • Comment line 36 and add a new line to point to MinGW-w64 version 5.0.3
     1 ExternalProject_Add(binutils
     2     URL "https://ftp.gnu.org/gnu/binutils/binutils-2.29.1.tar.xz"
     3     URL_HASH SHA256=e7010a46969f9d3e53b650a518663f98a5dde3c3ae21b7d71e5e6803bc36b577
     4     CONFIGURE_COMMAND /configure
     5         --target=${TARGET_ARCH}
     6         --prefix=${CMAKE_INSTALL_PREFIX}
     7         --with-sysroot=${CMAKE_INSTALL_PREFIX}
     8         --disable-multilib
     9         --disable-nls
    10         --disable-shared
    11     BUILD_COMMAND make -j${MAKEJOBS}
    12     INSTALL_COMMAND make install
    13     LOG_DOWNLOAD 1 LOG_CONFIGURE 1 LOG_BUILD 1 LOG_INSTALL 1
    14 )
    15 
    16 find_program(PKGCONFIG NAMES pkg-config)
    17 
    18 ExternalProject_Add_Step(binutils basedirs
    19     DEPENDEES download
    20     COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_PREFIX}
    21     COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_PREFIX}/bin
    22     COMMAND ${CMAKE_COMMAND} -E create_symlink ${PKGCONFIG} ${CMAKE_INSTALL_PREFIX}/bin/${TARGET_ARCH}-pkg-config
    23     COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH}
    24     COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH} ${CMAKE_INSTALL_PREFIX}/mingw
    25     COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH}/lib
    26     COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH}/lib ${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH}/lib64
    27     COMMENT "Setting up target directories and symlinks"
    28 )
    29 
    30 ExternalProject_Add(mingw-w64-headers
    31     PREFIX mingw-w64-prefix
    32     STAMP_DIR mingw-w64-prefix/src/mingw-w64-stamp
    33     SOURCE_DIR mingw-w64-prefix/src/mingw-w64
    34     BINARY_DIR mingw-w64-prefix/src/mingw-w64-headers-build
    35     DEPENDS binutils
    36 #    GIT_REPOSITORY git://git.code.sf.net/p/mingw-w64/mingw-w64
    37     URL "http://download2.nust.na/pub4/sourceforge/m/mi/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v5.0.3.tar.bz2"
    38     UPDATE_COMMAND ""
    

Configure the project for Linux 32 Bits

root@amdgaming:/opt/Sources/mingw-w64-cmake# mkdir build-32
root@amdgaming:/opt/Sources/mingw-w64-cmake# cd build-32/
root@amdgaming:/opt/Sources/mingw-w64-cmake/build-32# cmake -DTARGET_ARCH=i686-w64-mingw32 -DCMAKE_INSTALL_PREFIX=/opt/mingw32 -G Ninja ..
-- The C compiler identification is GNU 4.9.1
-- The CXX compiler identification is GNU 4.9.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Parsing package crossc
-- Parsing package icu
-- Parsing package shaderc
-- Parsing package vulkan
-- Parsing package libsoxr
-- Parsing package libzimg
-- Parsing package angle
-- Parsing package gmp
-- Parsing package xz
-- Parsing package lzo
-- Parsing package uchardet
-- Parsing package rubberband
-- Parsing package zlib
-- Parsing package bzip2
-- Parsing package libzip
-- Parsing package libjpeg
-- Parsing package lcms2
-- Parsing package lame
-- Parsing package ogg
-- Parsing package vorbis
-- Parsing package opus
-- Parsing package speex
-- Parsing package libmodplug
-- Parsing package libvpx
-- Parsing package xvidcore
-- Parsing package game-music-emu
-- Parsing package libgpg_error
-- Parsing package libgcrypt
-- Parsing package libpng
-- Parsing package x264
-- Parsing package libdvdcss
-- Parsing package libdvdread
-- Parsing package libdvdnav
-- Parsing package libiconv
-- Parsing package sdl2
-- Parsing package sdl2_mixer
-- Parsing package luajit
-- Parsing package openal-soft
-- Parsing package fribidi
-- Parsing package expat
-- Parsing package boost
-- Parsing package wxWidgets
-- Parsing package libarchive
-- Parsing package freetype2
-- Parsing package sdl2_ttf
-- Parsing package taisei
-- Parsing package libaacs
-- Parsing package libbdplus
-- Parsing package libbluray
-- Parsing package harfbuzz
-- Parsing package libass
-- Parsing package ffmpeg
-- Parsing package mujs
-- Parsing package mpv
-- Configuring done
-- Generating done
-- Build files have been written to: /opt/Sources/mingw-w64-cmake/build-32

Initialize the pre-built toolchain by building a first package

Let's take an easy one zlib
root@amdgaming:/opt/Sources/mingw-w64-cmake/build-32# ninja zlib
[2/58] Performing download step (download, verify and extract) for 'binutils'
-- binutils download command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/binutils-prefix/src/binutils-stamp/binutils-download-*.log
[6/58] Performing configure step for 'binutils'
-- binutils configure command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/binutils-prefix/src/binutils-stamp/binutils-configure-*.log
[7/58] Performing build step for 'binutils'
-- binutils build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/binutils-prefix/src/binutils-stamp/binutils-build-*.log
[8/58] Performing install step for 'binutils'
-- binutils install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/binutils-prefix/src/binutils-stamp/binutils-install-*.log
[11/58] Performing download step (git clone) for 'mingw-w64-headers'
-- mingw-w64-headers download command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/mingw-w64-prefix/src/mingw-w64-stamp/mingw-w64-headers-download-*.log
[14/58] Performing autoreconf step for 'mingw-w64-headers'
-- mingw-w64-headers autoreconf command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/mingw-w64-prefix/src/mingw-w64-stamp/mingw-w64-headers-autoreconf-*.log
[15/58] Performing configure step for 'mingw-w64-headers'
-- mingw-w64-headers configure command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/mingw-w64-prefix/src/mingw-w64-stamp/mingw-w64-headers-configure-*.log
[17/58] Performing install step for 'mingw-w64-headers'
-- mingw-w64-headers install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/mingw-w64-prefix/src/mingw-w64-stamp/mingw-w64-headers-install-*.log
[20/58] Performing download step (download, verify and extract) for 'gcc-base'
-- gcc-base download command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/gcc-prefix/src/gcc-stamp/gcc-base-download-*.log
[22/58] Performing patch step for 'gcc-base'
patching file libstdc++-v3/config/os/mingw32-w64/os_defines.h
[23/58] Performing configure step for 'gcc-base'
-- gcc-base configure command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/gcc-prefix/src/gcc-stamp/gcc-base-configure-*.log
[24/58] Performing build step for 'gcc-base'
-- gcc-base build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/gcc-prefix/src/gcc-stamp/gcc-base-build-*.log
[25/58] Performing install step for 'gcc-base'
-- gcc-base install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/gcc-prefix/src/gcc-stamp/gcc-base-install-*.log
[35/58] Performing configure step for 'winpthreads'
-- winpthreads configure command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/mingw-w64-prefix/src/winpthreads-stamp/winpthreads-configure-*.log
[36/58] Performing build step for 'winpthreads'
-- winpthreads build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/mingw-w64-prefix/src/winpthreads-stamp/winpthreads-build-*.log
[37/58] Performing install step for 'winpthreads'
-- winpthreads install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/mingw-w64-prefix/src/winpthreads-stamp/winpthreads-install-*.log
[39/58] Performing configure step for 'mingw-w64-crt'
-- mingw-w64-crt configure command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/mingw-w64-prefix/src/mingw-w64-crt-stamp/mingw-w64-crt-configure-*.log
[40/58] Performing build step for 'mingw-w64-crt'
-- mingw-w64-crt build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/mingw-w64-prefix/src/mingw-w64-crt-stamp/mingw-w64-crt-build-*.log
[41/58] Performing install step for 'mingw-w64-crt'
-- mingw-w64-crt install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/mingw-w64-prefix/src/mingw-w64-crt-stamp/mingw-w64-crt-install-*.log
[48/58] Performing build step for 'gcc'
-- gcc build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/gcc-prefix/src/gcc-stamp/gcc-build-*.log
[49/58] Performing install step for 'gcc'
-- gcc install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/toolchain/gcc-prefix/src/gcc-stamp/gcc-install-*.log
[52/58] Performing download step (download, verify and extract) for 'zlib'
-- zlib download command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/zlib-prefix/src/zlib-stamp/zlib-download-*.log
[54/58] Performing patch step for 'zlib'
patching file Makefile.in
patching file configure
[55/58] Performing configure step for 'zlib'
-- zlib configure command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/zlib-prefix/src/zlib-stamp/zlib-configure-*.log
[56/58] Performing build step for 'zlib'
-- zlib build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/zlib-prefix/src/zlib-stamp/zlib-build-*.log
[57/58] Performing install step for 'zlib'
-- zlib install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/zlib-prefix/src/zlib-stamp/zlib-install-*.log
[58/58] Completed 'zlib'

Let's install others packages for fun: bzip2, xz, lzo, libiconv, expat

root@amdgaming:/opt/Sources/mingw-w64-cmake/build-32# ninja xz bzip2 lzo
[4/27] Performing download step (download, verify and extract) for 'bzip2'
-- bzip2 download command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/bzip2-prefix/src/bzip2-stamp/bzip2-download-*.log
[5/27] Performing patch step for 'bzip2'
patching file bzip2.c
patching file bzlib.h
[8/27] Performing build step for 'bzip2'
-- bzip2 build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/bzip2-prefix/src/bzip2-stamp/bzip2-build-*.log
[9/27] Performing install step for 'bzip2'
-- bzip2 install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/bzip2-prefix/src/bzip2-stamp/bzip2-install-*.log
[11/27] Performing download step (download, verify and extract) for 'lzo'
-- lzo download command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/lzo-prefix/src/lzo-stamp/lzo-download-*.log
[14/27] Performing configure step for 'lzo'
-- lzo configure command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/lzo-prefix/src/lzo-stamp/lzo-configure-*.log
[15/27] Performing build step for 'lzo'
-- lzo build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/lzo-prefix/src/lzo-stamp/lzo-build-*.log
[16/27] Performing install step for 'lzo'
-- lzo install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/lzo-prefix/src/lzo-stamp/lzo-install-*.log
[18/27] Performing download step (git clone) for 'xz'
-- xz download command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/xz-prefix/src/xz-stamp/xz-download-*.log
[19/27] Performing force-update step for 'xz'
-- xz force-update command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/xz-prefix/src/xz-stamp/xz-force-update-*.log
[22/27] Performing autogen step for 'xz'
-- xz autogen command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/xz-prefix/src/xz-stamp/xz-autogen-*.log
[23/27] Performing configure step for 'xz'
-- xz configure command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/xz-prefix/src/xz-stamp/xz-configure-*.log
[24/27] Performing build step for 'xz'
-- xz build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/xz-prefix/src/xz-stamp/xz-build-*.log
[26/27] Performing install step for 'xz'
-- xz install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/xz-prefix/src/xz-stamp/xz-install-*.log
[27/27] Completed 'xz'
root@amdgaming:/opt/Sources/mingw-w64-cmake/build-32# ninja libiconv
[2/8] Performing download step (download, verify and extract) for 'libiconv'
-- libiconv download command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/libiconv-prefix/src/libiconv-stamp/libiconv-download-*.log
[5/8] Performing configure step for 'libiconv'
-- libiconv configure command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/libiconv-prefix/src/libiconv-stamp/libiconv-configure-*.log
[6/8] Performing build step for 'libiconv'
-- libiconv build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/libiconv-prefix/src/libiconv-stamp/libiconv-build-*.log
[7/8] Performing install step for 'libiconv'
-- libiconv install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/libiconv-prefix/src/libiconv-stamp/libiconv-install-*.log
[8/8] Completed 'libiconv'
root@amdgaming:/opt/Sources/mingw-w64-cmake/build-32# ninja expat
[2/8] Performing download step (download, verify and extract) for 'expat'
-- expat download command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/expat-prefix/src/expat-stamp/expat-download-*.log
[5/8] Performing configure step for 'expat'
-- expat configure command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/expat-prefix/src/expat-stamp/expat-configure-*.log
[6/8] Performing build step for 'expat'
-- expat build command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/expat-prefix/src/expat-stamp/expat-build-*.log
[7/8] Performing install step for 'expat'
-- expat install command succeeded.  See also /opt/Sources/mingw-w64-cmake/build-32/packages/expat-prefix/src/expat-stamp/expat-install-*.log
[8/8] Completed 'expat'