Journal Compilation de VSCode sous Centos 6

Posté par  (site web personnel) . Licence CC By‑SA.
Étiquettes :
9
15
juin
2018

Il y a quelques mois, le camarade freem< nous avait fait part de ses déception concernant VSCode parce qu'il ne trouvait pas matière à troller de manière satisfaisante.

J'ai voulu me faire mon propre avis et l'essayer par moi même. Malheureusement, ma machine pro est une Centos 6 et la libc disponible beaucoup trop vielle. Impossible de l'essayer et donc de partager avec vous mes impressions pertinentes et de kalitay :(. Quelques moules m'ont gentiment expliqué que je n'avais qu'à me sortir les doigts du fondement et le compiler moi même, que si je voulais vraiment, je pouvais.

Plusieurs mois plus tard, j'ai enfin trouvé le temps et la motivation d'essayer. Et à ma grande surprise, ce fut plutôt facile.

# Installation d'une version décente de GCC, python et git depuis les dépots 
# Softawre Collections
sudo yum install centos-release-scl
sudo yum install devtoolset-7 python27 rh-git29

# Installation de NodeJS et Yarn
curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install nodejs yarm

# Activation de l'environnement de compilation
scl enable python27 devtoolset-7 rh-git29 bash

# Récupération des sources de VSCode
git clone https://github.com/Microsoft/vscode.git
cd vscode

# Augmentation de la limite du nombre de fichiers ouverts à 166384
# (il peut être nécessaire de modifier /etc/security/limits.conf pour atteindre
# cette valeur)
ulimit -n 166384

# Récupération des dépendances
# (On défini la variable CXX parce que sinon un des makefile utilise 
# /usr/bin/g++ qui ne supporte pas C++11 )
CXX=$(which g++) yarn

# Construction du paquet
yarn run gulp vscode-linux-x64-min

# "Instalation"
mv ../VSCode-linux-x64 ~/opt/vscode

Et voilà ! À moi les joies des d'un éditeur moderne !

$ ~/opt/vscode/bin/code-oss
/home/killruana/opt/vscode/bin/../code-oss: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory

Lourd est le parpaing de la réalité sur la tartelette aux fraises de nos illusions. :'(

