Dear libzdb users ;)
trying to compile libzdb 3.2 on an opensuse 15.1 box via
./configure --prefix=/usr --libdir=/usr/lib64 --without-postgresql --without-sqlite
make then throws an error, see below ...
how can I fix this?
thanks & greetings Becki
cx20:~/software/libzdb/libzdb-3.2 # make make all-recursive make[1]: Entering directory '/root/software/libzdb/libzdb-3.2' Making all in . make[2]: Entering directory '/root/software/libzdb/libzdb-3.2' make[2]: Nothing to be done for 'all-am'. make[2]: Leaving directory '/root/software/libzdb/libzdb-3.2' Making all in test make[2]: Entering directory '/root/software/libzdb/libzdb-3.2/test' g++ -DHAVE_CONFIG_H -I/usr/include/mysql -I/usr/include/mysql/mariadb -I../zdb -std=c++17 -g -O2 -c -o zdbpp-zdbpp.o `test -f 'zdbpp.cpp' || echo './'`zdbpp.cpp zdbpp.cpp: In function ‘void testQuery(zdb::ConnectionPool&)’: zdbpp.cpp:60:9: error: ‘assert’ was not declared in this scope assert(result.columnCount() == 4); ^~~~~~ zdbpp.cpp:60:9: note: suggested alternative: ‘qsort’ assert(result.columnCount() == 4); ^~~~~~ qsort make[2]: *** [Makefile:445: zdbpp-zdbpp.o] Error 1 make[2]: Leaving directory '/root/software/libzdb/libzdb-3.2/test' make[1]: *** [Makefile:758: all-recursive] Error 1 make[1]: Leaving directory '/root/software/libzdb/libzdb-3.2' make: *** [Makefile:503: all] Error 2
On Tue 18/Feb/2020 12:17:09 +0100 Admin Beckspaced wrote:
Dear libzdb users
trying to compile libzdb 3.2 on an opensuse 15.1 box via
./configure --prefix=/usr --libdir=/usr/lib64 --without-postgresql --without-sqlite
make then throws an error, see below ...
how can I fix this?
you could try and patch test/zdbpp.cpp like so:
--- test/zdbpp.cpp.orig 2020-02-18 13:01:34.739330885 +0100 +++ test/zdbpp.cpp 2020-02-18 13:01:53.307573796 +0100 @@ -5,6 +5,8 @@ #include "zdbpp.h" using namespace zdb; +#include <cassert> + const std::map<std::string, std::string> data { {"Fry", "Ceci n'est pas une pipe"}, {"Leela", "Mona Lisa"},
zdbpp is not going to be installed, it's just a test program for C++.
hth Ale
thanks & greetings Becki
cx20:~/software/libzdb/libzdb-3.2 # make make all-recursive make[1]: Entering directory '/root/software/libzdb/libzdb-3.2' Making all in . make[2]: Entering directory '/root/software/libzdb/libzdb-3.2' make[2]: Nothing to be done for 'all-am'. make[2]: Leaving directory '/root/software/libzdb/libzdb-3.2' Making all in test make[2]: Entering directory '/root/software/libzdb/libzdb-3.2/test' g++ -DHAVE_CONFIG_H -I/usr/include/mysql -I/usr/include/mysql/mariadb -I../zdb -std=c++17 -g -O2 -c -o zdbpp-zdbpp.o `test -f 'zdbpp.cpp' || echo './'`zdbpp.cpp zdbpp.cpp: In function ‘void testQuery(zdb::ConnectionPool&)’: zdbpp.cpp:60:9: error: ‘assert’ was not declared in this scope assert(result.columnCount() == 4); ^~~~~~ zdbpp.cpp:60:9: note: suggested alternative: ‘qsort’ assert(result.columnCount() == 4); ^~~~~~ qsort make[2]: *** [Makefile:445: zdbpp-zdbpp.o] Error 1 make[2]: Leaving directory '/root/software/libzdb/libzdb-3.2/test' make[1]: *** [Makefile:758: all-recursive] Error 1 make[1]: Leaving directory '/root/software/libzdb/libzdb-3.2' make: *** [Makefile:503: all] Error 2
Am 18.02.2020 um 18:19 schrieb Alessandro Vesely:
On Tue 18/Feb/2020 12:17:09 +0100 Admin Beckspaced wrote:
Dear libzdb users
trying to compile libzdb 3.2 on an opensuse 15.1 box via
./configure --prefix=/usr --libdir=/usr/lib64 --without-postgresql --without-sqlite
make then throws an error, see below ...
how can I fix this?
you could try and patch test/zdbpp.cpp like so:
--- test/zdbpp.cpp.orig 2020-02-18 13:01:34.739330885 +0100 +++ test/zdbpp.cpp 2020-02-18 13:01:53.307573796 +0100 @@ -5,6 +5,8 @@ #include "zdbpp.h" using namespace zdb; +#include <cassert>
- const std::map<std::string, std::string> data { {"Fry", "Ceci n'est pas une pipe"}, {"Leela", "Mona Lisa"},
zdbpp is not going to be installed, it's just a test program for C++.
hth Ale
Hello Ale, thanks a lot for your reply and giving advice ;) actually did a bit of googling and came up with a similar patch.
just added
#include "assert.h"
at the top of zdbpp.cpp and then compile & test finished without errors.
thanks again & good to see that this list is active ;)
Greetings Becki