Autotools (LIBTOOL) build failing to add symbols to shared library. This is for postgis, please find below the Automake file.
AR = ar rs
CC = @CC@
LIBLWGEOM_LDFLAGS = ../../liblwgeom/.libs/liblwgeom.lcona
LIBLWGEOM_CFLAGS = -I../../liblwgeom
LIBGDAL_CFLAGS = @LIBGDAL_CFLAGS@
LIBGDAL_LDFLAGS = @LIBGDAL_LDFLAGS@
GEOS_LDFLAGS = @GEOS_LDFLAGS@ -lgeos_c
PROJ_LDFLAGS = @PROJ_LDFLAGS@ -lproj
LDFLAGS = $(LIBLWGEOM_LDFLAGS) $(LIBGDAL_LDFLAGS) $(PROJ_LDFLAGS) $(GEOS_LDFLAGS)
CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ $(LIBLWGEOM_CFLAGS) $(LIBGDAL_CFLAGS) @PROJ_CPPFLAGS@ @GEOS_CPPFLAGS@
top_builddir = @top_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
includedir = @includedir@
SHELL = @SHELL@
INSTALL = $(SHELL) ../install-sh
LIBTOOL = @LIBTOOL@
SOVER = @POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@.@POSTGIS_MICRO_VERSION@
# Standalone RTCORE objects
RT_OBJS = \
rt_util.o \
rt_spatial_relationship.o \
rt_mapalgebra.o \
rt_geometry.o \
rt_statistics.o \
rt_pixel.o \
rt_warp.o \
rt_band.o \
rt_raster.o \
rt_serialize.o \
rt_wkb.o \
rt_context.o
RT_LIB = librtcore.la
RT_HEADERS = \
rt_serialize.h \
librtcore.h \
librtcore_internal.h \
../raster_config.h
LT_RT_OBJS = $(RT_OBJ:.o=.lo)
LT_OBJ = $(LT_RT_OBJ)
all: librtcore.la
install: install-librtcore
uninstall: uninstall-librtcore
install-librtcore: librtcore.la
$(LIBTOOL) --mode=install $(INSTALL) librtcore.la "$(DESTDIR)$(libdir)/librtcore.la"
$(INSTALL) librtcore.h "$(DESTDIR)$(includedir)/librtcore.h"
unisntall-librtcore:
$(LIBTOOL) --mode-uninstall rm -f "$(DESTDIR)$(libdir)/liblrtcore.la"
librtcore.la: $(LT_RT_OBJS)
$(LIBTOOL) --tag=CC --mode=link $(CC) -rpath $(libdir) $(LT_RT_OBJS) -release $(SOVER) $(LDFLAGS) -o $@
$(LT_RT_OBJS): %.lo : %.c
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f $(RT_OBJS)
rm -f $(RT_LIB)
rm -f librtcore.la
rm -rf .libs
distclean: clean
rm -f Makefile
When trying to link against the shared library, I get the following error
undefined reference to `rtdealloc' This is my first experience with autotools.
rtdealloc is defined in module rt_context.c historically. Are you missing this file from your sources? I don't see it listed in the object files.