Building mod_tile on OS X

View: New views
4 Messages — Rating Filter:   Alert me  

Building mod_tile on OS X

by Adam Ratcliffe-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Has anybody been successful in doing this?  I've been unable to compile the prerequisite iniParser.

Cheers

Adam Ratcliffe
Software Developer
GeoSmart
PO Box 101001
29 Apollo Drive, Mairangi Bay, Auckland, NZ
Ph: +64 9 9668757        Fx: +64 9 966 8721
Email: adam.ratcliffe@...
Web:  www.GeoSmart.co.nz

SmartNAV  - The premier Car Navigation dataset for NZ
SmartFIND - Web and Mobile mapping solutions by GeoSmart
www.aamaps.co.nz  - For FREE web maps and directions within NZ
Route2GO - Optimised journey planning to create the most efficient routes to your customers for your sales or service calls


_______________________________________________
Mapnik-users mailing list
Mapnik-users@...
https://lists.berlios.de/mailman/listinfo/mapnik-users

Re: Building mod_tile on OS X

by Dane Springmeyer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Adam,

Yes, iniParser does not appear to even have been tested on os x. I got mod_tile to build a while back by avoiding the compile of the iniParser dynamic lib and therefore only making and linking to the static lib. 

-libiniparser.so: $(OBJS)
- @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \
- -Wl,-soname=`basename $@`.0
+#libiniparser.so: $(OBJS)
+# @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \
+# -Wl,-soname=`basename $@`.0


Full mod_tile diff attached for my os x compile on leopard.

Dane




On Sep 21, 2009, at 6:36 PM, Adam Ratcliffe wrote:

Has anybody been successful in doing this?  I've been unable to compile the prerequisite iniParser.

Cheers

Adam Ratcliffe
Software Developer
GeoSmart
PO Box 101001
29 Apollo Drive, Mairangi Bay, Auckland, NZ
Ph: +64 9 9668757        Fx: +64 9 966 8721
Email: adam.ratcliffe@...
Web:  www.GeoSmart.co.nz

SmartNAV  - The premier Car Navigation dataset for NZ
SmartFIND - Web and Mobile mapping solutions by GeoSmart
www.aamaps.co.nz  - For FREE web maps and directions within NZ
Route2GO - Optimised journey planning to create the most efficient routes to your customers for your sales or service calls

_______________________________________________
Mapnik-users mailing list
Mapnik-users@...
https://lists.berlios.de/mailman/listinfo/mapnik-users


_______________________________________________
Mapnik-users mailing list
Mapnik-users@...
https://lists.berlios.de/mailman/listinfo/mapnik-users

mod_tile_osx_compile.patch (3K) Download Attachment

Re: Building mod_tile on OS X

by Adam Ratcliffe-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dane,

Thanks for looking into this for me.  I applied your patch and attempted to build mod_tile but am getting a compilation error (see below).  I'm not so familiar with building C applications from source so could well have overlooked something obvious.

