cannot compile since commit 742bcdb2bcbd2ebdd0b1de4921e31214ba72d0d8
Issue and Steps to Reproduce
I'm trying to compile from the master branch, but it seems i can no longer compile from source since commit 742bcdb2bcbd2ebdd0b1de4921e31214ba72d0d8
wallet/db_sqlite3.c: In function 'trace_sqlite3':
wallet/db_sqlite3.c:14:17: error: expected identifier or '(' before '=' token
struct db_stmt = (struct db_stmt*)stmtv;
^
wallet/db_sqlite3.c:15:17: error: passing argument 1 of 'db_changes_add' from incompatible pointer type [-Werror=incompatible-pointer-types]
db_changes_add(stmt, stmt);
^
In file included from wallet/db_sqlite3.c:1:0:
./wallet/db_common.h:145:6: note: expected 'struct db_stmt *' but argument is of type 'const char *'
void db_changes_add(struct db_stmt *db_stmt, const char * expanded);
^
wallet/db_sqlite3.c: In function 'db_sqlite3_exec':
wallet/db_sqlite3.c:89:16: error: 'db' undeclared (first use in this function)
sqlite3_trace(db->sql, trace_sqlite3, stmt);
^
wallet/db_sqlite3.c:89:16: note: each undeclared identifier is reported only once for each function it appears in
cc1: all warnings being treated as errors
<builtin>: recipe for target 'wallet/db_sqlite3.o' failed
make: *** [wallet/db_sqlite3.o] Error 1
Building on ubuntu 16.04.6 LTS
getinfo output
none, cannot compile, so i can't produce getinfo output
I'm having a bit of trouble reproducing this. Which compiler are you using?
For reference I tested with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) and gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Notice that you may need to do a make clean or even make distclean between builds since there may be some stale files that where we're missing a file-dependency in our Makefile target tree.
Cannot also reproduce, gcc 8.2.0, Gentoo Linux.
@cdecker : I started with a fresh clone of the repo this time (i always make clean before compiling), and it didn't compile either... clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final) gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609
same issue here gcc (Ubuntu 8.3.0-6ubuntu1) 8.3.0
wallet/db_sqlite3.c: In function ‘trace_sqlite3’: wallet/db_sqlite3.c:14:17: error: expected identifier or ‘(’ before ‘=’ token struct db_stmt = (struct db_stmt*)stmtv; ^ wallet/db_sqlite3.c:15:17: error: passing argument 1 of ‘db_changes_add’ from incompatible pointer type [-Werror=incompatible-pointer-types] db_changes_add(stmt, stmt); ^ In file included from wallet/db_sqlite3.c:1:0: ./wallet/db_common.h:145:6: note: expected ‘struct db_stmt *’ but argument is of type ‘const char *’ void db_changes_add(struct db_stmt *db_stmt, const char * expanded); ^ wallet/db_sqlite3.c: In function ‘db_sqlite3_exec’: wallet/db_sqlite3.c:89:16: error: ‘db’ undeclared (first use in this function) sqlite3_trace(db->sql, trace_sqlite3, stmt); ^ wallet/db_sqlite3.c:89:16: note: each undeclared identifier is reported only once for each function it appears in cc1: all warnings being treated as errors
: recipe for target 'wallet/db_sqlite3.o' failed make: *** [wallet/db_sqlite3.o] Error 1 rm external/libwally-core/src/secp256k1/libsecp256k1.la