Project

General

Profile

Notes

Things to do before a release

  • Update release version in version.h file
  • Update ChangeLog in formabout.ui
  • Update Manual in formhelp.ui
  • Update ChangeLog file in repository
  • Update ChangeLog on the wiki
  • Update man/man1/glnemo2.1
  • create tar ball
      cdsvn
      cd glnemo2/glnemo2
      make -f ../mmakefile tar
      mv glnemo2.tar.gz glnemo2_1.8.0.tar.gz
    

    test to compile
  • nemocvs
      cd $NEMO/usr/jcl
      mv glnemo2 glnemo2.x
      cvs up -d glnemo2
      cdsvn
      cd glnemo2/glnemo2
      make -f ../mmakefile nemocvs
    
  • every years, update date from files
find . -name "cc" -o -name "h" -o -name "*.cc" -o -name "*.h" -o -name "*.pro" -o -name "*.ui"  -o -name "CMakeLists.txt" -o -name "README.md" | xargs -IAA sh -c "echo AA; sed  -i 's/2007-2020/2007-2023/g' AA" 

Update project page

Web sites to update after a release

Mac binary building process

  • Update February 2018
cd works/GIT/glnemo2
git pull
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=/Users/jcl/Qt2/5.10.0/clang_64/lib/cmake
make
make package

* Missing GL/glu.h include
il faut faire le lien suivant
sudo ln -s  /System/Library/Frameworks/OpenGL.framework/Headers /System/Library/Frameworks/OpenGL.framework/Headers/GL
  • Compilation
    cd /Users/jcl/SVN/glnemo2/trunk
    svn up
    rm -rf bin/macx/release/glnemo2.app bin/macx/release/glnemo2.dmg
    cd build
    rm -rf glnemo2.app
    cmake ..
    make
    make package

cd /Users/jcl/SVN/glnemo2/trunk/bin/macx/release
macdeployqt glnemo2.app -dmg

fort QT5.3
~/Qt/5.3/clang_64/bin/macdeployqt glnemo2.app -dmg

Windows 32/64 bits binary building process

Cross compilation via MXE

C'est la mei|leur solution !!!

Il faut installer MXE, voir :

editer le fichier ~/works/GIT/mxe/settings.mk et ajouter les lignes

MXE_TARGETS :=  i686-w64-mingw32.static i686-w64-mingw32.static  x86_64-w64-mingw32.static x86_64-w64-mingw32.static
JOBS := 4

et compiler les outils necessaires à glnemo2

make  gcc qt5 ccfits hdf5 glm

Ensuite compiler glnemo2

cd glnemo2/trunk
mkdir buildwin32
export PATH=/home/jcl/works/GIT/mxe/usr/bin:${PATH}
#/home/jcl/works/GIT/mxe/usr/i686-w64-mingw32.static/qt5/bin/qmake -recursive /home/jcl/works/SVN/glnemo2/trunk/glnemo2.pro
/home/jcl/works/GIT/mxe/usr/i686-w64-mingw32.static/qt5/bin/qmake -recursive ../glnemo2.pro
make

l'executable se trouve ici et n'a besoin d'aucune dependance pour s'executer sous windows !!

bin/release/win32/glnemo2.exe

ou alors créer des alias pour chaque architecture :

alias qmakewin32='/home/jcl/works/GIT/mxe/usr/i686-w64-mingw32.static/qt5/bin/qmake'
alias qmakewin64='/home/jcl/works/GIT/mxe/usr/x86_64-w64-mingw32.static/qt5/bin/qmake'
cd buildwin64
qmakewin64 -recursive ../glnemo2.pro

PROBLEME AU LINK (18 Mai 2017)

Apres la mise à jour du git de mxe, le 18 Mai 2017, la compilation de glnemo2 echoue car il y a plusieurs references de symboles identiques (inflate.o) qui se trouve dans libcfitsio.a et dans libz.a. La solution, est d'enlever de l'archive de cfitsio ces dependances :

#win32
cd /home/jcl/works/GIT/mxe/usr/i686-w64-mingw32.static/lib
../../bin/i686-w64-mingw32.static-ar d  libcfitsio.a inflate.o
#win64
cd /home/jcl/works/GIT/mxe/usr/x86_64-w64-mingw32.static/lib
../../bin/x86_64-w64-mingw32.static-ar d  libcfitsio.a inflate.o

Rebuild d'une librairie

exemple cfitsio