Rendez-vous dans quelques mois pour la suite de mes aventures avec vscode.

  • # quelques mois ?

    Posté par  (Mastodon) . Évalué à 3.

    Il te faut plusieurs mois pour installer une bibliothèque ?

    Jami: beabb2b063da0a2f0a2acaddcd9cc1421245d5de

    • [^] # Re: quelques mois ?

      Posté par  (site web personnel) . Évalué à 3.

      Pour installer une lib non.
      Pour me motiver à compiler et installer à la main la dite lib ainsi que ses dépendances, oui.

      $ cd gtk+-3.22.30
      $ ./configure
      (...)
      configure: error: Package requirements (glib-2.0 >= 2.49.4    atk >= 2.15.1    pango >= 1.37.3    cairo >= 1.14.0    cairo-gobject >= 1.14.0    gdk-pixbuf-2.0 >= 2.30.0) were not met:
      
      Requested 'glib-2.0 >= 2.49.4' but version of GLib is 2.28.8
      Requested 'atk >= 2.15.1' but version of Atk is 1.30.0
      Requested 'pango >= 1.37.3' but version of Pango is 1.28.1
      Requested 'cairo >= 1.14.0' but version of cairo is 1.8.8
      No package 'cairo-gobject' found
      Requested 'gdk-pixbuf-2.0 >= 2.30.0' but version of GdkPixbuf is 2.24.1
  • # Coïncidence ? Je ne crois pas

    Posté par  . Évalué à 0.

    Lourd est le parpaing de la réalité sur la tartelette aux fraises de nos illusions. :'(

    Dis donc, dans cet article (invité), on retrouve la même expression. Qui c'est qui a copié ?

    Voilà, c'était un commentaire… euh… constructif.

  • # Gtk3 sous Centos6

    Posté par  (site web personnel) . Évalué à 7.

    # Enable the build env
    scl enable devtoolset-7 python27 rh-python36 bash
    
    # Download tarballs
    curl \
        -LOC - https://mirrors.edge.kernel.org/pub/linux/utils/util-linux/v2.32/util-linux-2.32.tar.xz \
        -LOC - https://ftp.pcre.org/pub/pcre/pcre-8.42.tar.bz2 \
        -LOC - http://ftp.gnome.org/pub/gnome/sources/gtk+/3.22/gtk+-3.22.30.tar.xz \
        -LOC - http://ftp.gnome.org/pub/gnome/sources/glib/2.54/glib-2.54.3.tar.xz \
        -LOC - http://ftp.gnome.org/pub/gnome/sources/pango/1.40/pango-1.40.14.tar.xz \
        -LOC - http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.36/gdk-pixbuf-2.36.12.tar.xz \
        -LOC - http://ftp.gnome.org/pub/gnome/sources/atk/2.26/atk-2.26.1.tar.xz \
        -LOC - http://ftp.gnome.org/pub/gnome/sources/gobject-introspection/1.54/gobject-introspection-1.54.1.tar.xz \
        -LOC - http://cairographics.org/snapshots/cairo-1.15.12.tar.xz \
        -LOC - https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.8.1.tar.bz2 \
        -LOC - http://download.icu-project.org/files/icu4c/61.1/icu4c-61_1-src.tgz \
        -LOC - https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.12.93.tar.gz \
        -LOC - https://download.savannah.gnu.org/releases/freetype/freetype-2.9.tar.bz2 \
        -LOC - http://download.osgeo.org/libtiff/tiff-4.0.9.tar.gz \
        -LOC - http://ftp.gnome.org/pub/gnome/sources/at-spi2-atk/2.26/at-spi2-atk-2.26.2.tar.xz \
        -LOC - https://dbus.freedesktop.org/releases/dbus/dbus-1.13.4.tar.gz \
        -LOC - https://github.com/libexpat/libexpat/releases/download/R_2_2_5/expat-2.2.5.tar.bz2 \
        -LOC - http://ftp.gnome.org/pub/gnome/sources/at-spi2-core/2.28/at-spi2-core-2.28.0.tar.xz
    
    # Configure build env
    export GTK3_INSTALL_PATH="$HOME/opt/gtk3"
    export PKG_CONFIG_PATH="$GTK3_INSTALL_PATH/lib/pkgconfig:/usr/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig"
    export CPPFLAGS="-I$GTK3_INSTALL_PATH/include"
    export CFLAGS="-I$GTK3_INSTALL_PATH/include"
    export CXXFLAGS="-I$GTK3_INSTALL_PATH/include"
    export LDFLAGS="-L$GTK3_INSTALL_PATH/lib"
    export LD_LIBRARY_PATH="$GTK3_INSTALL_PATH/lib:$LD_LIBRARY_PATH"
    export PATH="$GTK3_INSTALL_PATH/bin:$PATH"
    
    # install meson
    pip3 install --user meson
    
    # util-linux (libmount)
    tar xf util-linux-2.32.tar.xz
    cd util-linux-2.32
    ./configure \
        --prefix "$GTK3_INSTALL_PATH" \
        --disable-all-programs \
        --enable-libblkid \
        --enable-libmount
    make -j16
    make install
    cd ..
    
    # PCRE
    tar xf pcre-8.42.tar.bz2
    cd pcre-8.42
    ./configure \
        --prefix "$GTK3_INSTALL_PATH" \
        --enable-pcre16 \
        --enable-pcre32 \
        --enable-utf \
        --enable-unicode-properties
    make -j16
    make install
    cd ..
    
    # glib
    tar xf glib-2.54.3.tar.xz
    cd glib-2.54.3
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # ICU
    tar xf icu4c-61_1-src.tgz
    cd icu/source
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ../..
    
    # Freetype
    tar xf freetype-2.9.tar.bz2
    cd freetype-2.9
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # Fontconfig
    tar xf fontconfig-2.12.93.tar.gz
    cd fontconfig-2.12.93
    make -j16
    make install
    cd ..
    
    # Cairo
    tar xf cairo-1.15.12.tar.xz
    cd cairo-1.15.12
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # Harfbuzz
    tar xf harfbuzz-1.8.1.tar.bz2
    cd harfbuzz-1.8.1
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # Freetype (bis)
    cd freetype-2.9
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # Pango
    tar xf pango-1.40.14.tar.xz
    cd pango-1.40.14
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # libtiff
    tar xf tiff-4.0.9.tar.gz
    cd tiff-4.0.9
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # Gdk-pixbuff
    tar xf gdk-pixbuf-2.36.12.tar.xz
    cd gdk-pixbuf-2.36.12
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # atk
    tar xf atk-2.26.1.tar.xz
    cd atk-2.26.1
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # Expat
    tar xf expat-2.2.5.tar.bz2
    cd expat-2.2.5
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # Dbus
    tar xf dbus-1.13.4.tar.gz
    cd dbus-1.13.4
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # At-Spi2
    tar xf at-spi2-core-2.28.0.tar.xz
    cd at-spi2-core-2.28.0
    mkdir build
    cd build
    ~/.local/bin/meson .. \
        --prefix "$GTK3_INSTALL_PATH" \
        --libdir lib
    ninja
    ninja install
    cd ../..
    
    # At-Spi2 Atk 
    tar xf at-spi2-atk-2.26.2.tar.xz
    cd at-spi2-atk-2.26.2
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd ..
    
    # GTK3
    tar xf gtk+-3.22.30.tar.xz
    cd gtk+-3.22.30
    ./configure \
        --prefix "$GTK3_INSTALL_PATH"
    make -j16
    make install
    cd..

    Mais y'a encore un peu de taf à faire

    $ LD_LIBRARY_PATH="$HOME/opt/gtk3/lib" $HOME/vscode/bin/code-oss
    /home/kilruana/opt/vscode/bin/../code-oss: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/kilruana/opt/vscode/bin/../code-oss)
    /home/kilruana/opt/vscode/bin/../code-oss: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /home/kilruana/opt/vscode/bin/../code-oss)
    /home/kilruana/opt/vscode/bin/../code-oss: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /home/kilruana/opt/vscode/bin/../code-oss)
    /home/kilruana/opt/vscode/bin/../code-oss: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /home/kilruana/opt/vscode/bin/../code-oss)
    /home/kilruana/opt/vscode/bin/../code-oss: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /home/kilruana/opt/vscode/bin/../code-oss)
    /home/kilruana/opt/vscode/bin/../code-oss: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /home/kilruana/opt/vscode/bin/../code-oss)
    /home/kilruana/opt/vscode/bin/../code-oss: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by /home/kilruana/opt/vscode/bin/../code-oss)
    /home/kilruana/opt/vscode/bin/../code-oss: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by /home/kilruana/opt/vscode/bin/../code-oss)
    /home/kilruana/opt/vscode/bin/../code-oss: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/kilruana/opt/vscode/libnode.so)
    /home/kilruana/opt/vscode/bin/../code-oss: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by /home/kilruana/opt/vscode/libnode.so)
    /home/kilruana/opt/vscode/bin/../code-oss: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /home/kilruana/opt/vscode/libnode.so)
    /home/kilruana/opt/vscode/bin/../code-oss: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /home/kilruana/opt/vscode/libnode.so)
    /home/kilruana/opt/vscode/bin/../code-oss: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by /home/kilruana/opt/vscode/libnode.so)
    /home/kilruana/opt/vscode/bin/../code-oss: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/kilruana/opt/vscode/libffmpeg.so)

Suivre le flux des commentaires

Note : les commentaires appartiennent à celles et ceux qui les ont postés. Nous n’en sommes pas responsables.