LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Problems building SpatiaLite (http://www.linuxquestions.org/questions/slackware-14/problems-building-spatialite-943115/)

alexbrui 05-03-2012 11:47 AM

Problems building SpatiaLite
 
I try to build SpatiaLite 3.0.1 (spatial data support for SQLite) on the top of system SQLite library. My system is 32bit Slackware 13.37. Also I have next packages (dependencies) installed:
  • SQLite 3.7.5 (shipped with distro)
  • Proj 4.7.0 (self-compiled)
  • GEOS 3.3.1 (self-compiled)

The first problem is that configure script failed with message:
Code:

checking for sqlite3_prepare_v2 in -lsqlite3... no
configure: error: 'libsqlite3' is required but it doesn't seem to be installed on this system.

That's strange because Slackware comes with SQLite 3.7.5. In configure.log I found next lines
Code:

configure:16925: checking for sqlite3_prepare_v2 in -lsqlite3
configure:16950: gcc -o conftest -g -O2  conftest.c -lsqlite3 -lm  >&5
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../libsqlite3.so: undefined reference to `dlsym'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../libsqlite3.so: undefined reference to `dlerror'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../libsqlite3.so: undefined reference to `dlopen'
/usr/lib/gcc/i486-slackware-linux/4.5.2/../../../libsqlite3.so: undefined reference to `dlclose'
collect2: ld returned 1 exit status
configure:16950: $? = 1
configure: failed program was:

For me this looks like dynamic linker is not used. I "fix" this by modifying configure script and adding "-ldl" to LIBS variable. After this changes all necessary libraries are found except iconv.
Code:

checking for iconv.h... yes
checking for library containing iconv... no
checking for library containing libiconv... no
configure: error: 'libiconv' is required but it doesn't seem to be installed on this system.

Running
Code:

nm /lib/libc.so.6 | grep iconv
gives me
Code:

000179a0 T iconv
00017b40 T iconv_close
00017610 T iconv_open

So this functionality available in C-runtime library, but for some reasons configure didn't find it.

Any ideas what is wrong? Is this Slackware issue or there is something wrong with my installation?

knudfl 05-03-2012 03:26 PM

Slackware 13.37 , 64bits.

Using proj-4.6.0, geos-3.3.3, freexl-1.0.0b.

This will do for the sqlite issue : ./configure CFLAGS=-ldl
( It's a Slackware issue ? A test compile on an rpm system : No problems.)


'iconv', I get this :
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking for library containing iconv... none required
checking for library containing locale_charset... no
checking for library containing nl_langinfo... none required
.... And libspatialite-3.0.1 compiles OK.


May be "libiconv" will solve your 'iconv' issues ?
http://slackbuilds.org/repository/13...ries/libiconv/

.

alexbrui 05-04-2012 09:07 AM

Thanks, passing CFLAGS=-ldl to configure works fine!


All times are GMT -5. The time now is 06:43 PM.