If the program is linked to Spatialite, the following error occurs:
Lt-demo2:geos_ts_c.cpp:3657intint intdouble): Assertion '0 ! = cs' failed. [1] 15401 Abort (core dumped) ./demo2
In all likelihood, because Spatialite relies on the library geos multithreading problems, I encountered the situation is GEOS 3.5.0 + spatialite 4.3.0a. The solution is to download the source code for Spatialite 4.4.0-RC1 to recompile with the following command:
./configure--prefix=/usr--enable-libxml2 cppflags="$CPPFLAGS-dgeos_use_only_r_api"
Because GEOS library almost all functions have two versions: non-thread-safe (without ' _r ', older) and thread-safe (with ' _r ') versions. The new Spatialite (4.4.0-RC1) compilation must also be added cppflags= "$CPPFLAGS-dgeos_use_only_r_api" option to invoke a thread-safe version.
The problem I encountered in MacOS homebrew and the official source installation version of ArchLinux, is a deep buried thunder. It is written here hoping to help the latter.
ref:https://groups.google.com/forum/?hl=en&fromgroups=#!topic/spatialite-users/9-32tvq-720
Spatialie Run Error resolution