Subject: | Compilation error on some systems |
E.g. on Fedora 28 compilation fails like this:
...
cc -c -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xc++ -std=c++11 -Isqlite_thread -O2 -DVERSION=\"0.001\" -DXS_VERSION=\"0.001\" -fPIC "-I/opt/perl-5.28.1/lib/5.28.1/x86_64-linux/CORE" SQLite.c
In file included from SQLite.xs:11:
ppport.h:4594: warning: "WIDEST_UTYPE" redefined
# define WIDEST_UTYPE U64TYPE
In file included from /opt/perl-5.28.1/lib/5.28.1/x86_64-linux/CORE/perl.h:2465,
from SQLite.xs:7:
/opt/perl-5.28.1/lib/5.28.1/x86_64-linux/CORE/handy.h:1064: note: this is the location of the previous definition
# define WIDEST_UTYPE U64
In file included from sqlite_thread/sqlite_dbh.h:4,
from sqlite_thread/sqlite_thread.h:3,
from SQLite.xs:17:
sqlite_thread/sqlite_queue.h:8:25: error: âfunctionâ in namespace âstdâ does not name a template type
using item_type = std::function<void()>;
^~~~~~~~
sqlite_thread/sqlite_queue.h:8:20: note: âstd::functionâ is defined in header â<functional>â; did you forget to â#include <functional>â?
sqlite_thread/sqlite_queue.h:5:1:
+#include <functional>
sqlite_thread/sqlite_queue.h:8:20:
using item_type = std::function<void()>;
^~~
sqlite_thread/sqlite_queue.h:12:12: error: âitem_typeâ has not been declared
void push(item_type &&req);
^~~~~~~~~
sqlite_thread/sqlite_queue.h:15:13: error: âitem_typeâ was not declared in this scope
std::queue<item_type> pending_;
^~~~~~~~~
sqlite_thread/sqlite_queue.h:15:13: note: suggested alternative: âisfdtypeâ
std::queue<item_type> pending_;
^~~~~~~~~
isfdtype
sqlite_thread/sqlite_queue.h:15:22: error: template argument 1 is invalid
std::queue<item_type> pending_;
^
sqlite_thread/sqlite_queue.h:15:22: error: template argument 2 is invalid
In file included from sqlite_thread/sqlite_thread.h:3,
from SQLite.xs:17:
sqlite_thread/sqlite_dbh.h:25:26: error: âsqlite_queue::item_typeâ has not been declared
void push(sqlite_queue::item_type &&req);
^~~~~~~~~
make: *** [Makefile:335: SQLite.o] Error 1
...