[Qgis-user] Missing qwt5 for qgis_unstable under Ubuntu Jaunty

Nikos Alexandris nikos.alexandris at felis.uni-freiburg.de
Wed Apr 29 05:24:18 PDT 2009


Timmie:
> I think there could be a QGIS install guide like
> http://grass.osgeo.org/wiki/Compile_and_Install#Ubuntu_7.10_64-bit

Yes, there could. I did not find the time to update this page. Below is
what works for me... "basic-osgeo under Ubuntu 64-bit".

(
if you have the time and are willing to update the wiki or create a new
ubuntu-specific qgis-wiki page... :-p
)



OSGeo from source code under Ubuntu 64-bit
##########################################

latest update
Monday, 05.01.2009 02:40

previous updates
Wednesday, 10.12.2008 19:56
Monday, 08.12.2008 03:34
Sun 23.11.2008/15:49
Thu 20.11.2008/17:41
Tue 18.11.2008/14:49
Sun 31.08.2008/10:32



############
Dependencies
############

Install dependencies for:
• proj4
• geos
• gdal
• grass
• gdal-grass-plugin
• qgis

sudo apt-get install \
build-essential \
make \
flex \
bison \
gcc \
libgcc1 \
g++ \
cmake \
ccache \
swig swig1.3 \
python python-dev \
python3 python3-dev \
python-qt4 python-qt4-dev \
sip4 \
python-sip4 python-sip4-dev \
# python-gdal
python-opengl \
libgsl0-dev \
python-wxversion python-wxtools \
python-wxgtk2.8 \
wx2.8-headers wx-common \
libwxgtk2.8-dev libwxgtk2.8-dbg \
libwxbase2.8-dev  libwxbase2.8-dbg \
ruby \
libncurses5-dev \
zlib1g-dev \
libjpeg62-dev \
libtiff4-dev \
libpngwriter-dev \
libhdf4g-dev libhdf4g-run \
tcl8.4-dev tk8.4-dev \
libcairo libcairo-dev \
sqlite3 libsqlite3-dev \
libpq-dev \
libreadline5 libreadline5-dev libfreetype6-dev \
txt2tags \
fftw3 fftw3-dev \
libqt4-core libqt4-dbg libqt4-dev libqt4-gui libqt4-sql
libqt4-qt3support \
lsb-qt4 qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig \
libapt-pkg-perl resolvconf \
libjasper-dev \
subversion

# wxpython2.6-0
# uim-qt --> Causes QT Application to wait for ever at launch!!??

###################
• Suport for ffmpeg
###################

sudo apt-get install \
ffmpeg2theora \
libffmpegthumbnailer-dev \
libavcodec-dev \
libxmu-dev

Note (to self): add extra dependencies to get ffmpeg support when
compiling grass' source code under Ubuntu 64bit.
sudo apt-get install libavformat-dev libswscale-dev

Note (to self)2: The libavformat-dev is getting installed (I think) when
executing sudo apt-get install ffmpeg. The libswscale-dev package is
NOT installed.

