Closed michaelmior closed 6 years ago
I was able to fix configure by adding ax_boost_base.m4
, ax_boost_regex.m4
,ax_cxx_compile_stdcxx_11.m4
, and ax_cxx_compile_stdcxx.m4
to the m4
directory and adding ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
to Makefile.am
. Then when running make
I get the following:
make all-am
make[1]: Entering directory '/home/mmior/apps/sqlsmith'
g++ -std=c++11 -g -O2 -L/usr/lib/x86_64-linux-gnu -o sqlsmith relmodel.o schema.o postgres.o sqlite.o random.o prod.o expr.o grammar.o log.o dump.o impedance.o sqlsmith.o -lpqxx -lboost_regex -lsqlite3
/usr/bin/x86_64-linux-gnu-ld: postgres.o: undefined reference to symbol 'PQexec'
//usr/lib/x86_64-linux-gnu/libpq.so.5: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:429: recipe for target 'sqlsmith' failed
make[1]: *** [sqlsmith] Error 1
make[1]: Leaving directory '/home/mmior/apps/sqlsmith'
Makefile:331: recipe for target 'all' failed
make: *** [all] Error 2
Fwiw, the Debian package Build-Depends on autoconf-archive
:
Build-Depends: autoconf, autoconf-archive, debhelper (>= 9), libboost-regex-dev, libpq-dev, libpqxx-dev
Thanks! Installing autoconf-archive
did solve the majority of my problems. Now I have the following:
checking for libpq-fe.h... yes
checking for the PostgreSQL library linking is working... configure: error: in `/home/mmior/apps/sqlsmith':
configure: error: could not find libpq-fe.h header
See `config.log' for more details
Looking in config.log
shows
configure:4723: checking for the PostgreSQL library linking is working
configure:4749: g++ -o conftest -g -O2 -I/usr/include/postgresql -L/usr/lib/x86_64-linux-gnu conftest.cpp -lpq >&5
conftest.cpp: In function 'int main()':
conftest.cpp:30:21: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
char conninfo="dbname = postgres";
^~~~~~~~~~~~~~~~~~~
conftest.cpp:32:34: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
conn = PQconnectdb(conninfo);
^
In file included from conftest.cpp:24:0:
/usr/include/postgresql/libpq-fe.h:261:16: note: initializing argument 1 of 'PGconn* PQconnectdb(const char*)'
extern PGconn *PQconnectdb(const char *conninfo);
^~~~~~~~~~~
This error is related to this: https://github.com/anse1/sqlsmith/issues/18#issuecomment-378157629
As a temporary workaround, I manually edited the configure script so that this line:
char conninfo="dbname = postgres";
reads like this instead:
char* conninfo="dbname = postgres";
@maahl Yeah, that does the trick :) Thanks for the pointer!
I get the following issue when running
configure
on Ubuntu 18.04. Any assistance appreciated :)