1

In order to get stellar-core running on ClearOS7 (binary compatible with Centos7), I have had to use postgresql from one of the SCLo repos (Special interest groups) as the normal Centos version of postgresql is 9.2 and stellar-core requires >= 9.5. I also had to use the SCLo llvm-toolset-7.

Having installed rh-postgresql12, I can compile with:

export libpq_CFLAGS=/opt/rh/rh-postgresql12/root/usr/lib64/libpq.so.rh-postgresql12-5
export libpq_LIBS=/opt/rh/rh-postgresql12/root/usr/lib64/libpq.so.rh-postgresql12-5
scl enable llvm-toolset-7 ./autogen.sh
scl enable llvm-toolset-7 ./configure
scl enable rh-postgresql12 'scl enable llvm-toolset-7 make'

I am running using an sqlite3 database. This should OK but now if I try to run anything I have to do commands like scl enable rh-postgresql12 'stellar-core --conf /etc/stellar/stellar.cfg new-hist local' otherwise I get errors like:

[root@proxmox107 stellar-core]# /usr/local/bin/stellar-core --conf /etc/stellar/stellar.cfg new-db
/usr/local/bin/stellar-core: error while loading shared libraries: libpq.so.rh-postgresql12-5: cannot open shared object file: No such file or directory

Why is it even trying to use libpq.so.rh-postgresql12-5 when I am using an sqlite3 database?

I can get round the issue either by prefixing every command with scl enable rh-postgresql12 or by compiling with the stock postgresql (9.2) installed at the same time and changing the export lines to:

export libpq_CFLAGS=/usr/lib64/libpq.so
export libpq_LIBS=/usr/lib64/libpq.so

But this seems odd to require both postgresql-9.2 and postgresql-12 just for this.

I you would like to leave support for postgresql compiled into stellar-core so I could revert to it if I wanted to, but if I can't, how do I compile removing postgresql support completely?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.