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

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 >

samedi 13 octobre 2018

Gcc 7.2.0 x86 options

Refer to

lundi 8 octobre 2018

[MinGW32 Linux Distro] The current documentation (WIP) I am working on for Toolchain and MPV for Windows 32-Bits (Cross-Compilation)

I am currently working on this documentation http://www.davidgis.fr/documentation/mpv-i686-cross-compiling-MinGW32-Doc-WIP/. This is a work-in-progress = as of 2018-10-08, its content may change in the next days

This weekend was the occassion to make the switch. Toolchain is being upgraded

  • GCC is upgraded from 7.2.0 to 8.2.0:
  • MinGW-w64 is upgraded from 5.0.4 to 6.0.0: Patches required for 5.0.4 are now useless for both mpv and some packages.
  • Bin-utils is upgraded from 2.29.1 to 2.31.1: seems to be stable. I didn't find any important issue while building packages.
  • Packages: removed libuuid-git. Refreshed some packages. I need to keep an eye on VapourSynth R44
  • Cmake is now upgraded from 3.10.2 to to 3.12.3 and is now located inside the toolchain location (/opt/MinGW32)
Some notes
  • For Gcc 8.2.0 I tested some flags for mpv. --enable-dw2-exceptions has an overhad for mpv (5% ~ 10%) while playing some videos. I understand now why Arch used --disable-dw2-exceptions. I used this flag for my previous toolchain with Gcc 7.2.0 (--disable-dw2-exceptions) and now convinced that it is pretty useful
  • For the next days, I will try to set up a new toolchain with --disable-dw2-exceptions for Gcc 8.2.0. I hope it will be ok

samedi 6 octobre 2018

Build Wine-Staging-3.17 + PBA + Gallium Nine on Linux 32 Bits

As of 2018-10-06, Wine 3.17 was released one week ago. It's time to build it from sources including

  • Patches from Wine-Staging
  • Patches from PBA
  • Patches from Gallium-Nine
  • Patches from wine-gaming-nine

1. Download sources + patches. Apply patches

_major_version=3
_minor_version=17
_version="${_major_version}.${_minor_version}"

_srcdir=/opt/Builds/Wine-Staging-${_version}_PBA_Gallium-Nine

_error() { echo "Met some issue. Will stop now!"; exit 1; }

