Mapserver compile error

Aaron Racicot aaronr at ECOTRUST.ORG
Mon Jul 17 13:10:41 EDT 2006


Antti,
You will need to tell your system where to find the gdal dynamically
loaded library after install.  I believe that it usually ends up in
/usr/local/lib/ and if it is not part of your LD_LIBRARY_PATH then you
can either:

1) Update LD_LIBRARY_PATH in your environment settings to include the
location of libgdal.so.1
2) Add the path for libgdal.so.1 to /etc/ld.so.conf and run
/sbin/ldconfig

Hope this helps...

Aaron

+----------------------------------------+
| Aaron Racicot  | aaronr at ecotrust.org   |
| GIS Programmer | 503.467.0759          |
+----------------------------------------+
| e c o t r u s t                        |
| Jean Vollum Natural Capital Center     |
| 721 NW Ninth Avenue                    |
| Suite 200                              |
| Portland, OR 97209                     |
| www.ecotrust.org                       |
+----------------------------------------+


-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of antti siukola
Sent: Monday, July 17, 2006 3:29 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Mapserver compile error


Reply to myself

I got it to work after removing gdal packages that I was installed from
Ubuntus repository since they were the duplicates with my manually
installed gdal. So, after that I recompiled gdal manually and compiled
mapserver and copied the php_mapscript.so to the php extension directory
but then I get this error:

Warning: dl() [function.dl]: Unable to load dynamic library
'/usr/lib/php5/20041030/php_mapscript.so' - libgdal.so.1: cannot open
shared object file: No such file or directory

What now?

Regards,

Antti S

On 7/17/06, antti siukola <siukola.antti at gmail.com> wrote:
> Hi!
>
> I'm compiling the most recent MapServer and I get this OGR related 
> error on make:
>
> ./libmap.a(mapogr.o): In function `msOGRFileWhichShapes(layer_obj*, 
> rectObj, ms_ogr_file_info_t*)':mapogr.cpp:(.text+0x38e): undefined 
> reference to `OGRLineString::setPoint(int, double, double)'
> :mapogr.cpp:(.text+0x3ac): undefined reference to 
> `OGRLineString::setPoint(int, double, double)'
> :mapogr.cpp:(.text+0x3ca): undefined reference to 
> `OGRLineString::setPoint(int, double, double)'
> :mapogr.cpp:(.text+0x3e8): undefined reference to 
> `OGRLineString::setPoint(int, double, double)'
> :mapogr.cpp:(.text+0x406): undefined reference to 
> `OGRLineString::setPoint(int, double, double)'
> ./libmap.a(mapogr.o): In function
> `msOGRShapeToWKT':mapogr.cpp:(.text+0xa15): undefined reference to 
> `OGR_G_SetPoint_2D'
> :mapogr.cpp:(.text+0xa65): undefined reference to `OGR_G_AddPoint_2D'
> :mapogr.cpp:(.text+0xaf1): undefined reference to `OGR_G_AddPoint_2D'
> collect2: ld returned 1 exit status
> make: *** [shp2img] Error 1
>
> I found some info from mailing list archive:
>
> "This generally means you have two copies of GDAL/OGR on your system. 
> MapServer is getting built using the include files from one, but 
> linked against the libraries of another.  I would suggest you try and 
> strip the older GDAL/OGR off completely, or muck around with the 
> MapServer makefile to ensure that only one version is getting used 
> consistently.  Basically fiddling with the order of -I include 
> directives and -L library paths." -Frank Warmerdam, 
> warmerdam at pobox.com
>
> So I ran make clean on gdal and recompiled it and then tried to 
> compile mapserver but got the same error again.
>
> Regards,
>
> Antti S
>



More information about the mapserver-users mailing list