[OSM-dev] [OSM-talk] Osm2Pgsql problem linking to libxml2

Jon Burgess jburgess777 at googlemail.com
Mon Feb 12 23:04:04 GMT 2007


On Mon, 2007-02-12 at 13:40 +0000, yuri bay wrote:
> Hi Jon,
> 
> Many thanks for your help.  I hvae tried the commands you have given me and 
> I have two types of errors, but the result look promising as I only have 5 
> lines of errors for the second type.  The first type is when I use all the 
> command, the result said it cannot find -lz.  Does that mean I need to find 
> where is libz?  The second type of error is listed as follows, this is 
> generated by using all your commands, but without -lz :
> 
> osm2pgsql.o ( . text+0x12d8): osm2pgsql.c: undefined reference to 'asprintf'
> 
> This error has 5 lines all together, each with a different location, i.e. ( 
> . text+0x15c5) is different for each line.
> 
> Is this error cause by not using -lz? It is a *.lib file or *.dll file ??

No, asprintf() is a GNU glibc extension which does a malloc()+sprintf()
in a single call. I'm afraid you'll have to rewrite those bits of code
or provide an asprintf() implementation. 

-lz = zlib which is a pretty standard library. If you are not getting
any other unresolved symbols then you probably don't need it.

	Jon






More information about the dev mailing list