anse1 / sqlsmith

A random SQL query generator
GNU General Public License v3.0
754 stars 128 forks source link

Compilation fails against libpqxx #42

Closed grawlinson closed 2 years ago

grawlinson commented 3 years ago

When compiling from source, make fails around here:

mv -f .deps/prod.Tpo .deps/prod.Po
postgres.cc: In member function ‘virtual void dut_pqxx::test(const string&)’:
postgres.cc:74:10: error: ‘class pqxx::connection’ has no member named ‘activate’
   74 |        c.activate();
      |          ^~~~~~~~
postgres.cc: In constructor ‘schema_pqxx::schema_pqxx(std::string&, bool)’:
postgres.cc:284:5: error: ‘class pqxx::connection’ has no member named ‘disconnect’
  284 |   c.disconnect();
      |     ^~~~~~~~~~
mv -f .deps/dump.Tpo .deps/dump.Po
log.cc: In constructor ‘pqxx_logger::pqxx_logger(std::string, std::string, schema&)’:
log.cc:149:16: error: ‘using work = class pqxx::transaction<>’ {aka ‘class pqxx::transaction<>’} has no member named ‘prepared’; did you mean ‘exec_prepared’?
  149 |   result r = w.prepared("instance")(GITREV)(target)(hostname)(s.version)(seed.str()).exec();
      |                ^~~~~~~~
      |                exec_prepared
log.cc: In member function ‘virtual void pqxx_logger::error(prod&, const dut::failure&)’:
log.cc:172:5: error: ‘using work = class pqxx::transaction<>’ {aka ‘class pqxx::transaction<>’} has no member named ‘prepared’; did you mean ‘exec_prepared’?
  172 |   w.prepared("error")(e.what())(s.str())(e.sqlstate).exec();
      |     ^~~~~~~~
      |     exec_prepared
log.cc: In member function ‘virtual void pqxx_logger::generated(prod&)’:
log.cc:183:7: error: ‘using work = class pqxx::transaction<>’ {aka ‘class pqxx::transaction<>’} has no member named ‘prepared’; did you mean ‘exec_prepared’?
  183 |     w.prepared("stat")(queries)(sum_height/queries)(sum_nodes/queries)(sum_retries/queries)(s.str()).exec();
      |       ^~~~~~~~
      |       exec_prepared
mv -f .deps/impedance.Tpo .deps/impedance.Po
mv -f .deps/schema.Tpo .deps/schema.Po
make[1]: *** [Makefile:453: log.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:453: postgres.o] Error 1

According to libpqxx documentation, some of these function methods no longer exist.

df7cb commented 3 years ago

Which exact libpqxx version are you testing with?

grawlinson commented 3 years ago

Apologies, I should have included that in the original report. I am using 7.6.0.

df7cb commented 2 years ago

This has been fixed in 420af084aa5f1f. Works against libpqxx 7.7 here.