rm /home/jcl/works/GIT/mxe/usr/x86_64-w64-mingw32.static/installed/cfitsio
cd /home/jcl/works/GIT/mxe
make -j 4 cfitsio

Compilation depuis la machine virtuelle windows XP:

Updater le SVN

lancer une terminal QT

aller dans le repertoire SVN
cd c:\Documents and Settings\jcl\Mes documents\SVN\glnemo2\build-glnemo2-Desktop-Debug

#qmake -recursive
c:\QtSDK-x86_64\bin\mingw32-make

le binaire va se placer dans "bin\release\win32"

compilation avec cmake

aller dans le repertoire SVN, faire un turtle svn update

cd c:\Documents and Settings\jcl\Mes documents\SVN\glnemo2\trunk\build

lancer les commandes

  • Sous Windows 64
    cmake -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH=c:\QtSDK-x86_64
    mingw32-make
    
  • Sous Windows XP
    cmake -G "MinGW Makefiles" -DCMAKE_PREFIX_PATH=c:\Qt
    mingw32-make
    

Note :
-DCMAKE_PREFIX_PATH=c:\QtSDK-x86_64 permet à cmake de trouver la QT qui se trouve dans ce repertoire

  • STRIP
    penser à stripper le binaire glnemo2 avec la commande
    cd build
    strip glnemo2.exe
    

Creation du zip 32 bits:

copier le glnemo2.exe dans /rldata/home/jcl/glnemo2win/glnemo2-win32-qt5
cd /rldata/home/jcl/glnemo2win
7z a -r glnemo2_1.1.1_win32.zip glnemo2-win32-qt5

Creation du zip 64 bits:

copier le glnemo2.exe dans /rldata/home/jcl/glnemo2win/glnemo2-win64-qt5
cd /rldata/home/jcl/glnemo2win
7z a -r glnemo2_1.7.1_win64.zip glnemo2-win64-qt5

release 1.52

cp /rldata/home/jcl/works/CVS_WORKS/SVN/glnemo2/glnemo2-build-desktop/bin/release/win32/glnemo2.exe /rldata/jcl/glnemo2win/glnemo2-win32
7z a -r glnemo2_1.52_win32.zip glnemo2-win32

Linux bnaries

Ubuntu 14.04

sudo apt-get install qt5-default

Centos

activate EPL repository

 sudo yum install epel-release

sudo sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 (for CentOS 6)
sudo sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 (for CentOS 7)

opensuse

To update system

zypper update
zypper install g++ gcc cmake
zypper install libqt5-qtbase-devel
zypper install cfitsio-devel zlib-devel
zypper install glu-devel
zypper install subversion rpm-build

install CCfits (recuperer le package)

./configure --enable-static=yes --enable-shared=no --with-cfitsio-include=/usr/include/cfitsio
make
sudo make install

Docker

Setup

On my system configuration (mageia + diskless + NFS over ZFS), docker does not work fine with default storage driver aufs.
It works fine with storage driver "device mapper". Then you must edit file /etc/sysconfig/docker-storage as following :

DOCKER_STORAGE_OPTIONS="--storage-driver=devicemapper" 

The user must belong to group docker

Start docker

systemctl stop docker
mv /var/lib/docker /var/lib/docker.off
mkdir /var/lib/docker
mount freenas03:/mnt/vol02_rz2/home/system/docker_dm /var/lib/docker
systemctl start docker

ATTENTION: a priori qu'une seule machine à la fois peut demmarrer le demon docker

Display images

docker images

REPOSITORY             TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
glnemo2/ubuntu15.10    latest              84b6589591b8        4 months ago        583.8 MB
ubuntu                 15.10               337d0fd75c93        4 months ago        131.4 MB
glnemo2/ubuntu15.04    latest              8addd03ce1ca        4 months ago        574.3 MB
glnemo2/ubuntu14.04    latest              654998f4a10e        4 months ago        577.5 MB
glnemo2/mageia5        latest              fa81b1cc311a        4 months ago        734.1 MB
glnemo2/fedora21       latest              ae92a374f04c        4 months ago        1.034 GB

compile

cd /home/jcl/works/GIT/glnemo2/factory/build
docker run -it -v ${PWD}:/works glnemo2/mageia5 /works/build.sh

run interactif

docker run -it -v ${PWD}:/works glnemo2/mageia5 /bin/bash

build image

We suppose the presence of the file /home/jcl/works/GIT/glnemo2/factory/docker/mageia5/Dockerfile

cd /home/jcl/works/GIT/glnemo2/factory/docker
docker build -t glnemo2/mageia5 mageia5

