linker errors while building libspatialite-4.4.0-RC0

100 views
Skip to first unread message

polyg...@gmail.com

unread,
Sep 1, 2016, 1:58:30 AM9/1/16
to SpatiaLite Users
I have built the Proj4,GEOS and sqlite3 without any problem.However,while building the libspatialite-4.4.0-RC0
it gets stopped with below error. 

My configure command worked fine
CPPFLAGS="-I//usr/local/include" LDFLAGS="-L//usr/local/lib" ./configure --prefix=/usr/local --build=x86_64-pc-linux-gnu --host=arm-linux-eabi 
 
make fails with below error..How do I solve this?


"___gxx_personality_v0", referenced from:

      _initGEOS_r in libgeos_c.a(libgeos_c_la-geos_ts_c.o)

      _GEOS_init_r in libgeos_c.a(libgeos_c_la-geos_ts_c.o)

      _GEOSDisjoint_r in libgeos_c.a(libgeos_c_la-geos_ts_c.o)

      _GEOSTouches_r in libgeos_c.a(libgeos_c_la-geos_ts_c.o)

      _GEOSIntersects_r in libgeos_c.a(libgeos_c_la-geos_ts_c.o)

      _GEOSCrosses_r in libgeos_c.a(libgeos_c_la-geos_ts_c.o)

      _GEOSWithin_r in libgeos_c.a(libgeos_c_la-geos_ts_c.o)

      ...

  "_spatialite_cleanup_ex", referenced from:

      _main in demo1.o

  "_spatialite_init_ex", referenced from:

      _main in demo1.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: *** [demo1] Error 1

make[1]: *** [all-recursive] Error 1

make: *** [all] Error 2


errors_Log.rtf

Brad Hards

unread,
Sep 1, 2016, 6:38:55 AM9/1/16
to spatiali...@googlegroups.com
Looks like you are mixing clang and gcc, and you are claiming your build
machine is linux but the logs say mac.

Perhaps you can try with the right build target and use consistent compilers.

Brad



mj10777

unread,
Sep 1, 2016, 6:45:41 AM9/1/16
to SpatiaLite Users
Yes, I agree.
Also I noticed:
That the following is being used in the ./configure command (for each project)
--host=arm-linux-eab 

but that a ./configure messages of the type:

checking for arm-linux-eabi ...
return 'no'

which does not look good.

Mark


Brad



polyg...@gmail.com

unread,
Sep 2, 2016, 12:27:42 AM9/2/16
to SpatiaLite Users
Ok. I did the same on linux machine.Again proj,geos,sqlite does not trouble me.I get errors using 'Make'



[root@MYSRVER libspatialite-4.4.0-RC1]# make
make  all
-recursive
make
[1]: Entering directory `/home/myhost/durga/libspatialite-4.4.0-RC1'
Making all in src
make[2]: Entering directory `
/home/myhost/durga/libspatialite-4.4.0-RC1/src'
Making all in headers
make[3]: Entering directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/headers'

make
[3]: Nothing to be done for `all'.
make[3]: Leaving directory `
/home/myhost/durga/libspatialite-4.4.0-RC1/src/headers'
Making all in gaiaaux
make[3]: Entering directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiaaux'

make
[3]: Nothing to be done for `all'.
make[3]: Leaving directory `
/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiaaux'
Making all in gaiaexif
make[3]: Entering directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiaexif'

make
[3]: Nothing to be done for `all'.
make[3]: Leaving directory `
/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiaexif'
Making all in gaiageo
make[3]: Entering directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo'

Making all in flex
make
[4]: Entering directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo/flex'
make[4]: Nothing to be done for `
all'.
make[4]: Leaving directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo/flex'

Making all in lemon
make
[4]: Entering directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo/lemon'
Making all in lemon_src
make[5]: Entering directory `
/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo/lemon/lemon_src'
make[5]: Nothing to be done for `all'
.
make
[5]: Leaving directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo/lemon/lemon_src'
make[5]: Entering directory `
/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo/lemon'
make[5]: Nothing to be done for `all-am'
.
make
[5]: Leaving directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo/lemon'
make[4]: Leaving directory `
/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo/lemon'
make[4]: Entering directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo'

make
[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `
/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo'
make[3]: Leaving directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/gaiageo'

Making all in geopackage
make
[3]: Entering directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/geopackage'
make[3]: Nothing to be done for `
all'.
make[3]: Leaving directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/geopackage'

Making all in spatialite
make
[3]: Entering directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src/spatialite'
/bin/sh ../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../..  -g -O2 -I/usr/local/include -I/usr/include/libxml2 -I../../src/headers -I//usr/local/include -fvisibility=hidden -g -O2 -MT libsplite_la-spatialite.lo -MD -MP -MF .deps/libsplite_la-spatialite.Tpo -c -o libsplite_la-spatialite.lo `
test -f 'spatialite.c' || echo './'`spatialite.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -I/usr/local/include -I/usr/include/libxml2 -I../../src/headers -I//usr/local/include -fvisibility=hidden -g -O2 -MT libsplite_la-spatialite.lo -MD -MP -MF .deps/libsplite_la-spatialite.Tpo -c spatialite.c -o libsplite_la-spatialite.o
spatialite.c: In function 'testInvalidFP':
spatialite.c:26839: error: 'FP_NORMAL' undeclared (first use in this function)
spatialite.c:26839: error: (Each undeclared identifier is reported only once
spatialite.c:26839: error: for each function it appears in.)
spatialite.c:26839: error: 'FP_ZERO' undeclared (first use in this function)
make[3]: *** [libsplite_la-spatialite.lo] Error 1
make[3]: Leaving directory `
/home/myhost/durga/libspatialite-4.4.0-RC1/src/spatialite'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/myhost/durga/libspatialite-4.4.0-RC1/src'

make
[1]: *** [all-recursive] Error 1

make
[1]: Leaving directory `/home/myhost/durga/libspatialite-4.4.0-RC1'

make: *** [all] Error 2
[root@MYSRVER libspatialite-4.4.0-RC1]#

mj10777

unread,
Sep 2, 2016, 1:19:52 AM9/2/16
to SpatiaLite Users
You should read the given errors:

spatialite.c: In function 'testInvalidFP':
spatialite.c:26839: error: 'FP_NORMAL' undeclared (first use in this function)
spatialite.c:26839: error: (Each undeclared identifier is reported only once
spatialite.c:26839: error: for each function it appears in.)
spatialite.c:26839: error: 'FP_ZERO' undeclared (first use in this function)
make[3]: *** [libsplite_la-spatialite.lo] Error 1

Thee are standard math macros for gnu c or c++
- in c they are defined in 'math.h' which is being included in spatialite.c
//
// Floating point classes for fpclassify()
//

#define FP_NAN       0
#define FP_INFINITE  1
#define FP_ZERO      2
#define FP_SUBNORMAL 3
#define FP_NORMAL    4



So you must ask yourself:
- Why does my 'math.h', which the compiler is using, not have these definitions?
-- and once you have found out the reason why your compiler does not contain the standard headers expected
--- you must resolve the cause of the problem
Without a properly installed development environment
- you have no hope at all in getting things working

Mark
Reply all
Reply to author
Forward
0 new messages