I had the same problem while I'm attempting a build on OSX (10.13.6), having installed all the listed dependencies at https://github.com/stellar/stellar-core/blob/master/INSTALL.md#OSX.
I got the same error as previous post:
./configure: line 17696: syntax error near unexpected token 'libsodium,'
./configure: line 17696: `PKG_CHECK_MODULES(libsodium, libsodium >= 1.0.13, :, libsodium_INTERNAL=yes)'
Commenting out the referenced line of the configure script causes it to get to here:
./configure: line 17728: syntax error near unexpected token 'libsodium,'
./configure: line 17728: ' PKG_CHECK_MODULES(libsodium, libsodium)'
Commenting out that line of the configure script causes it to get to here:
./configure: line 17772: syntax error near unexpected token 'xdrpp,'
./configure: line 17772: ' PKG_CHECK_MODULES(xdrpp, xdrpp)'
Then here:
./configure: line 17847: syntax error near unexpected token 'libmedida,'
./configure: line 17847: 'PKG_CHECK_MODULES(libmedida, libmedida)'
Then:
./configure: line 17876: syntax error near unexpected token 'libpq,'<br>
./configure: line 17876: 'PKG_CHECK_MODULES(libpq, libpq, have_postgres=1)'
Thinking this might be related to the suggestion on Github to get around configure errors by setting PKG_CONFIG_PATH='/usr/local/lib/pkgconfig'
, I tried that as well, but no luck.
In short, configure seems to complain about the syntax every time PKG_CHECK_MODULES
is called. Having commented out all lines referred to above, ./configure
completes successfully, as does make
, make check
, and make install
, and stellar-core
appears to be running properly.
This is less an "answer" than a workaround, but I thought it might be helpful to document these findings.