[gdal-dev] How to run autotest

John Daniel jdaniel at etresoft.com
Wed Apr 17 20:30:36 PDT 2019


Sorry for the duplicate message. I'm not sure what e-mail account I had used for this list.

I am seeing something very similar. Judging from your /scratch/SDK paths, it looks like you have a similar setup to what I am attempting. 

Primarily I am trying to build on the Mac. I can run tests on the Mac, but a few of them fail deep inside SQLite:
0   ???                           	000000000000000000 0 + 0
1   libsqlite3.dylib              	0x00007fff67465441 dbMallocRawFinish + 17
2   libsqlite3.dylib              	0x00007fff6737f666 sqlite3FindFunction + 886
3   libsqlite3.dylib              	0x00007fff6737fb23 sqlite3CreateFunc + 499
4   libsqlite3.dylib              	0x00007fff673807c8 sqlite3_create_function_v2 + 488
5   libspatialite.7.dylib         	0x000000010e3a82d0 register_spatialite_sql_functions + 96
6   libspatialite.7.dylib         	0x000000010e3f469e spatialite_init_ex + 110
7   libgdal.20.dylib              	0x000000010ba9a312 OGRSQLiteBaseDataSource::InitNewSpatialite() + 194

So, I ran my build scripts on Linux to see how it would work there. On Linux, I get something very similar to what you have:

pytest
ImportError while loading conftest '/home/parallels/OS-GIS/sources/GDAL/gdaltest/autotest/conftest.py'.
../../../../build/python/lib/python2.7/site-packages/six.py:709: in exec_
   exec("""exec _code_ in _globs_, _locs_""")
/Users/jdaniel/Programming/OS-GIS/sources/GDAL/gdaltest/autotest/conftest.py:9: in <module>
   ???
../../../../build/python/lib/python2.7/site-packages/six.py:709: in exec_
   exec("""exec _code_ in _globs_, _locs_""")
../../../../platforms/linux/x86_64/gdal/lib/python2.7/site-packages/gdal.py:2: in <module>
   from osgeo.gdal import deprecation_warn
../../../../platforms/linux/x86_64/gdal/lib/python2.7/site-packages/osgeo/__init__.py:21: in <module>
   _gdal = swig_import_helper()
../../../../platforms/linux/x86_64/gdal/lib/python2.7/site-packages/osgeo/__init__.py:17: in swig_import_helper
   _mod = imp.load_module('_gdal', fp, pathname, description)
E   ImportError: /home/parallels/OS-GIS/platforms/linux/x86_64/gdal/lib/python2.7/site-packages/osgeo/_gdal.so: undefined symbol: CPLGetErrorCounter

I also have my own Python build. 

I am just now getting back to my GDAL work after a couple of years. I have run, and successfully tested, these build scripts with an earlier version of GDAL and supporting libraries. I think I will go back to that previous setup and double-check. I have some new code I would like to contribute this year. I have a replacement for GEOS that I plan to use to avoid GPL restrictions. But I'm going to need those test scripts for that.

John Daniel
Etresoft, Inc.

> On Apr 9, 2019, at 11:33 AM, Fengting Chen <fengting.chen at oracle.com> wrote:
> 
> gdalinfo and gdal_translate are working fine. just pytest failed with the same error.
> 
> Here is my configure:
> 
> ./configure --prefix=${PREFIX} \
>  --without-libtool \
>  --disable-rpath \
>  --with-libz=internal \
>  --with-png=internal \
>  --with-libtiff=internal \
>  --with-geotiff=internal \
>  --with-jpeg=internal \
>  --with-gif=internal \
>  --without-pg \
>  --without-sqlite3 \
>  --without-expat \
>  --without-odbc \
>  --with-curl=/usr/bin/curl-config \
>  --without-perl \
>  --without-pcre \
>  --with-hdfs=no \
>  --with-python=/scratch/SDK/Python-2.7.5/dist/bin/python \
>  --with-proj=/scratch/SDK/proj-6.0.0/dist
> 
> After that:
> 
> make clean
> make -j8 -s
> cd apps; make -s test_ogrsf; cd ..
> 
> -Fengting
> 
> On 4/9/2019 4:22 AM, Even Rouault wrote:
>> On lundi 8 avril 2019 17:20:45 CEST Fengting Chen wrote:
>>> I rebuilt GDAl with python bindings without errors. Now I got a
>>> different error:
>>> 
>>> ImportError while loading conftest
>>> '/scratch/gdal/gdal/autotest/conftest.py'.
>>> /home/fechen/.local/lib/python2.7/site-packages/six.py:709: in exec_
>>>     exec("""exec _code_ in _globs_, _locs_""")
>>> conftest.py:9: in <module>
>>>     from osgeo import gdal
>>> ../gdal/swig/python/build/lib.linux-x86_64-2.7/osgeo/__init__.py:21: in
>>> <module>
>>>     _gdal = swig_import_helper()
>>> ../gdal/swig/python/build/lib.linux-x86_64-2.7/osgeo/__init__.py:17: in
>>> swig_import_helper
>>>     _mod = imp.load_module('_gdal', fp, pathname, description)
>>> E   ImportError: /scratch/gdal/gdal/gdal/.libs/libgdal.so.20: undefined
>>> symbol: _Z17CPLHaveRuntimeAVXv
>>> 
>>> Any idea why  libgdal.so.20 has undefined symbol?
>> First time I see this error
>> Do you get this also when using gdalinfo, gdal_translate, etc ?
>> If so, consider doing a clean build. It might be that you have attempted
>> several builds of GDAL with different options after ./configure
>> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list