[TinyOWS-users] compiling tinyows

Daniel Porter danielbporter at gmail.com
Sat Feb 25 17:36:15 EST 2012


I'm working on compiling tinyows.  This is the first time I've tried
compiling something other than "hello, world!" from source.  I've run
into obstacles I've had trouble getting past on both Windows
Datacenter 2008 64bit and Ubuntu Oneiric Ocelot 64 bit.

On Windows, I followed Alexander Bruy's guide at
http://gis-lab.info/qa/tinyows-compile-vce-eng.html When I got to the
final step, nmake /f Makefile.vc, Visual Studio told me it couldn't
find unistd.h.  Some googling turned up that this is a unix file, that
that people have ported parts of it
 I also found several versions of it in various directories on my
server from installing OSGeo4W and PostgreSQL.  In an effort to get
visual studio to locate this file, I found the vcvarsall.bat which
purportedly sets the environmental variables, but I wasn't really sure
what to do with it.  I stopped to give it a try on linux.

On Ubuntu Oneiric server, after muddling through some errors, I
installed these packages:
1. make
2. libxml2-dev
3. postgresql-9.1
4. postgresql-server-dev-9.1
5. postgis
6. apache2

(Tangentially: The guide at
http://www.tinyows.org/trac/wiki/UserDocumentation indicates that
"Fast-CGI is recommended".  To get fastcgi, do I have to compile
apache myself?)

When I get to the "make" portion of the guide, I get a number of
undefined references:
/tmp/ccpYuos7.o: In function `wfs_parse_operation':
/home/ubuntu/tinyows-0.9.0/src/wfs/wfs_transaction.c:929: undefined
reference to `xmlFreeDoc'
/home/ubuntu/tinyows-0.9.0/src/wfs/wfs_transaction.c:1005: undefined
reference to `xmlFreeDoc'
/tmp/ccLyg5oq.o: In function `wms_get_map':
/home/ubuntu/tinyows-0.9.0/src/wms/wms_get_map.c:90: undefined
reference to `PQexec'
/home/ubuntu/tinyows-0.9.0/src/wms/wms_get_map.c:92: undefined
reference to `PQresultStatus'
/home/ubuntu/tinyows-0.9.0/src/wms/wms_get_map.c:94: undefined
reference to `PQerrorMessage'
/home/ubuntu/tinyows-0.9.0/src/wms/wms_get_map.c:99: undefined
reference to `PQgetvalue'
/home/ubuntu/tinyows-0.9.0/src/wms/wms_get_map.c:98: undefined
reference to `PQntuples'
/home/ubuntu/tinyows-0.9.0/src/wms/wms_get_map.c:105: undefined
reference to `PQclear'
collect2: ld returned 1 exit status

(There may be more, but I'm using putty and this ubuntu ami and the
terminal is being funny. I can only see the last page of text.)

These errors make me think postgreSQL wasn't compiled with the pq
headers.  I went to try to install postgresql from source, but that
looked like another headache, so I thought I'd see if y'all could
point me in the right direction before I went too far down that path.

Anyways, very excited about playing with TinyOWS.  Looks like a cool project.


More information about the TinyOWS-users mailing list