geoda icon indicating copy to clipboard operation
geoda copied to clipboard

update GeoDa build system using CMAKE

Open papamoose opened this issue 8 years ago • 3 comments

I've only tested this with BuildTools/ubuntu/build64.sh, but can only assume that the issue would be the same for BuildTools/ubuntu/build.sh

When running 'build64.sh' from master I get the following error while it is trying to compiling (read ./configure) SpatialLite:

Using user-specified geos-config file: /root/geoda/BuildTools/ubuntu/libraries/bin/geos-config
checking geos_c.h usability... yes
checking geos_c.h presence... yes
checking for geos_c.h... yes
checking for library containing GEOSTopologyPreserveSimplify... no
configure: error: could not find libgeos_c - you may need to specify the directory of a geos-config file using --with-geosconfig
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.
Error! Exit

Well my geos-config file is in the proper location...

root@hester2:~/geoda/BuildTools/ubuntu# ls -l /root/geoda/BuildTools/ubuntu/libraries/bin/geos-config
-rwxr-xr-x 1 root root 923 Sep  7 16:35 /root/geoda/BuildTools/ubuntu/libraries/bin/geos-config

And I have some C files with a partial match.

root@hostname:~/geoda-1.10.0.2/BuildTools/ubuntu# find libraries/ -type f -name "libgeos_c*"
libraries/lib/libgeos_c.a
libraries/lib/libgeos_c.so.1.7.8
libraries/lib/libgeos_c.la

I assume that the configure line will need to be tweaked. Anyone know what needs to be done?

If it works for you on vanilla 16.04 please say so and close this issue, as the issue I am experiencing is then likely to be of my own doing.

papamoose avatar Sep 07 '17 21:09 papamoose

We’ve tested that build64.sh script working on a clean Ubuntu 16.04 and 14.04 64-bit OS. I guess you probably have two different GEOS versions installed on your system — one is installed under /root/geoda/BuildTools/ubuntu/libraries/bin by build64.sh.

Did you try to manually build spatialite under temp/libspatialite-4.0.0:

./configure --prefix=/root/geoda/BuildTools/ubuntu/libraries --with-geosconfig=/root/geoda/BuildTools/ubuntu/libraries/bin/geos-config make

Btw, build.sh script is only for 32-bit linux system, which we are not going to support in the future.

On Sep 7, 2017, at 2:48 PM, Phil Kauffman [email protected] wrote:

configure: error: could not find libgeos_c - you may need to specify the directory

lixun910 avatar Sep 07 '17 22:09 lixun910

Yes running ./configure manually is the first thing I did with the same result.

export PREFIX=/root/geoda/BuildTools/ubuntu/libraries; ./configure CFLAGS="-I${PREFIX}/include" CXXFLAGS="-I${PREFIX}/include" LDFLAGS="-L${PREFIX}/lib -liconv" --prefix=${PREFIX} --with-geosconfig=${PREFIX}/bin/geos-config

As far as I know I don't have libspatiallite installed anywhere else, but it shouldn't matter anyway because of the flags being used while running configure, which tell it where the libraries it should be using are.

In addition to this test, I ran build64.sh in a docker container, meaning there were no dependencies installed by default, and got a different error.

make[1]: Entering directory '/root/geoda-1.10.0/BuildTools/ubuntu/temp/gdal/apps'
/bin/bash /root/geoda-1.10.0/BuildTools/ubuntu/temp/gdal/libtool --mode=link	g++  gdalinfo_bin.lo  /root/geoda-1.10.0/BuildTools/ubuntu/temp/gdal/libgdal.la  -o gdalinfo
libtool: link: g++ .libs/gdalinfo_bin.o -o .libs/gdalinfo  /root/geoda-1.10.0/BuildTools/ubuntu/temp/gdal/.libs/libgdal.so -L/root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib -lssl -lrtmp -lidn /usr/lib/x86_64-linux-gnu/libexpat.so -lrt /root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib/libxerces-c.so -lnsl /root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib/libspatialite.so -L/usr/lib/x86_64-linux-gnu /root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib/libfreexl.so /root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib/libcharset.so /root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib/libproj.so -lm /root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib/libgeos_c.so /root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib/libgeos.so /root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib/libsqlite3.so -ldl /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so -lldap -lz /root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib/libcares.so /root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib/libiconv.so -lpthread -pthread  -Wl,-rpath -Wl,/root/geoda-1.10.0/BuildTools/ubuntu/libraries/lib
/root/geoda-1.10.0/BuildTools/ubuntu/temp/gdal/.libs/libgdal.so: undefined reference to `UTM_To_MGRS'
/root/geoda-1.10.0/BuildTools/ubuntu/temp/gdal/.libs/libgdal.so: undefined reference to `Convert_Geodetic_To_UTM'
/root/geoda-1.10.0/BuildTools/ubuntu/temp/gdal/.libs/libgdal.so: undefined reference to `Convert_UTM_To_Geodetic'
/root/geoda-1.10.0/BuildTools/ubuntu/temp/gdal/.libs/libgdal.so: undefined reference to `Get_Latitude_Range'
/root/geoda-1.10.0/BuildTools/ubuntu/temp/gdal/.libs/libgdal.so: undefined reference to `Set_UTM_Parameters'
collect2: error: ld returned 1 exit status
GNUmakefile:81: recipe for target 'gdalinfo' failed
make[1]: *** [gdalinfo] Error 1
make[1]: Leaving directory '/root/geoda-1.10.0/BuildTools/ubuntu/temp/gdal/apps'
GNUmakefile:93: recipe for target 'apps-target' failed
make: *** [apps-target] Error 2
Error! Exit

papamoose avatar Sep 11 '17 14:09 papamoose

I am a packager on openSUSE and a standardized build would be nice, it would increase the adoption of GeoDa a lot in my opinion!

fpesari avatar Oct 21 '21 10:10 fpesari