[adam@GUIWSM0K mod_tile]$ make 
/usr/share/httpd/build/libtool --silent --mode=compile gcc -I.    -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -Wall    -I/usr/include/apache2 -I. -I/Users/adam/src/httpd-2.2.11/srclib/apr/include -I/Users/adam/src/httpd-2.2.11/srclib/apr-util/include -I/usr/include -prefer-pic -c mod_tile.c && touch mod_tile.slo
mod_tile.c: In function 'add_expiry':
mod_tile.c:368: warning: format '%lld' expects type 'long long int', but argument 3 has type 'long int'
mod_tile.c: In function 'tile_handler_mod_stats':
mod_tile.c:671: warning: format '%li' expects type 'long int', but argument 3 has type 'apr_uint64_t'
mod_tile.c:672: warning: format '%li' expects type 'long int', but argument 3 has type 'apr_uint64_t'
mod_tile.c:673: warning: format '%li' expects type 'long int', but argument 3 has type 'apr_uint64_t'
mod_tile.c:674: warning: format '%li' expects type 'long int', but argument 3 has type 'apr_uint64_t'
mod_tile.c:675: warning: format '%li' expects type 'long int', but argument 3 has type 'apr_uint64_t'
mod_tile.c:676: warning: format '%li' expects type 'long int', but argument 3 has type 'apr_uint64_t'
mod_tile.c:677: warning: format '%li' expects type 'long int', but argument 3 has type 'apr_uint64_t'
mod_tile.c:678: warning: format '%li' expects type 'long int', but argument 3 has type 'apr_uint64_t'
mod_tile.c:679: warning: format '%li' expects type 'long int', but argument 3 has type 'apr_uint64_t'
/usr/share/httpd/build/libtool --silent --mode=compile gcc -I.    -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -Wall    -I/usr/include/apache2 -I. -I/Users/adam/src/httpd-2.2.11/srclib/apr/include -I/Users/adam/src/httpd-2.2.11/srclib/apr-util/include -I/usr/include -prefer-pic -c dir_utils.c && touch dir_utils.slo
/usr/share/httpd/build/libtool --silent --mode=compile gcc -I.    -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -Wall    -I/usr/include/apache2 -I. -I/Users/adam/src/httpd-2.2.11/srclib/apr/include -I/Users/adam/src/httpd-2.2.11/srclib/apr-util/include -I/usr/include -prefer-pic -c store.c && touch store.slo
/usr/share/httpd/build/libtool --silent --mode=link gcc -I.    -L/usr/lib      -o mod_tile.la -rpath /usr/libexec/apache2 -module -avoid-version mod_tile.lo dir_utils.lo store.lo
g++ -o renderd store.c daemon.c gen_tile.cpp dir_utils.c protocol.h render_config.h dir_utils.h store.h iniparser3.0b/libiniparser.a -g -lmapnik -L/usr/local/lib -Liniparser3.0b -liniparser -g -O2 -Wall -I/usr/local/include/mapnik -I/static/include -I/opt/local/include/freetype2 -I/opt/local/include  
daemon.c: In function 'int main(int, char**)':
daemon.c:1065: warning: 'daemon' is deprecated (declared at /usr/include/stdlib.h:283)
daemon.c:1065: warning: 'daemon' is deprecated (declared at /usr/include/stdlib.h:283)
daemon.c: In function 'void clear_requests(int)':
daemon.c:94: warning: 'queueHead' may be used uninitialized in this function
ld: in iniparser3.0b/libiniparser.a, archive has no table of contents
collect2: ld returned 1 exit status
make: *** [renderd] Error 1

Cheers
Adam

On 25/09/2009, at 11:54 AM, Dane Springmeyer wrote:

Hello Adam,

Yes, iniParser does not appear to even have been tested on os x. I got mod_tile to build a while back by avoiding the compile of the iniParser dynamic lib and therefore only making and linking to the static lib. 

-libiniparser.so: $(OBJS)
- @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \
- -Wl,-soname=`basename $@`.0
+#libiniparser.so: $(OBJS)
+# @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \
+# -Wl,-soname=`basename $@`.0


Full mod_tile diff attached for my os x compile on leopard.

Dane

<mod_tile_osx_compile.patch><ATT00001.htm>


Adam Ratcliffe
Software Developer
GeoSmart
PO Box 101001
29 Apollo Drive, Mairangi Bay, Auckland, NZ
Ph: +64 9 9668757        Fx: +64 9 966 8721
Email: adam.ratcliffe@...
Web:  www.GeoSmart.co.nz

SmartNAV  - The premier Car Navigation dataset for NZ
SmartFIND - Web and Mobile mapping solutions by GeoSmart
www.aamaps.co.nz  - For FREE web maps and directions within NZ
Route2GO - Optimised journey planning to create the most efficient routes to your customers for your sales or service calls


_______________________________________________
Mapnik-users mailing list
Mapnik-users@...
https://lists.berlios.de/mailman/listinfo/mapnik-users

Re: Building mod_tile on OS X

by Dane Springmeyer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sep 24, 2009, at 6:49 PM, Adam Ratcliffe wrote:

> Hi Dane,
>
> Thanks for looking into this for me.  I applied your patch and  
> attempted to build mod_tile but am getting a compilation error (see  
> below).