[ ! -d ${_srcdir} ] && { mkdir -pv ${_srcdir}; } || { rm -rf ${_srcdir}/*; }

cd ${_srcdir}

echo "Current directory is ${PWD}";

echo "** Sources and patches **";

echo "- Downloading Gallium-Nine Patches...";
( wget -q https://github.com/sarnex/wine-d3d9-patches/archive/wine-d3d9-${_version}.tar.gz -O - | tar xzf - ) || { _error; }

echo "- Downloading Wine-Staging + PBA Patches...";
( wget -q https://github.com/Firerat/wine-staging/archive/wine-staging-pba-v${_version}.tar.gz -O - | tar xzf - ) || { _error; }

echo "- Downloading Wine sources..."
( wget -q https://dl.winehq.org/wine/source/3.x/wine-${_version}.tar.xz -O - | tar xJf -) || { _error; }

echo "- Cloning wine-gaming-nine repository"
git clone https://aur.archlinux.org/wine-gaming-nine.git || { _error; }

echo "** Patching Wine**";

echo "- Applying patches from Wine-Gaming-Nine (Log = wine-gaming-nine.log )";
for file in $(ls wine-gaming-nine/*patch|grep -v keybinding);do patch -d wine-${_version} -Np1 -i ../$file >> wine-gaming-nine.log 2>&1 || { _error; } ;done 
patch -d wine-${_version} -R -Np1 -i ../wine-gaming-nine/keybindings.patch >> wine-gaming-nine.log 2>&1 || { _error; }

echo "- Applying patches for Wine-Staging and PBA ( Log = wine-staging-pba.log )";
./wine-staging-wine-staging-pba-v${_version}/patches/patchinstall.sh DESTDIR="${_srcdir}/wine-${_version}" --all >> wine-staging-pba.log 2>&1 || { _error; }

echo "- Applying Gallium-Nine patches ( Log = gallium-nine.log )"
patch -d wine-${_version} -Np1 -i ../wine-d3d9-patches-wine-d3d9-${_version}/wine-d3d9.patch >> gallium-nine.log 2>&1 || { _error; }
patch -d wine-${_version} -Np1 -i ../wine-d3d9-patches-wine-d3d9-${_version}/staging-helper.patch >> gallium-nine.log 2>&1 || { _error; }

2. Build wine 3.17

cd wine-${_version}
autoreconf -fiv

./configure --prefix=/opt/wine/apps/mpv/ --with-alsa --with-capi --with-cms --with-coreaudio --with-cups --with-curses \
 --with-d3d9-nine --with-d3d9-nine-module=auto --with-d3d9-nine-headers-path=auto --with-dbus --with-ffmpeg \
 --with-float-abi=abi --with-fontconfig --with-freetype --with-gettext --with-gettextpo --with-glu --with-gnutls \
 --with-gphoto --with-gsm --with-gssapi --with-gstreamer --with-gtk3 --with-jpeg --with-krb5 --with-ldap --with-mpg123 \
 --with-netapi --with-openal --with-opencl --with-opengl --with-osmesa --with-oss --without-hal --with-pcap --with-png \
 --with-pthread --with-pulse --with-sane --with-sdl --with-tiff --with-udev --with-v4l --with-va --without-vkd3d --with-vulkan \
 --with-x --with-xattr --with-xcomposite --with-xcursor --with-xfixes --with-xinerama --with-xinput --with-xinput2 --with-xml \
 --with-xrandr --with-xrender --with-xshape --with-xshm --with-xslt --with-xxf86vm --with-zlib

make -j$(nproc) && make install

vendredi 5 octobre 2018

[Ubuntu] Fixed issue for mlocate by building it from sources

Whatever you Ubuntu version is, one day you might meet some issues with mlocate/updatedb.mlocate.
  • huge I/O on disk
  • OOMkiller will kill it
  • and so on

I found a recent mlocate version with instruction to build it. So let give it a try! We will build it first

It is listed in my daily crontab (file = /etc/cron.daily/mlocate )

I found a PKGBUILD from https://gitea.artixlinux.org/artix/packages/src/branch/master/mlocate/trunk/PKGBUILD and wanted to give it a try

Translating its content to my own needs, I did
export srcdir=$PWD/mlocate-build

# Create some folder to download sources
mkdir mlocate-build && cd $srcdir


git clone https://pagure.io/mlocate.git && cd mlocate/ && git checkout c98bf6595703456558a6f9c163c746cdaa9e591f

cd $srcdir
git clone git://git.savannah.gnu.org/gnulib.git && cd gnulib/ && git checkout 5861339993f3014cfad1b94fc7fe366fc2573598

cd $srcdir/mlocate
#sed -i '/^groupname /s/mlocate/locate/' Makefile.am # I will not run this one because mlocate group exists on my computer. No need to replace it with a new group
../gnulib/gnulib-tool --import
autoreconf --install
# Configure
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
# Build
make

# Time to prepare package
make DESTDIR=/tmp/mlocate-build install

# 111 = Group ID for mlocate group on my PC
chgrp 111 /tmp/mlocate-build/usr/bin/locate
chmod 2755 /tmp/mlocate-build/usr/bin/locate
# Create a symbolic link
ln -s /tmp/mlocate-build/usr/bin/updatedb /tmp/mlocate-build/usr/bin/updatedb.mlocate

Test it before installing it

  1. As a simple user -- from a terminal session -- , write some random file
    echo "hello world" > /TMP_MinGW32/sources/Nabilla.txt
    
  2. As root -- from a terminal session --, launch it and monitoring it. Below command is taken from /etc/cron.daily/mlocate on my computer
    flock --nonblock /run/mlocate.daily.lock /usr/bin/ionice -c3 /tmp/mlocate-build/usr/bin/updatedb
    Important: Stay in front of your computer, open your monitoring tool to check: CPU, I/O, RAM and so on. This is important to check that consumption is low!!! On my computer it took 3 minutes to refresh database /var/lib/mlocate/mlocate.db
  3. Query locate to see if it can find your new file
    /tmp/mlocate-build/usr/bin/locate Nabilla
    . It returned my new random file as expected. (/TMP_MinGW32/sources/Nabilla.txt)
Let's destroy the symbolic link now
rm -vf /tmp/mlocate-build/usr/bin/updatedb.mlocate

Install it!

  • First we need to destroy the symbolic link /usr/bin/updatedb -> /etc/alternatives/updatedb. We just need to delete the symbolic link
    rm -vf  /usr/bin/updatedb
  • Time to copy our binaries
    cp -avf  /tmp/mlocate-build/usr/* /usr/
    
  • Let's create the new link
    ln -s /usr/bin/updatedb /usr/bin/updatedb.mlocate
  • We just need to add some rights
    chgrp 111 /usr/bin/locate 
    chmod 2755 /usr/bin/locate