Opened 12 years ago

Closed 12 years ago

#4364 closed defect (fixed)

error in /ogr/ogrsf_frmts/xls

Reported by: martinl Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: major Keywords: xls
Cc:

Description

CFLAGS="-Wall -g" CXXFLAGS="-Wall -g" \
            ./configure --prefix=/usr/local --mandir=/usr/local/share \
            --with-sqlite3 --with-spatialite=/usr/local --with-python \
            --with-gnu-ld --with-threads


make
sudo make install
make[3]: Entering directory `/usr/local/src/gdal_trunk/ogr/ogrsf_frmts/xls'
/bin/bash /home/martin/src/gdal_trunk/libtool --mode=compile --tag=CXX g++ -Wall -g  -Wall  -I.. -I../..  -I/home/martin/src/gdal_trunk/port -I/home/martin/src/gdal_trunk/gcore -I/home/martin/src/gdal_trunk/alg -I/home/martin/src/gdal_trunk/ogr -I/home/martin/src/gdal_trunk/ogr/ogrsf_frmts -DOGR_ENABLED -I/home/martin/src/gdal_trunk/port  -c -o ../o/ogrxlslayer.lo ogrxlslayer.cpp
libtool: compile:  g++ -Wall -g -Wall -I.. -I../.. -I/home/martin/src/gdal_trunk/port -I/home/martin/src/gdal_trunk/gcore -I/home/martin/src/gdal_trunk/alg -I/home/martin/src/gdal_trunk/ogr -I/home/martin/src/gdal_trunk/ogr/ogrsf_frmts -DOGR_ENABLED -I/home/martin/src/gdal_trunk/port -c ogrxlslayer.cpp  -fPIC -DPIC -o ../o/.libs/ogrxlslayer.o
ogrxlslayer.cpp: In member function 'void OGRXLSLayer::DetectHeaderLine(const void*)':
ogrxlslayer.cpp:92:5: error: 'FreeXL_CellValue' was not declared in this scope
ogrxlslayer.cpp:92:22: error: expected ';' before 'sCellValue'
ogrxlslayer.cpp:96:53: error: 'sCellValue' was not declared in this scope
ogrxlslayer.cpp:106:53: error: 'sCellValue' was not declared in this scope
ogrxlslayer.cpp: In member function 'void OGRXLSLayer::DetectColumnTypes(const void*, OGRFieldType*)':
ogrxlslayer.cpp:137:5: error: 'FreeXL_CellValue' was not declared in this scope
ogrxlslayer.cpp:137:22: error: expected ';' before 'sCellValue'
ogrxlslayer.cpp:142:57: error: 'sCellValue' was not declared in this scope
ogrxlslayer.cpp: In member function 'virtual OGRFeatureDefn* OGRXLSLayer::GetLayerDefn()':
ogrxlslayer.cpp:217:9: error: 'FreeXL_CellValue' was not declared in this scope
ogrxlslayer.cpp:217:26: error: expected ';' before 'sCellValue'
ogrxlslayer.cpp:239:57: error: 'sCellValue' was not declared in this scope
ogrxlslayer.cpp: In member function 'OGRFeature* OGRXLSLayer::GetNextRawFeature()':
ogrxlslayer.cpp:326:5: error: 'FreeXL_CellValue' was not declared in this scope
ogrxlslayer.cpp:326:22: error: expected ';' before 'sCellValue'
ogrxlslayer.cpp:329:60: error: 'sCellValue' was not declared in this scope
make[3]: *** [../o/ogrxlslayer.lo] Error 1

Change History (5)

comment:1 by martinl, 12 years ago

Resolution: invalid
Status: newclosed

Ops, sorry for noise, my FreeXL library was just too old.

comment:2 by martinl, 12 years ago

Resolution: invalid
Status: closedreopened

I discovered another error when linking the library

/bin/bash /home/martin/src/gdal_trunk/libtool --mode=link       g++  gdalinfo.lo  /home/martin/src/gdal_trunk/libgdal.la -o gdalinfo
libtool: link: g++ .libs/gdalinfo.o -o .libs/gdalinfo  /home/martin/src/gdal_trunk/.libs/libgdal.so -L/usr/local/lib -L/usr/lib -lodbc -lodbcinst /usr/lib/i386-linux-gnu/libexpat.so -ljasper -ljpeg -lpng -lpq -lz -lrt /usr/local/lib/libspatialite.so -lstdc++ /usr/local/lib/libgeos_c.so /usr/local/lib/libgeos.so /usr/local/lib/libproj.so -lm -lpthread -ldl /usr/lib/i386-linux-gnu/libcurl-gnutls.so 
/home/martin/src/gdal_trunk/.libs/libgdal.so: undefined reference to `freexl_close'
/home/martin/src/gdal_trunk/.libs/libgdal.so: undefined reference to `freexl_get_info'
/home/martin/src/gdal_trunk/.libs/libgdal.so: undefined reference to `freexl_worksheet_dimensions'
/home/martin/src/gdal_trunk/.libs/libgdal.so: undefined reference to `freexl_get_cell_value'
/home/martin/src/gdal_trunk/.libs/libgdal.so: undefined reference to `freexl_get_worksheet_name'
/home/martin/src/gdal_trunk/.libs/libgdal.so: undefined reference to `freexl_open_info'
/home/martin/src/gdal_trunk/.libs/libgdal.so: undefined reference to `freexl_select_active_worksheet'
/home/martin/src/gdal_trunk/.libs/libgdal.so: undefined reference to `freexl_open'
collect2: ld returned 1 exit status

comment:3 by Even Rouault, 12 years ago

I pushed "r23451 /trunk/gdal/ (configure configure.in): Make ./configure detect FreeXL in standard directories", but I don't think it will really explain your issue.

Could you give more details on :

  • the version of FreeXL
  • where it is installed
  • and config.log would perhaps also help

What is really weird is that the driver is compiled, but that there's no -lfreexl in the linking line.

I'd suggest you to do a full rebuild cycle : "make clean", "./configure [all-stuff-needed]", "make"

comment:4 by Even Rouault, 12 years ago

r23452 /trunk/gdal/ (configure configure.in): Test that FreeXL >= 1.0

in reply to:  3 comment:5 by martinl, 12 years ago

Resolution: fixed
Status: reopenedclosed

Replying to rouault:

I pushed "r23451 /trunk/gdal/ (configure configure.in): Make ./configure detect FreeXL in standard directories", but I don't think it will really explain your issue.

FreeXL libs installed in /usr/local, your patch seems to solved this issue

cat GDALmake.opt | grep lfreexl
LIBS    =       $(SDE_LIB) -lfreexl -L/usr/local/lib -lgeos_c -lodbc -lodbcinst -lexpat -ljasper -ljpeg -lpng -L/usr/lib -lpq -lz -lpthread -lm -lrt -ldl  -L/usr/local/lib -lspatialite $(KAK_LIBS) $(DWG_LIBS) $(CURL_LIB) \

Thanks. ML

Note: See TracTickets for help on using tickets.