Note (to self)3: Does not work under Jaunty (yet?) :-(



#######
• PROJ4
#######

# download "proj-4.6.1.tar.gz"  & "proj-datumgrid-1.4.tar.gz" from
http://trac.osgeo.org/proj
# move to /usr/local/src directory
tar xzvf proj-4.6.1.tar.gz

#move proj-datumgrid-1.3.tar.gz to proj/nad
tar xzvf proj-datumgrid-1.3.tar.gz

# clean previous configuration & compilation
sudo make distclean

# simple configure, compile and install
./configure  &&  make  &&  sudo make install



######
• GEOS
######

#download geos-3.0.3.tar.bz2 geos-3.1.0.tar.bz2 from
http://trac.osgeo.org/geos/
#move to "source-code" folder and decompress
bunzip geos-3.1.0.tar.bz2
tar xvf  geos-3.1.0.tar.bz2

# clean previous configuration & compilation 
sudo make distclean

# simple configure, compile and install
./configure  &&  make  &&  sudo make install  &&  sudo ldconfig

# Ensure that /usr/local/lib is added to /etc/ld.so.conf
# Ensure that you run /sbin/ldconfig afterwards
sudo ldconfig



######
• GDAL 
######

*Must* compile without GRASS support

# enter in directory gdal_stable
cd /usr/local/src/gdal_stable

# download with svn ## or update with svn up

# clean previous configurations/compilations
sudo make distclean

# configure
CFLAGS="-g -Wall" LDFLAGS="-s" ./configure \
--with-png=internal \
--with-libtiff=internal \
--with-geotiff=internal \
--with-jpeg=internal \
--with-gif=internal \
--with-ecw=yes \
--with-expat=yes \
--with-expat-inc=/usr/include/ \
--with-expat-lib=/usr/lib \
--with-sqlite3=yes \
--with-geos=yes \
--with-python \
--with-libz=internal \
--with-netcdf \
--with-sqlite \
--with-threads=yes \
--without-grass  \
--without-ogdi \
--with-pg=/usr/bin/pg_config \
--with-xerces=yes

#compile & install & ldconfig
make  &&  sudo make install  &&  sudo ldconfig

########################
Where is GDAL installed?
########################
# in /usr/local/bin
/usr/local/bin/gdal-config \
/usr/local/bin/gdal2tiles.py \
/usr/local/bin/gdal2xyz.py \
/usr/local/bin/gdal_contour \
/usr/local/bin/gdal_grid \
/usr/local/bin/gdal_merge.py \
/usr/local/bin/gdal_rasterize \
/usr/local/bin/gdal_retile.py \
/usr/local/bin/gdal_translate \
/usr/local/bin/gdaladdo \
/usr/local/bin/gdalchksum.py \
/usr/local/bin/gdalenhance \
/usr/local/bin/gdalident.py \ 
/usr/local/bin/gdalimport.py \
/usr/local/bin/gdalinfo \
/usr/local/bin/gdalmanage \
/usr/local/bin/gdaltindex \
/usr/local/bin/gdaltransform \
/usr/local/bin/gdalwarp \

# in /usr/local/share \
/usr/local/share/gdal \

# in /usr/local/lib \
/usr/local/lib/libgdal.a \
/usr/local/lib/libgdal.la \
/usr/local/lib/libgdal.so \
/usr/local/lib/libgdal.so.1 \
/usr/local/lib/libgdal.so.1.12.3 \

# in  /usr/local/include/
/usr/local/include/gdal.h \
/usr/local/include/gdal_alg.h \
/usr/local/include/gdal_frmts.h \
/usr/local/include/gdal_pam.h \
/usr/local/include/gdal_priv.h \
/usr/local/include/gdal_rat.h \
/usr/local/include/gdal_version.h \
/usr/local/include/gdal_vrt.h \
/usr/local/include/gdalgrid.h \
/usr/local/include/gdaljp2metadata.h \
/usr/local/include/gdalwarper.h \
#
########################



#######
• GRASS
#######

# download using subversion (svn)

# for GRASS 6.5
svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6
grass6_devel

# for GRASS 7
svn checkout https://svn.osgeo.org/grass/grass/trunk grass_trunk

# subsequent updates:
svn up

# clean previous configuration & compilation
sudo make distclean

# configure:
# CFLAGS="-g -Wall -O0" LDFLAGS="-s"
# CFLAGS="-g -Wall" ./configure \
CFLAGS="-g" ./configure \
--enable-debug \
--enable-64bit \
--with-libs=/usr/lib64 \
--with-cxx \
--with-freetype=yes \
--with-freetype-includes="/usr/include/freetype2/" \
--with-postgres=no \
--with-sqlite=yes \
--enable-largefile=yes \
--with-tcltk-includes="/usr/include/tcl8.4/" \
--with-freetype-includes=/usr/include/freetype2 \
--with-opengl-libs=/usr/include/GL \
--with-readline \
--with-python=yes \
--with-proj-share=/usr/local/share/proj/ \
--with-wxwidgets \
--with-cairo \
--with-ffmpeg=yes --with-ffmpeg-includes="/usr/include/ffmpeg/"
# ffmpeg does not work under Jaunty

# compile & install
make &&  sudo make install  &&  sudo ldconfig

###############
• GRASS Add-Ons
###############

# download via svn the add-ons
svn checkout https://svn.osgeo.org/grass/grass-addons grass-addons


###################
• GDAL-GRASS-plugin
###################

# get the plugin from
http://download.osgeo.org/gdal/gdal-grass-1.4.3.tar.gz
#create grass6.conf or add in ld.so.conf the GRASS library path

# clean previous configurations/compilations
sudo make distclean

#configure ##point to grass installation as needed
./configure \
--prefix=/usr/local \
--with-gdal=/usr/local/bin/gdal-config \
--with-grass=/usr/local/grass-6.5.svn/ \
### change to grass_trunk for grass7 ### \
### change to grass-6.4.svn for... ### \
--with-autoload="/usr/local/lib/gdalplugins/" \
--with-ld-shared="g++ -shared"

#compile & install
make  &&  sudo make install

Where is gdal-grass-plugin installed?
/usr/local/lib/gdalplugins/



######
• QGIS
######

# compile qgis source code following the steps described in the wiki

# get qgis from svn under the desired folder (I osgeo or (f)OS(s4)GEO or
(Untitled 172)* /usr/local/src)

### This step is required if two versions of qt are there!
# /usr/bin/qmake -> /etc/alternatives/qmake
sudo update-alternatives --config qmake
sudo update-alternatives --config uic
sudo update-alternatives --config designer
sudo update-alternatives --config assistant
sudo update-alternatives --config qtconfig
sudo update-alternatives --config moc
sudo update-alternatives --config lupdate
sudo update-alternatives --config lrelease
sudo update-alternatives --config linguist

