User Tools

Site Tools


faq:gdaloncygwinx64

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

faq:gdaloncygwinx64 [2016/03/20 19:15] (current)
coastalmeadmin created
Line 1: Line 1:
 +===How to build GDAL on CYGWIN x64?===
 +To install CYGWIN x64 on windows follow this [[https://cygwin.com/install.html|guide]] and also ensure that [[http://preshing.com/20141108/how-to-install-the-latest-gcc-on-windows|the latest GCC is installed]]. 
  
 +After the Cygwin installer completes, it’s very important to keep the installer around. The installer is an executable named either ''setup-x86.exe'' or ''setup-x86_64.exe'', and you’ll need it to add or remove Cygwin packages in the future. I suggest moving the installer to the same folder where you installed Cygwin itself; typically ''C:\cygwin'' or ''C:\cygwin64''.
 +
 +Using Cygwin installer make sure that the CMake package is selected. Now let's install the GDAL source code.
 +
 +
 +  * **Step 0:** Open a Cygwin terminal and create a download directory ''mkdir download''
 +  * **Step 1:** Search the web for the last [[http://trac.osgeo.org/gdal/wiki/BuildHints|gdal source code]] 
 +  * **Step 2:** Download the source file at download folder with ''wget "link to gdal source code"'' 
 +
 +  wget http://download.osgeo.org/gdal/1.11.2/gdal-1.11.2.tar.gz
 +
 +  * **Step 3:** Run the ''./configure'' command to check some details about the machine on which the software is going to be installed and create a ''Makefile''. When you run the configure script you would see a lot of output on the screen , each being some sort of question and a respective yes/no as the reply. If any of the major requirements are missing on your system, the configure script would exit and you cannot proceed with the installation, until you get those required things. Here is an example of [[faq:config.status|config.status]] report.
 +
 +  ./configure --prefix=$HOME --with-libz=internal --with-python=no --with-jasper=no --with-threads=yes''
 +  
 +  
 +
 +  * **Step 4:** If you get no errors and the configure script runs successfully (if there is any error the last few lines of the output would glaringly be stating the error) then you can proceed with the next command which is ''makemake''. Basically the ''make'' utility compiles all your program code and creates the executables.
 +  * **Step 5:** If make ran successfully then you are almost done with the installation. Only the last step remains which is "make install". The install section happens to be only a part where the executables and other required files created during the last step (i.e. make) are copied into the required final directories on your machine. E.g. the executable that the user runs may be copied to the /usr/local/bin so that all users are able to run the software. Similarly all the other files are also copied to the standard directories in Linux. Remember that when you ran make, all the executables were created in the temporary directory where you had unzipped your original tarball. So when you run make install, these executables are copied to the final directories.
 + 
 +  * **Step 5:** make clean  
 +
 +===Check-lib failed==
 +
 +I have came accroos the error below error message when creating the executables by the make utility.  
 +
 +  /home/apg1e14/GDAL/gdal-1.11.2/frmts/o/.libs/dgif_lib.o: In function `DGifOpenFileHandle':
 +  /home/apg1e14/GDAL/gdal-1.11.2/frmts/gif/giflib/dgif_lib.c:111: undefined reference to `setmode'
 +  /home/apg1e14/GDAL/gdal-1.11.2/frmts/gif/giflib/dgif_lib.c:111:(.text+0x8e1): relocation truncated to fit:     R_X86_64_PC32 against undefined symbol `setmode'
 +  /home/apg1e14/GDAL/gdal-1.11.2/frmts/o/.libs/egif_lib.o: In function `EGifOpenFileHandle':
 +  /home/apg1e14/GDAL/gdal-1.11.2/frmts/gif/giflib/egif_lib.c:137: undefined reference to `setmode'
 +  /home/apg1e14/GDAL/gdal-1.11.2/frmts/gif/giflib/egif_lib.c:137:(.text+0x4c7): relocation truncated to fit:   R_X86_64_PC32 against undefined symbol `setmode'
 +  collect2: error: ld returned 1 exit status
 +  GNUmakefile:41: recipe for target 'libgdal.la' failed
 +  make[1]: *** [libgdal.la] Error 1
 +  make[1]: Leaving directory '/home/apg1e14/GDAL/gdal-1.11.2'
 +  GNUmakefile:50: recipe for target 'check-lib' failed
 +  make: *** [check-lib] Error 2
 +
 +  
 +If this happen to you, it is recommended that you run ''make clean'' which deletes all the already compiled object files. Running ''make clean'' before trying again is a good idea.
 +
 +this is solved...
faq/gdaloncygwinx64.txt · Last modified: 2016/03/20 19:15 by coastalmeadmin