# Linux-gnu version of Surrogate Tool DB

**URL:** <https://forum.cmascenter.org/t/linux-gnu-version-of-surrogate-tool-db/5294>\
**Category:** Spatial Allocator\
**Created:** [October 18, 2024, 1:10am UTC](https://forum.cmascenter.org/t/linux-gnu-version-of-surrogate-tool-db/5294 "2024-10-18T01:10:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tesfamichaelb](https://avatars.discourse-cdn.com/v4/letter/t/48db29/32.png) [@tesfamichaelb](https://forum.cmascenter.org/u/tesfamichaelb)\
**Post date:** [October 18, 2024, 1:10am UTC](https://forum.cmascenter.org/t/linux-gnu-version-of-surrogate-tool-db/5294/1 "2024-10-18T01:10:17Z")

</div>

Hello:  
We are trying to update our state’s surrogate data using ‘Surrogate tool DB’ with the PostgreSQL.  
After clearing some Postgres errors with the help of our server Admin, I am still encountering issues running the tutorial part, starting from ‘load\_shapefile\_reproject\_multi.quickstart.csh’.  
(1) — The message I get from above run is —  
cb\_2017\_us\_county\_500k  
free(): invalid pointer  
Abort (core dumped)  
Finished loading shapefile: /aqstorage/models/Tools/SurrogateToolsDB/data/emiss\_shp2017/Census/cb\_2017\_us\_county\_500k.shp  
NOTICE: index “cb\_2017\_us\_county\_500k\_geom\_900921\_idx” does not exist, skipping  
MultiPolygon  
acs2016\_5yr\_bg  
free(): invalid pointer  
Abort (core dumped)  
Finished loading shapefile: /aqstorage/models/Tools/SurrogateToolsDB/data/emiss\_shp2017/Census/acs2016\_5yr\_bg.shp  
NOTICE: index “acs2016\_5yr\_bg\_geom\_900921\_idx” does not exist, skipping  
MultiPolygon  
— // —  
(2) By ignoring the above ‘Abort (core dumped)’ message, I run ‘generate\_modeling\_grid.sh’  
---- Message is —  
==== Creating public.us12k\_516x444  
ERROR: function st\_makeemptyraster(integer, integer, integer, integer, integer, integer, integer, integer, integer) does not exist  
LINE 4: ST\_AddBand(ST\_MakeEmptyRaster(516, 444, -2952000, -2772000…  
^  
HINT: No function matches the given name and argument types. You might need to add explicit type casts.  
==== Finished creating public.us12k\_516x444  
— // —

(3) Again, I went to run the next step: ‘run\_pg\_srgcreate.quickstart.csh’. It completed the run to seem normally without any error returned, but no result was output. Please see attached messages.

[srg\_12US3.txt](https://forum.cmascenter.org/uploads/short-url/996OwJrwehvq9AovcufcowOAI7X.txt) (3.5 KB)  
[srgcreat\_quickstart.txt](https://forum.cmascenter.org/uploads/short-url/xbTGEiiMzC8gcFMciDQ8EgYYdqU.txt) (4.6 KB)  
[USA\_100\_NOFILL.txt](https://forum.cmascenter.org/uploads/short-url/dvjnSKUXQXPfkhVmdKT76n8Y3u1.txt) (509 Bytes)  
[ldshfl\_quickstart3.txt](https://forum.cmascenter.org/uploads/short-url/1AyZfHJb4bUt1LLF0vCaNCzKGSo.txt) (544 Bytes)

your support, as always, is appreciated!  
Tes

---

<div class="post-metadata">

**Author:** ![cseppan](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@cseppan](https://forum.cmascenter.org/u/cseppan)\
**Post date:** [October 18, 2024, 1:45am UTC](https://forum.cmascenter.org/t/linux-gnu-version-of-surrogate-tool-db/5294/2 "2024-10-18T01:45:46Z")

</div>

You’re running into multiple errors that unfortunately point to issues with your Postgres and PostGIS installation. From web searches, the “free(): invalid pointer” error and subsequent core dump may be due to multiple versions of dependencies installed simultaneously. These errors can’t be ignored as it means the shapefiles haven’t been loaded properly.

Next, the error when generating the modeling grid indicates that the PostGIS raster extension hasn’t been installed for your surrogates database (CREATE EXTENSION postgis\_raster;). Again, this error can’t be ignored because the grid needs to be set up before surrogates can be generated.