# some tip to speed-up compilation as suggested in qgis wiki #
copy-paste url here
cd /usr/local/bin
sudo ln -s /usr/bin/ccache gcc
sudo ln -s /usr/bin/ccache g++

# get qgis
svn co https://svn.osgeo.org/qgis/trunk/qgis qgis

# configure - compile - install
cd /usr/local/src/qgis/
mkdir build
cd build
********************************************
# clean previous configurations/compilations
sudo make clean
********************************************
ccmake ..
# apply some settings...
make
sudo make install

# test
qgis

# install r, rpy, numpy
sudo apt-get install r-base python-rpy python-numpy

# in case of compiling another qgis version, before installing remove
all qgis related stuff

#for qgis_0_11
sudo rm -rf /usr/local/bin/qgis \
/usr/local/bin/qgis_help \
/usr/local/include/qgis \
/usr/local/lib/libqgis_core.so \
/usr/local/lib/libqgis_core.so.0.11 \
/usr/local/lib/libqgis_gui.so \
/usr/local/lib/libqgis_gui.so.0.11 \
/usr/local/lib/libqgisgrass.so \
/usr/local/lib/libqgisgrass.so.0.11 \
/usr/local/lib/libqgispython.so \
/usr/local/lib/libqgispython.so.0.11 \
/usr/local/lib/qgis \
/usr/local/share/qgis \
/usr/local/share/man/man1/qgis.man

# + for qgis 1.0
sudo rm -rf /usr/local/lib/libqgis_core.so.1.0 \
/usr/local/lib/libqgis_gui.so.1.0 \
/usr/local/lib/libqgispython.so.1.0
#/home/nik/.qgis

# + for qgis 1.1
sudo rm -rf /usr/local/lib/libqgis_core.so.1.1 \
/usr/local/lib/libqgis_core.so.1.1.0 \
/usr/local/lib/libqgis_gui.so.1.1 \
/usr/local/lib/libqgis_gui.so.1.1.0 \
/usr/local/lib/libqgisgrass.so.1.0 \
/usr/local/lib/libqgisgrass.so.1.0.2 \
/usr/local/lib/libqgisgrass.so.1.1 \
/usr/local/lib/libqgispython.so.1.1 \
/usr/local/lib/libqgispython.so.1.1.0 \
/usr/local/qgis_unstable/lib/libqgis_core.so \
/usr/local/qgis_unstable/lib/libqgis_core.so.1.1 \
/usr/local/qgis_unstable/lib/libqgis_core.so.1.1.0 \
/usr/local/qgis_unstable/lib/libqgis_gui.so \
/usr/local/qgis_unstable/lib/libqgis_gui.so.1.1 \
/usr/local/qgis_unstable/lib/libqgis_gui.so.1.1.0 \
/usr/local/qgis_unstable/lib/libqgisgrass.so \
/usr/local/qgis_unstable/lib/libqgisgrass.so.1.1 \
/usr/local/qgis_unstable/lib/libqgispython.so \
/usr/local/qgis_unstable/lib/libqgispython.so.1.1 \
/usr/local/qgis_unstable/lib/libqgispython.so.1.1.0



###############
Troubleshooting
###############

All installed but QGIS doesn't see GRASS or r.out.gdal doesn't work? 

• Check if GDAL finds the plugin:
gdal_translate --formats | grep -i grass
GRASS (ro): GRASS Database Rasters (5.7+)

• Check if the GRASS libs are found by the plugin. All libraries should
be found (maybe you forgot to run 'ldconfig' if you didn't install from
RPMs?):
ldd /usr/local/lib/gdalplugins/gdal_GRASS.so
ldd /usr/local/lib/gdalplugins/ogr_GRASS.so

• Check if the GRASS plugins are in the right directory (check the 'Auto
register' directory reported in the output):
# remember that you have to specify the absolute path:
export CPL_DEBUG=on

gdalinfo /home/neteler/grassdata/spearfish60/PERMANENT/cellhd/roads
ogrinfo -summary
$HOME/grassdata/spearfish60/PERMANENT/vector/roads/head



#############################
• Starspan with GRASS support
#############################

### Does not work anymore :-( ###

# download and prepare
tar zxf starspan-XXXX.tar.gz
cd starspan-XXXX

# configure - compile - install
./configure --with-grass=/usr/local/grass-6.4.svn
make
make install



##########
References
##########

• http://casoilresource.lawr.ucdavis.edu/drupal/node/123http://grass.osgeo.org/wiki/Compile_and_Install#How_to_do_compilation_and_installation_of_GRASS_6.3Fhttp://grass.osgeo.org/wiki/Compile_and_Install#Ubuntu_7.10_64-bithttp://n2.nabble.com/Compile-grass6_devel-with-ffmpeg-support--td1886308.html#a1886309




More information about the Qgis-user mailing list