Difference between revisions of "Installation:Windows"

From GeopsyWiki
Jump to navigation Jump to search
 
(19 intermediate revisions by the same user not shown)
Line 8: Line 8:
  
 
   geopsy -clear-tools
 
   geopsy -clear-tools
   dinver -clar-plugins
+
   dinver -clear-plugins
  
 
== Source package ==
 
== Source package ==
  
Compiling from the source package may be an option if the binary package is not yet available. It takes a bit longer and requires several steps. Once a build environment is ready, updates are relatively straight forward. Getting [[#Git | Git]], [[#Qt | Qt]] and compiling [[#FFTW | FFTW]] are required only once. When updating from a previous Geopsy release you can skip these steps and go directly to [[#Geopsy package | Geopsy package]]. As a general comment, do not move directories after their installation, prefer a new installation instead.
+
Compiling from the source package may be an option if the binary package is not yet available. It takes a bit longer and requires several steps. Once a build environment is ready, updates are relatively straight forward. Getting [[#Git | Git]], [[#Qt | Qt]] and compiling [[#Lapack | Lapack]] and [[#FFTW | FFTW]] are required only once. When updating from a previous Geopsy release you can skip these steps and go directly to [[#Geopsy package | Geopsy package]]. As a general comment, do not move directories after their installation, prefer a new installation instead.
 
 
'''This tutorial is under construction, use it at your own risks!'''
 
  
 
=== Git ===
 
=== Git ===
Line 64: Line 62:
 
   $ cd /z/Qt/6.5.2/Tools/mingw1120_64/bin
 
   $ cd /z/Qt/6.5.2/Tools/mingw1120_64/bin
 
   $ mv mingw32-make.exe make.exe
 
   $ mv mingw32-make.exe make.exe
 +
 +
=== Python ===
 +
 +
[https://www.python.org Python] is required for the last step of [[#Lapack|Lapack]] installation. Optionally, ''geopsypack'' can be compiled with Python: several [[Python_interface|Python modules]] are currently available. So there are good reasons to install Python now, if it is not yet installed.
 +
 +
[https://www.python.org/download/windows Window installer (64-bit) for release 3.11.5] is chosen in this tutorial. Select custom installation and install to
 +
  /c/geopsy/python
  
 
=== Lapack ===
 
=== Lapack ===
 +
 +
[https://netlib.org/lapack Linear Algebra PACKage]
 +
 +
Download the latest release source archive (currently, [https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v3.11.0.tar.gz lapack-3.11.0.tar.gz]).
 +
 +
  cd /c/geopsy
 +
  mkdir lapack
 +
  cd lapack
 +
  tar xvfz ~/Downloads/lapack-3.11.0.tar.gz
 +
  cd lapack-3.11.0
 +
  cp make.inc.examples make.inc
 +
 +
Edit 'make.inc' at line 27 (source [https://github.com/Reference-LAPACK/lapack/issues/890] failed tests issue)
 +
 +
  LDFLAGS =-Wl,--stack=8388608
 +
 +
The last testing steps of Lapack require [[#Pythpn|Python]]. Edit 'lapack_testing.py' and replace the first line by
 +
  #!/c/geopsy/python/python
 +
 +
It is now ready to build
 +
  make -j 4
 +
 +
''geopsypack'' expect Blas library to be named ''libblas.a'', hence rename it
 +
  cp librefblas.a libblas.a
 +
 
=== FFTW ===
 
=== FFTW ===
  
Line 72: Line 102:
 
FFTW >= 3.0.1 is required. Version 3.3.10 has been successfully tested.
 
FFTW >= 3.0.1 is required. Version 3.3.10 has been successfully tested.
  
Download the archive from [http://ftp.fftw.org/pub/fftw/fftw-3.3.5.tar.gz FFTW].
+
Download the archive from [http://www.fftw.org/fftw-3.3.10.tar.gz FFTW].
  
 
Unpack it
 
Unpack it
  
 
   cd /c/geopsy
 
   cd /c/geopsy
 +
  mkdir fftw
 +
  cd fftw
 
   tar xvfz ~/Downloads/fftw-3.3.10.tar.gz
 
   tar xvfz ~/Downloads/fftw-3.3.10.tar.gz
 
   cd fftw-3.3.10
 
   cd fftw-3.3.10
Line 88: Line 120:
 
   make -j 4
 
   make -j 4
  
=== Defining the branch and the version ===
+
=== geopsypack ===
 
 
The current branch and the current version are defined by the following variables
 
 
 
  export GEOPSY_BRANCH=3.5
 
  export GEOPSY_VERSION=3.5.1-preview
 
 
 
== Installing from Git repository ==
 
  
 
If you want the very latest updates you can access directly our Git repository. If you prefer a more stable release go to [[#Download|Download]] section.
 
If you want the very latest updates you can access directly our Git repository. If you prefer a more stable release go to [[#Download|Download]] section.
Line 112: Line 137:
  
 
Configure and build:
 
Configure and build:
   $ ./configure -builddir /c/geopsy/build/3.5 -prefix /c/geopsy/usr/3.5
+
   $ ./configure -builddir /c/geopsy/build/3.5 \
 +
                -prefix /c/geopsy/usr/3.5 \
 +
                -I /c/geopsy/fftw/fftw-3.3.10/api -L /c/geopsy/fftw/fftw-3.3.-10/.libs \
 +
                -L /c/geopsy/lapack/lapack-3.11.0 \
 +
                -I /c/geopsy/python/include
 
   $ make -j 4 -C /c/geopsy/build/3.5
 
   $ make -j 4 -C /c/geopsy/build/3.5
 
   $ make install -C /c/geopsy/build/3.5
 
   $ make install -C /c/geopsy/build/3.5
Line 128: Line 157:
 
   $ make -j 4
 
   $ make -j 4
 
   $ make install
 
   $ make install
 
You can skip the rest of this tutorial.
 
 
=== Mingw-w64 ===
 
 
[https://www.mingw-w64.org Mingw-w64] provides GNU C++ compiler for Windows. Download [https://github.com/skeeto/w64devkit w64devkit]. This tutorial is based on [https://github.com/skeeto/w64devkit/releases/download/v1.17.0/w64devkit-1.17.0.zip w64devkit-1.17.0] but another more recent release might also work. Extract the archive to
 
  C:\geopsy\Mingw-w64
 
and start
 
  C:\geopsy\Mingw-w64\w64devkit.exe
 
''Git'', ''make'' and ''g++'' should be available
 
  ~ $ git --version
 
  git version 2.39.1.windows.1
 
  ~ $ make --version
 
  GNU Make 4.4
 
  Built for x86_64-w64-mingw32
 
  ~ $ g++ --version
 
  g++ (GCC) 12.2.0
 
 
Copy and paste in the terminal works with the selection and right mouse button. There is also a menu in the upper left corner, under 'Modify' you can also copy and paste.
 
Create a .profile in your home to add path to git tools in PATH
 
  cd
 
  vi .profile
 
Type 'i' to get into INSERT mode
 
  export PATH=C:/geopsy/Git/usr/bin:$PATH
 
Type 'ESC' to exit INSERT mode, then ':wq' to write and quit.
 
  source .profile
 

Latest revision as of 08:17, 16 January 2024

Binary package

The binaries are distributed inside a single .zip file. Extract all the files and the directories to your preferred location and start using it.

All the executable applications are in bin. Among them, GeopsyLand is of interest for Windows users. It provides the list of graphical applications on the left panel and a simple emulation of a Linux terminal on the right panel. Environment variables are properly set by default (PATH) and all command line tools can be directly executed inside the terminal.

If you installed several geopsy or dinver versions, it is mandatory to set the appropriate path for tools and plugins before running them. Run in terminal:

 geopsy -clear-tools
 dinver -clear-plugins

Source package

Compiling from the source package may be an option if the binary package is not yet available. It takes a bit longer and requires several steps. Once a build environment is ready, updates are relatively straight forward. Getting Git, Qt and compiling Lapack and FFTW are required only once. When updating from a previous Geopsy release you can skip these steps and go directly to Geopsy package. As a general comment, do not move directories after their installation, prefer a new installation instead.

Git

Git is a widely used version control tool, required to access the geopsy main repository. The binary package for Windows comes with a bash terminal which will be used for compilation.

Download the 64-bit standalone installer (version 2.39.1 at the time of writing this tutorial). Start the installer and follow the instructions. Default options are fine except a few detailed hereinafter. Among default options:

 * Git components
 * Vim as editor
 * Let git decide the name of the initial branch
 * Git from the command line and also 3rd party software
 * bundled OpenSSH
 * OpenSSL library
 * MinTTY
 * Default (fast forward or merge)
 * File system caching
 * No experimental options

For some other options, the default is not preferred.

 * Installation in 'C:\geopsy\Git' (Avoid spaces in directory names like 'Program files')
 * Select "Checkout as-is, commit Unix-style line endings" for line ending conversions

Qt

Qt libraries and development tools must be available. Only Qt releases posterior or equal to 5.15.2 are supported. To test if Qt is already installed, start 'Git Bash' terminal from 'Microsoft Windows' main menu and type:

 $ qmake -version
 #  QMake version 3.1
 #  Using Qt version 5.15.2 in Z:/Qt/6.5.2/6.5.2/mingw_64/lib
 $ lupdate -version
 #  lupdate version 6.5.2

If Qt 5.15.2 (or a more recent version) is installed, you can jump directly to Lapack. If not you must first install Qt.

Installing Qt binary packages provides the detailed steps to install Qt. In this tutorial, we choose to install Qt in 'Z:/Qt/6.5.2', at least 63 Gb are required during the installation. Once installed the package weights around 56 Gb.

In Git Bash terminal, configure the PATH to Qt executables:

 $ echo "export PATH=/z/Qt/6.5.2/6.5.2/mingw_64/bin:/z/Qt/6.5.2/Tools/mingw1120_64/bin:\$PATH" >> ~/.profile
 $ source ~/.profile
 $ cd /c/geopsy
 $ qmake -v
 QMake version 3.1
 Using Qt version 6.5.2 in Z:/Qt/6.5.2/6.5.2/mingw_64/lib
 $ lupdate -version
 lupdate version 6.5.2
 $ g++ --version

'mingw32-make' must be renamed to simply 'make' in '/z/Qt/6.5.2/Tools/mingw1120_64/bin'

 $ cd /z/Qt/6.5.2/Tools/mingw1120_64/bin
 $ mv mingw32-make.exe make.exe

Python

Python is required for the last step of Lapack installation. Optionally, geopsypack can be compiled with Python: several Python modules are currently available. So there are good reasons to install Python now, if it is not yet installed.

Window installer (64-bit) for release 3.11.5 is chosen in this tutorial. Select custom installation and install to

 /c/geopsy/python

Lapack

Linear Algebra PACKage

Download the latest release source archive (currently, lapack-3.11.0.tar.gz).

 cd /c/geopsy
 mkdir lapack
 cd lapack
 tar xvfz ~/Downloads/lapack-3.11.0.tar.gz
 cd lapack-3.11.0
 cp make.inc.examples make.inc

Edit 'make.inc' at line 27 (source [1] failed tests issue)

 LDFLAGS =-Wl,--stack=8388608

The last testing steps of Lapack require Python. Edit 'lapack_testing.py' and replace the first line by

 #!/c/geopsy/python/python

It is now ready to build

 make -j 4

geopsypack expect Blas library to be named libblas.a, hence rename it

 cp librefblas.a libblas.a

FFTW

Fastest Fourier Transform of the West.

FFTW >= 3.0.1 is required. Version 3.3.10 has been successfully tested.

Download the archive from FFTW.

Unpack it

 cd /c/geopsy
 mkdir fftw
 cd fftw
 tar xvfz ~/Downloads/fftw-3.3.10.tar.gz
 cd fftw-3.3.10

Configure FFTW:

 ./configure

Build FFTW:

 make -j 4

geopsypack

If you want the very latest updates you can access directly our Git repository. If you prefer a more stable release go to Download section. Be careful that compilation may fail. To know if the build has a chance to complete successfully, first have a look at NextRelease. If there is a complete green bar in front of src-testing-*, you will probably get to the end of the build without error. If it is not completely green, come back later or contact the developers.

Download geopsypack from Git repository and install. Note that we recommend to build in a separate directory from the sources which is not located inside the source tree. Eventually replace 3.5 by the desired branch. The branch name is composed of the first two numbers of the version number. For instance, version 3.5.0 is built from branch 3.5 .

 $ cd /c/geopsy
 $ mkdir src
 $ cd src
 $ git clone git://geopsy.org/geopsypack
 $ mv geopsypack 3.5
 $ cd 3.5
 $ git checkout 3.5
 $ git submodule update --init

Configure and build:

 $ ./configure -builddir /c/geopsy/build/3.5 \
               -prefix /c/geopsy/usr/3.5 \
               -I /c/geopsy/fftw/fftw-3.3.10/api -L /c/geopsy/fftw/fftw-3.3.-10/.libs \
               -L /c/geopsy/lapack/lapack-3.11.0 \
               -I /c/geopsy/python/include
 $ make -j 4 -C /c/geopsy/build/3.5
 $ make install -C /c/geopsy/build/3.5

That's it, you should have a running geopsypack including the latest modifications.

If you want to update an existing source tree:

 $ cd /c/geopsy/src/3.5
 $ git pull
 $ git checkout 3.5
 $ git submodule update --init

Reconfigure and build:

 $ cd /c/geopsy/build/3.5
 $ ./configure.cache
 $ make -j 4
 $ make install