Hmm, that odd. I just tried again on a fresh checkout of mod_tile and  
it compiles without any fatal error.

This is my output:

$ make
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc -I.    -
DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -Wall    
-I/usr/include/apache2 -I. -I/usr/include/apr-1  -c mod_tile.c &&  
touch mod_tile.slo
mod_tile.c: In function 'add_expiry':
mod_tile.c:368: warning: format '%lld' expects type 'long long int',  
but argument 3 has type 'long int'
mod_tile.c: In function 'tile_handler_mod_stats':
mod_tile.c:671: warning: format '%li' expects type 'long int', but  
argument 3 has type 'apr_uint64_t'
mod_tile.c:672: warning: format '%li' expects type 'long int', but  
argument 3 has type 'apr_uint64_t'
mod_tile.c:673: warning: format '%li' expects type 'long int', but  
argument 3 has type 'apr_uint64_t'
mod_tile.c:674: warning: format '%li' expects type 'long int', but  
argument 3 has type 'apr_uint64_t'
mod_tile.c:675: warning: format '%li' expects type 'long int', but  
argument 3 has type 'apr_uint64_t'
mod_tile.c:676: warning: format '%li' expects type 'long int', but  
argument 3 has type 'apr_uint64_t'
mod_tile.c:677: warning: format '%li' expects type 'long int', but  
argument 3 has type 'apr_uint64_t'
mod_tile.c:678: warning: format '%li' expects type 'long int', but  
argument 3 has type 'apr_uint64_t'
mod_tile.c:679: warning: format '%li' expects type 'long int', but  
argument 3 has type 'apr_uint64_t'
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc -I.    -
DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -Wall    
-I/usr/include/apache2 -I. -I/usr/include/apr-1  -c dir_utils.c &&  
touch dir_utils.slo
/usr/share/apr-1/build-1/libtool --silent --mode=compile gcc -I.    -
DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -Wall    
-I/usr/include/apache2 -I. -I/usr/include/apr-1  -c store.c && touch  
store.slo
/usr/share/apr-1/build-1/libtool --silent --mode=link gcc -I.    -L/
usr/lib      -o mod_tile.la -rpath /usr/libexec/apache2 -module -avoid-
version mod_tile.lo dir_utils.lo store.lo
make -C iniparser3.0b
compiling src/iniparser.c ...
compiling src/dictionary.c ...
a - src/iniparser.o
a - src/dictionary.o
g++ -o renderd store.c daemon.c gen_tile.cpp dir_utils.c protocol.h  
render_config.h dir_utils.h store.h iniparser3.0b/libiniparser.a -g -
lmapnik -L/usr/local/lib -Liniparser3.0b -liniparser -g -O2 -Wall -I/
usr/local/include/mapnik -I/usr/X11/include/freetype2 -I/usr/X11/
include -I/static/include/boost-1_39
daemon.c: In function ‘int main(int, char**)’:
daemon.c:1065: warning: ‘daemon’ is deprecated (declared at /usr/
include/stdlib.h:283)
daemon.c:1065: warning: ‘daemon’ is deprecated (declared at /usr/
include/stdlib.h:283)
daemon.c: In function ‘void clear_requests(int)’:
daemon.c:94: warning: ‘queueHead’ may be used uninitialized in this  
function
g++  -Wall    speedtest.cpp render_config.h protocol.h dir_utils.c  
dir_utils.h   -o speedtest
gcc     render_list.c render_config.h protocol.h dir_utils.c  
dir_utils.h   -o render_list
gcc -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -
Wall -o render_old render_config.h protocol.h dir_utils.c dir_utils.h  
render_old.c -lpthread
gcc     convert_meta.c render_config.h protocol.h dir_utils.c  
dir_utils.h store.c   -o convert_meta



What gcc version are you running?

springmeyer:mod_tile spring$ gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5490~1/src/configure --disable-
checking -enable-werror --prefix=/usr --mandir=/share/man --enable-
languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/
$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/
lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --
host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5490)



