[fdo-users] Compilation on 64-bit linux

Robin Newton robin.newton at 1spatial.com
Tue Apr 12 05:36:45 EDT 2011


> Have you looked at this page and tried any of their suggestions?
> 
> http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3

I saw this, and assumed that case 3 - "bug in the build system" - 
applied. I'm not familiar to bjam, and it wasn't clear to me how to pass 
in extra flags. (Answer: pass "cxxflags=-fPIC" as a parameter.)

I've got something built now. I've not run anything yet, so I don't know 
if I'm home and dry; but it compiles without any obvious errors (apart 
from "No rule to make target `all'" when making the openssl tests, which 
I assume is harmless). In case it's of interest, here's the script I ran 
to do the build for me (to be run in a directory containing various 
source tars):

#!/bin/bash

for f in fdo-3.6.0_5104.tar.gz fdoogr-3.6.0_5104.tar.gz 
fdosdf-3.6.0_5104.tar.gz fdoshp-3.6.0_5104.tar.gz 
fdosqlite-3.6.0_5104.tar.gz fdowfs-3.6.0_5104.tar.gz
do
     tar xzf $f
done

# Can't get gdal-1.7.1 to build on 64-bit Linux

rm -rf OpenSource_FDO/Thirdparty/gdal

tar xzf gdal-1.8.0.tar.gz && mv gdal-1.8.0 OpenSource_FDO/Thirdparty/gdal

perl -i.bak -pe 's/libgdal.so.1.14.1/libgdal.so.1.15.0/' 
OpenSource_FDO/Thirdparty/Thirdparty*.sh 
OpenSource_FDO/Thirdparty/Makefile.am

# Don't want installing under /usr/local/fdo-3.7.0, since I don't have 
permission

find OpenSource_FDO -type f | xargs -d '\n' grep -l /usr/local/fdo-3.7.0 
| xargs -d '\n' perl -i.bak -pe 
's|/usr/local/fdo-3.7.0|/usr/local/workspace/robinn/fdo-3.7.0|g'

# I've not got '-E' option to sudo, and I'm not a sudoer anyway

find OpenSource_FDO -type f | xargs -d '\n' grep -l "sudo -E" | xargs -d 
'\n' perl -i.bak -pe 's/sudo -E //'

# Minor tweaks (first of which may not be necessary)

find OpenSource_FDO -type f -name runConfigure | xargs -d '\n' perl 
-i.bak -pe 's/^bitsToBuild=32/bitsToBuild=64/'

perl -i.bak -pe 's/bin.linuxx86\/bjam /bin.linuxx86_64\/bjam 
cxxflags=-fPIC /' OpenSource_FDO/Thirdparty/Thirdparty*.sh

perl -i.bak -pe 
's/\(int\)sqlite3_get_auxdata/(long)sqlite3_get_auxdata/' 
OpenSource_FDO/Providers/SQLite/Src/Provider/SltExprExtensions.cpp

# Tidy up

find OpenSource_FDO -name '*.bak' | xargs rm

# Build

cd OpenSource_FDO

source ./setenvironment.sh

./build_thirdparty.sh

./build_linux.sh


Thanks for your help with this,
Robin


1Spatial: Steering you towards efficient and reliable location-based data with the 1Spatial Data Improvement Process

http://www.1spatial.com/improve_your_data/

1Spatial Group Limited; Registered in England No. 4785688 VAT Reg. No. 816329821; Registered Office: Tennyson House; Cambridge Business Park; Cambridge; CB4 0WZ; United Kingdom


IMPORTANT NOTICE
 
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender immediately and delete this e-mail from your system. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of 1Spatial Group Limited, its subsidiaries or associated companies, except where the author specifically states them to be the views of 1Spatial Group Limited, its subsidiaries or associated companies. 
 
1Spatial Group Limited, its subsidiaries and associated companies will not be held liable for any legally binding obligations that are not the subject of an official 1Spatial purchase order or as part of a contract signed by a director of one of the aforementioned companies.
 
Although the company has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments. You should understand and accept that, when communicating with us by e-mail, it is not a totally secure communications medium.



More information about the fdo-users mailing list