Update an existing image

  • run interactively image to be updated and install HDF5 lib
docker run -it  glnemo2/ubuntu15.04 /bin/bash
root@302e88404821:/# 
root@302e88404821:/# apt-get install libhdf5-dev
  • stop running docker fron another terminal
docker stop 302e88404821
  • rename image
docker commit -m "ubuntu 15.04 with hdf5 support" `docker ps -l -q` glnemo2/ubuntu15.04

remove all running containers

docker rm `docker ps -aq`

pull an image

docker pull mageia:6

Rancher

  • tag image
docker tag glnemo2/mageia5 ppfb.lam.fr:5000/glnemo2/mageia5
  • push image
docker push  ppfb.lam.fr:5000/glnemo2/mageia5
  • verify

from docker1[2/3].lam.fr check :

docker images
  • From rancher's UI, use image
ppfb.lam.fr/glnemo2/mageia5
  • example complte demise à jour d'image
docker run -it glnemo2/mageia6
docker ps -a
docker start 56cfaa7ca148
docker commit -m "JCL dev" 56cfaa7ca148 jcl-dev/mageia6
docker stop 56cfaa7ca148
docker tag jcl-dev/mageia6 ppfb.lam.fr:5000/jcl-dev/mageia6
docker push ppfb.lam.fr:5000/jcl-dev/mageia6

3D Hardware acceleration

xhost  +local:docker
cd /home/jcl/works/GIT/glnemo2/factory/build
cp /usr/lib64/nvidia-current/libGL.so.1 /usr/lib64/nvidia-current/tls/libnvidia-tls.so.* /usr/lib64/nvidia-current/libnvidia-glcore.so.* glnemo2
docker run -it  -v /tmp/.X11-unix:/tmp/.X11-unix -v /usr/share/fonts:/usr/share/fonts -v /usr/share/X11/xkb:/usr/share/X11/xkb  -v /dev/dri/card0:/dev/dri/card0 -v /etc/cups:/etc/cups -v ${PWD}/glnemo2:/works  -e uid=$(id -u) -e gid=$(id -g) -e DISPLAY=unix$DISPLAY glnemo2/ubuntu17.10 bash
  • from interactive docker
cd /works
LD_PRELOAD="./libnvidia-glcore.so.384.59  ./libnvidia-tls.so.384.59 ./libGL.so.1" glnemo2 ./pp.1M all
  • from 3drun.sh script
docker run -it  -v /tmp/.X11-unix:/tmp/.X11-unix -v /usr/share/fonts:/usr/share/fonts -v /usr/share/X11/xkb:/usr/share/X11/xkb -v /etc/cups:/etc/cups  -v /dev/dri/card0:/dev/dri/card0 -v ${PWD}/glnemo2:/works -v ${PWD}:/script  -e uid=$(id -u) -e gid=$(id -g) -e DISPLAY=unix$DISPLAY glnemo2/ubuntu17.10 /script/3drun.sh pp.1M all

ARCH LINUX

  • initialisation des repos
pacman -Syy
  • Recherche d'un package
pacman -Ss hdf5
  • installation des packages

    31 pacman -S gcc
    33 pacman -S git
    36 pacman -S hdf5
    44 pacman -S --needed base-devel
    49 pacman -S cmake
    50 pacman -S hdf5
    61 pacman -S vi
    64 pacman -S tmux
    66 pacman -S locale
    69 pacman -S local
    78 pacman -S glu
    81 pacman -S glu qt5-base ccfits hdf5-cpp-fortran glm libtirpc
    117 pacman -S scp
    119 pacman -S ifconfig
    121 pacman -S dbclient
    122 pacman -Ss dbclient
    123 pacman -S libmariadbclient
    125 pacman -Ss dbclient
    127 pacman -Ss /usr/bin/dbclient
    129 pacman -S ssh
    130 pacman -Ss ssh
    131 pacman -S openssh
    132 pacman -S openssh
    171 pacman -S ./glnemo2-1.11.0-1-x86_64.pkg.tar.xz
    177 pacman -S man

glserv

compilation

mkdir build
cd build
CXX=/opt/rh/devtoolset-1.1/root/usr/bin/c++ CPP=/opt/rh/devtoolset-1.1/root/usr/bin/cpp CC=/opt/rh/devtoolset-1.1/root/usr/bin/cc /data/local/cmake-3.1.2/bin/cmake ..

make -j5
sudo make install

VirtualGL

vglconnect -s jclamber@glserv

vglrun +xcb glnemo2