*This post has been recently updated to reflect 2022 updates.
In our previous blog, Simplifying the Learning Curve of the Seismic Unix Library, we described how INTViewer can leverage the SU library. This library is typically meant for Linux, but it can also be used on Windows. This walkthrough describes how to install the SU Library on Windows 10 to use the Seismic Workbench plugin.
The installation of the Seismic Unix Library includes 3 steps:
- Download the SU Library code and Cygwin
- Install and configure Cygwin
- Compile the SU Library code
For this walkthrough, we use SU Library 44R23 and Cygwin 2.881.
Downloading the SU Library Code
The SU Library code can be downloaded here: https://wiki.seismic-unix.org/doku.php
Extract the contents of the downloaded .tgz file to C:\apps\cwp_su_all_44R23
Downloading Cygwin
Cygwin can be downloaded here: https://cygwin.com/install.html
Choose the 32 bit version of Cygwin (not 64).
Installing and Configuring Cygwin
To install Cygwin, execute its installer (setup-x86.exe). This will install the Cygwin program, which when run, creates a POSIX shell window similar-looking to the Windows command window but which behaves in a more Unix-like way.
You will need to install several additional Cygwin components before your workflows can run. To get these, run the installer program (called Setup and represented by an icon with a black “C” shape enclosing a green arrow). Click Next →.
Click Next →.
Choose an installation directory and click Next →. This tutorial assumes that the default location is not used. Instead of “C:\cygwin64” use “C:\cygwin”. Installing Cygwin in the root of a drive in a folder named “cygwin” is good practice since it will be detected automatically by INTViewer in this configuration.
Choose a directory where Setup will store installation files. This directory can be reused for future installs so that the download doesn’t have to be repeated. Click Next →.
On this screen, you can choose your connection options. Click Next →.
Select a download site, preferably the one closest to you. Click Next →.
Now we need to select all of the packages required for compiling Seismic Unix. The Search field is a handy way to quickly find the packages. Just enter text to search, but do NOT press Enter, as this will cause the installer to move to the next page.
First, select gcc-core. To select a package, use the drop-down menu to select the version shown…
Next, select gcc-g++.
Next, select make.
Next, select libgcc1.
Next, select libgd-devel.
Next, select both libQtOpenGL4 packages.
Next, select libtiff-devel.
Next, select libXaw-devel.
Next, select rpcbind.
Next, select libnetpbm-devel.
Next, select tiff-opengl.
Finally, select libX11-devel. Click Next →.
The following screen will display any dependencies required for the selected packages. Click Next →. Cygwin will proceed to download and install all of the selected packages and required dependencies.
Create an icon on the desktop or start menu if desired. Click Next →.
Copy .bash_profile and .bashrc from C:\cygwin\etc\defaults\etc\skel and place them in your standard Windows user directory. (C:\Users\Josh for me)
Add the following lines to the end of each file:
# Setup for SU export CWPROOT=/cygdrive/c/apps/cwp_SU_all_44R23 # Setup PATH to include SU export PATH=$CWPROOT/bin:$PATH
Compiling the SU Library Code
Now that Cygwin is set up, we need to compile the Seismic Unix code. First, copy the file Makefile.config_Cygwin_32 located at C:\apps\cwp_su_all_44R23\src\configs to C:\apps\cwp_su_all_44R23\src\.
Replace Makefile.config located at C:\apps\cwp_su_all_44R23\src with the copied file.
Run Cygwin, and navigate to /cygdrive/c/apps/cwp_su_all_44R23/src. Once here, enter the make install command. This will compile the standard Seismic Unix code.
After the previous make file is finished, enter the make xtinstall command. This will compile the X-toolkit code.
Cygwin and the SU Library are now ready to use!
Testing the Installation
As a quick test, open the Cygwin command line, and enter the following command line, and enter the following command, modifying the paths to match your directory structure. A copy of the SEG-Y file should have been created if the installation was successful.
segyread tape=/cygdrive/d/data/Segy/Tony/stack-tony.sgy | segywrite tape=/cygdrive/d/data/Segy/Tony/stack-tony-out.sgy
For more information about INTViewer, visit the INTViewer product page, or contact us for a free trial.