> I'm not so familiar with building C applications from source so  
> could well have overlooked something obvious.
>
> [adam@GUIWSM0K mod_tile]$ make
> /usr/share/httpd/build/libtool --silent --mode=compile gcc -I.    -
> DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -
> Wall    -I/usr/include/apache2 -I. -I/Users/adam/src/httpd-2.2.11/
> srclib/apr/include -I/Users/adam/src/httpd-2.2.11/srclib/apr-util/
> include -I/usr/include -prefer-pic -c mod_tile.c && touch mod_tile.slo
> mod_tile.c: In function 'add_expiry':
> mod_tile.c:368: warning: format '%lld' expects type 'long long int',  
> but argument 3 has type 'long int'
> mod_tile.c: In function 'tile_handler_mod_stats':
> mod_tile.c:671: warning: format '%li' expects type 'long int', but  
> argument 3 has type 'apr_uint64_t'
> mod_tile.c:672: warning: format '%li' expects type 'long int', but  
> argument 3 has type 'apr_uint64_t'
> mod_tile.c:673: warning: format '%li' expects type 'long int', but  
> argument 3 has type 'apr_uint64_t'
> mod_tile.c:674: warning: format '%li' expects type 'long int', but  
> argument 3 has type 'apr_uint64_t'
> mod_tile.c:675: warning: format '%li' expects type 'long int', but  
> argument 3 has type 'apr_uint64_t'
> mod_tile.c:676: warning: format '%li' expects type 'long int', but  
> argument 3 has type 'apr_uint64_t'
> mod_tile.c:677: warning: format '%li' expects type 'long int', but  
> argument 3 has type 'apr_uint64_t'
> mod_tile.c:678: warning: format '%li' expects type 'long int', but  
> argument 3 has type 'apr_uint64_t'
> mod_tile.c:679: warning: format '%li' expects type 'long int', but  
> argument 3 has type 'apr_uint64_t'
> /usr/share/httpd/build/libtool --silent --mode=compile gcc -I.    -
> DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -
> Wall    -I/usr/include/apache2 -I. -I/Users/adam/src/httpd-2.2.11/
> srclib/apr/include -I/Users/adam/src/httpd-2.2.11/srclib/apr-util/
> include -I/usr/include -prefer-pic -c dir_utils.c && touch  
> dir_utils.slo
> /usr/share/httpd/build/libtool --silent --mode=compile gcc -I.    -
> DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -g -O2 -
> Wall    -I/usr/include/apache2 -I. -I/Users/adam/src/httpd-2.2.11/
> srclib/apr/include -I/Users/adam/src/httpd-2.2.11/srclib/apr-util/
> include -I/usr/include -prefer-pic -c store.c && touch store.slo
> /usr/share/httpd/build/libtool --silent --mode=link gcc -I.    -L/
> usr/lib      -o mod_tile.la -rpath /usr/libexec/apache2 -module -
> avoid-version mod_tile.lo dir_utils.lo store.lo
> g++ -o renderd store.c daemon.c gen_tile.cpp dir_utils.c protocol.h  
> render_config.h dir_utils.h store.h iniparser3.0b/libiniparser.a -g -
> lmapnik -L/usr/local/lib -Liniparser3.0b -liniparser -g -O2 -Wall -I/
> usr/local/include/mapnik -I/static/include -I/opt/local/include/
> freetype2 -I/opt/local/include
> daemon.c: In function 'int main(int, char**)':
> daemon.c:1065: warning: 'daemon' is deprecated (declared at /usr/
> include/stdlib.h:283)
> daemon.c:1065: warning: 'daemon' is deprecated (declared at /usr/
> include/stdlib.h:283)
> daemon.c: In function 'void clear_requests(int)':
> daemon.c:94: warning: 'queueHead' may be used uninitialized in this  
> function


> ld: in iniparser3.0b/libiniparser.a, archive has no table of contents

what does this give?

$ file iniparser3.0b/libiniparser.a

Also, can you try running:

$ ranlib iniparser3.0b/libiniparser.a

then doing 'make' again.

Dane

_______________________________________________
Mapnik-users mailing list
Mapnik-users@...
https://lists.berlios.de/mailman/listinfo/mapnik-users