osmcode / osmcoastline

Extracts coastline data from OpenStreetMap planet file.
https://osmcode.org/osmcoastline/
GNU General Public License v3.0
109 stars 14 forks source link

SQLite unknown driver error when running the runtest.sh #27

Closed gzqlovemxq closed 6 years ago

gzqlovemxq commented 7 years ago

I have build the binary successfully, but encountered the issue when running the runtest.sh.

$ sh runtest.sh Enabled debug option [ 0:00] Using SRS 4326 for output. (Change with the --srs/s option.) [ 0:00] Writing to output database 'testdata.db'. (Was set with the --output-database/-o option.) [ 0:00] Removing database output file (if it exists) (because you told me to with --overwrite/-f). [ 0:00] Will create geometry index. (If you do not want an index use --no-index/-i.) terminate called after throwing an instance of 'gdalcpp::gdal_error' what(): unknown driver: 'SQLite' Aborted (core dumped)

and, I have got the back trace below in the core file:

(gdb) bt

0 0x00007fc84aad15e5 in raise () from /lib64/libc.so.6

1 0x00007fc84aad2dc5 in abort () from /lib64/libc.so.6

2 0x00007fc84b38ba7d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6

3 0x00007fc84b389bd6 in ?? () from /usr/lib64/libstdc++.so.6

4 0x00007fc84b389c03 in std::terminate() () from /usr/lib64/libstdc++.so.6

5 0x00007fc84b389d22 in __cxa_throw () from /usr/lib64/libstdc++.so.6

6 0x0000000000456ac8 in Driver (driver_name="SQLite", this=)

at /opt/github/osmcoastline/include/gdalcpp.hpp:137

7 gdalcpp::Dataset::Dataset (this=0x7ffff2314c30, driver_name="SQLite", dataset_name="testdata.db", srs=..., options=...)

at /opt/github/osmcoastline/include/gdalcpp.hpp:249

8 0x000000000044f91c in OutputDatabase::OutputDatabase (this=0x7ffff2314c20, outdb="testdata.db", srs=..., with_index=)

at /opt/github/osmcoastline/src/output_database.cpp:46

9 0x0000000000421508 in main (argc=, argv=)

at /opt/github/osmcoastline/src/osmcoastline.cpp:179

I can't trace the code of GetGDALDriverManager()->GetDriverByName(driver_name.c_str()), and I am not sure which package I didn't install, which result in this issue.

Thank you!

joto commented 7 years ago

Looks like your GDAL install is missing the sqlite driver. Check your GDAL install and fix that.