Error compiling emptiness

72 views
Skip to first unread message

Franky Romero

unread,
Jul 16, 2019, 4:38:22 PM7/16/19
to Spatial Users
Important: Running on CentOS 7.6

When running a command such as ./bin/spatial HelloSpatial --sim, I get Error compiling emptiness, which doesn't allow the rest of the compilation flow continue. This is after make install was successful.

Franky Romero

unread,
Jul 16, 2019, 4:50:16 PM7/16/19
to Spatial Users
The issue is that (1) ISL is not installed and (2) once it is, pkg-config can't find it. To fix this, emptiness should be compiled manually as follows:
1) Install ISL from source. Be sure to run make install.
2) Point the package manager to the isl.pc file. This should be in /usr/local/lib/pkgconfig (but could vary, so double check what gets outputted by ISL's make install). Run export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig followed by pkg-config --cflags --libs isl. Copy what it outputs.
3) Inside of spatial/poly/resources, run gcc -xc -o ${HOME}/bin/emptiness <output of pkg-config> emptiness.c. In my case, this was gcc -xc -o ${HOME}/bin/emptiness -I/usr/local/include -L/usr/local/lib -lisl -lgmp emptiness.c. After this, the binary should be in ${HOME}/bin/.
4) Add the library path outputted by ISL's make install to LD_LIBRARY_PATH. For me, this was: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib. You will need to have this in your path every time you want Spatial to call emptiness, so consider adding it to your ~/.bashrc.

At this point, the emptiness binary should execute without any problems, and you should be able to successfully run stuff like ./bin/spatial HelloSpatial --sim.
Reply all
Reply to author
Forward
0 new messages