Skip to content

Commit e2f867a

Browse files

File tree

1 file changed

+50
-13
lines changed

1 file changed

+50
-13
lines changed
 

‎INSTALL

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Compiling QGIS From Source
2-
Tim Sutton 2007
31
%!encoding: iso-8859-1
42

53

@@ -681,7 +679,7 @@ If all built without errors you can then install it:
681679
5.1. Building QGIS with Qt4.x
682680
=============================
683681

684-
*Requires:* Ubuntu Edgy
682+
*Requires:* Ubuntu Edgy / Debian derived distro
685683

686684
These notes are for if you want to build QGIS from source. One of the major
687685
aims here is to show how this can be done using binary packages for *all*
@@ -718,7 +716,7 @@ Now update your local sources database:
718716
================
719717

720718

721-
sudo apt-get install libqt4-core libqt4-debug libqt4-debug-dev \
719+
sudo apt-get install libqt4-core libqt4-debug \
722720
libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql lsb-qt4 qt4-designer \
723721
qt4-dev-tools qt4-doc qt4-qtconfig uim-qt gcc libapt-pkg-perl resolvconf
724722

@@ -765,11 +763,13 @@ above commands to select the Qt4 version of the relevant applications.
765763

766764

767765
sudo apt-get install gdal-bin libgdal1-dev libgeos-dev proj libtool \
768-
libgdal-doc libhdf4g-dev libhdf4g-run autoconf2.13 automake1.9 python-dev \
766+
libgdal-doc libhdf4g-dev libhdf4g-run python-dev \
769767
swig libgsl0-dev g++ libjasper-1.701-dev libtiff4-dev subversion gsl-bin \
770-
libsqlite3-dev sqlite3 ccache make libpq-dev flex bison firefox
768+
libsqlite3-dev sqlite3 ccache make libpq-dev flex bison
771769

772770

771+
/!\ Debian users should use libgdal-dev above rather
772+
773773

774774
5.5. GRASS Specific Steps
775775
=========================
@@ -783,6 +783,8 @@ Now you can install grass from dapper:
783783
sudo apt-get install grass libgrass-dev libgdal1-grass
784784

785785

786+
/!\ You may need to explicitly state your grass version e.g. libgdal1-1.3.2-grass
787+
786788

787789
5.6. Setup ccache (Optional)
788790
============================
@@ -862,23 +864,46 @@ development version. I suggest you do something similar:
862864
mkdir -p ${HOME}/apps
863865

864866

865-
The script will carry on to build QGIS - it may take a little while to go
866-
and have a cup of your favourite beverage while you wait...
867+
Now we create a build directory and run ccmake:
868+
869+
870+
cd qgis
871+
mkdir build
872+
ccmake ..
873+
874+
875+
When you run ccmake (note the .. is required!), a menu will appear where
876+
you can configure various aspects of the build. If you do not have root
877+
access or do not want to overwrite existing QGIS installs (by your
878+
packagemanager for example), set the CMAKE_BUILD_PREFIX to somewhere you
879+
have write access to (I usually use /home/timlinux/apps). Now press
880+
'c' to configure, 'e' to dismiss any error messages that may appear.
881+
and 'g' to generate the make files. Note that sometimes 'c' needs to
882+
be pressed several times before the 'g' option becomes available.
883+
After the 'g' generation is complete, press 'q' to exit the ccmake
884+
interactive dialog.
885+
886+
Now on with the build:
887+
888+
889+
make
890+
make install
891+
892+
893+
It may take a little while to build depending on your platform.
867894

868895

869896
5.10. Running QGIS
870897
==================
871898

872-
Once the compile is complete it should pop up a page in firefox with unit
873-
test results. At the time of writing the unit tests are just stubs - we
874-
still need to create the test implementations - so dont worry to much about
875-
their output at the moment.
876-
877899
Now you can try to run QGIS:
878900

879901

902+
export LD_LIBRARY_PATH=/home/apps/lib
880903
$HOME/apps/bin/qgis
881904

905+
/!\ Note the export LD_LIBRARY_PATH is only needed if you are installing
906+
into a path not covered by your system's ld.so.conf.
882907

883908
If all has worked properly the QGIS application should start up and appear
884909
on your screen.
@@ -1008,13 +1033,25 @@ programs will be dynamically linked to it...
10081033
g++ -s gdaltindex.o -o gdaltindex.exe -L/usr/local/lib -lpng -lz -lgdal
10091034
g++ -s gdal_rasterize.o -o gdal_rasterize.exe -L/usr/local/lib -lpng -lz -lgdal
10101035
install gdalinfo.exe gdal_translate.exe gdaladdo.exe gdalwarp.exe gdal_contour.exe gdaltindex.exe gdal_rasterize.exe /usr/local/bin
1036+
10111037

10121038

10131039
Finally, manually edit gdal-config in c:\msys\local\bin to replace the static library reference with -lgdal:
10141040

10151041

10161042
CONFIG_LIBS="-L/usr/local/lib -lpng -lz -lgdal"
10171043

1044+
GDAL build procedure can be greatly simplified to use libtool with a libtool line patch:
1045+
configure gdal as below:
1046+
./configure --with-ngpython --with-xerces=/local/ --with-jasper=/local/ --with-grass=/local/grass-6.3.cvs/ --with-pg=/local/pgsql/bin/pg_config.exe
1047+
1048+
Then fix libtool with:
1049+
mv libtool libtool.orig
1050+
cat libtool.orig | sed 's/max_cmd_len=8192/max_cmd_len=32768/g' > libtool
1051+
1052+
Libtool on windows assumes a line length limit of 8192 for some reason and tries to page the linking and fails miserably. This is a work around.
1053+
1054+
Make and make install should be hassle free after this.
10181055

10191056

10201057
5.12.3. GRASS

0 commit comments

Comments
 (0)
Please sign in to comment.