Error when trying to compile 3.0.10

Bertalan Voros bertalan.voros at gmail.com
Thu Dec 10 15:59:47 CET 2015


Hi Alan,

This is what I have on the machine:
rc  libsqlite0                          2.8.17-10ubuntu2
amd64        SQLite shared library
ii  libsqlite3-0:amd64                  3.8.2-1ubuntu2.1
amd64        SQLite 3 shared library
ii  libsqlite3-dev:amd64                3.8.2-1ubuntu2.1
amd64        SQLite 3 development files

and the all the errors:
CC src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:51:1: error:
expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
 typedef struct rlm_sql_sqlite_conn {
 ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘_sql_socket_destructor’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:503:10: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  if (conn->db) {
          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:504:30: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
   status = sqlite3_close(conn->db);
                              ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_socket_init’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:538:51: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  status = sqlite3_open_v2(driver->filename, &(conn->db),
SQLITE_OPEN_READWRITE | SQLITE_OPEN_NOMUTEX, NULL);
                                                   ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:543:11: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  if (!conn->db || (sql_check_error(conn->db, status) != RLM_SQL_OK)) {
           ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:543:40: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  if (!conn->db || (sql_check_error(conn->db, status) != RLM_SQL_OK)) {
                                        ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:544:23: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
   sql_print_error(conn->db, status, "Error opening SQLite database
\"%s\"", driver->filename);

src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:547:36: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  status = sqlite3_busy_timeout(conn->db, driver->busy_timeout);
                                    ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:548:26: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  if (sql_check_error(conn->db, status) != RLM_SQL_OK) {
                          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:549:23: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
   sql_print_error(conn->db, status, "Error setting busy timeout");
                       ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:557:45: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  status = sqlite3_extended_result_codes(conn->db, 1);
                                             ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:558:26: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  if (sql_check_error(conn->db, status) != RLM_SQL_OK) {
                          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:559:23: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
   sql_print_error(conn->db, status, "Error enabling extended result
codes");
                       ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:565:42: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  status = sqlite3_create_function_v2(conn->db, "GREATEST", -1, SQLITE_ANY,
NULL,
                                          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:571:26: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  if (sql_check_error(conn->db, status) != RLM_SQL_OK) {
                          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:572:23: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
   sql_print_error(conn->db, status, "Failed registering 'GREATEST' sql
function");
                       ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_select_query’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:586:34: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  status = sqlite3_prepare_v2(conn->db, query, strlen(query),
&conn->statement, &z_tail);
                                  ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:586:67: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
  status = sqlite3_prepare_v2(conn->db, query, strlen(query),
&conn->statement, &z_tail);
                                                                   ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:591:6: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘col_count’
  conn->col_count = 0;
      ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:593:29: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  return sql_check_error(conn->db, status);

src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_query’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:606:34: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  status = sqlite3_prepare_v2(conn->db, query, strlen(query),
&conn->statement, &z_tail);
                                  ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:606:67: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
  status = sqlite3_prepare_v2(conn->db, query, strlen(query),
&conn->statement, &z_tail);
                                                                   ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:610:30: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  rcode = sql_check_error(conn->db, status);
                              ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:613:28: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
  status = sqlite3_step(conn->statement);
                            ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:614:29: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  return sql_check_error(conn->db, status);
                             ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_num_fields’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:621:10: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
  if (conn->statement) {
          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:622:35: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
   return sqlite3_column_count(conn->statement);
                                   ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_num_rows’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:632:10: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
  if (conn->statement) {
          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:633:33: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
   return sqlite3_data_count(conn->statement);
                                 ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_fields’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:646:36: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
  fields = sqlite3_column_count(conn->statement);
                                    ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:651:66: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
  for (i = 0; i < fields; i++) names[i] =
sqlite3_column_name(conn->statement, i);
                                                                  ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_fetch_row’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:669:28: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
  status = sqlite3_step(conn->statement);
                            ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:674:26: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  if (sql_check_error(conn->db, status) != RLM_SQL_OK) return RLM_SQL_ERROR;
                          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:687:10: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘col_count’
  if (conn->col_count == 0) {
          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:688:7: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘col_count’
   conn->col_count = sql_num_fields(handle, config);
       ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:689:11: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘col_count’
   if (conn->col_count == 0) return RLM_SQL_ERROR;
           ^
In file included from
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:27:0:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:697:70: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘col_count’
  MEM(row = handle->row = talloc_zero_array(handle->conn, char *,
conn->col_count + 1));
                                                                      ^
/home/admin/freeradius-server-3.0.10/src/freeradius-devel/radiusd.h:389:22:
note: in definition of macro ‘MEM’
 #define MEM(x) if (!(x)) { ERROR("%s[%u] OUT OF MEMORY", __FILE__,
__LINE__); _fr_exit_now(__FILE__, __LINE__, 1); }
                      ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:699:22: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘col_count’
  for (i = 0; i < conn->col_count; i++) {
                      ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:700:35: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
   switch (sqlite3_column_type(conn->statement, i)) {
                                   ^
In file included from
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:27:0:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:702:73: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
    MEM(row[i] = talloc_typed_asprintf(row, "%d",
sqlite3_column_int(conn->statement, i)));
                                                                         ^
/home/admin/freeradius-server-3.0.10/src/freeradius-devel/radiusd.h:389:22:
note: in definition of macro ‘MEM’
 #define MEM(x) if (!(x)) { ERROR("%s[%u] OUT OF MEMORY", __FILE__,
__LINE__); _fr_exit_now(__FILE__, __LINE__, 1); }
                      ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:706:76: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
    MEM(row[i] = talloc_typed_asprintf(row, "%f",
sqlite3_column_double(conn->statement, i)));

^
/home/admin/freeradius-server-3.0.10/src/freeradius-devel/radiusd.h:389:22:
note: in definition of macro ‘MEM’
 #define MEM(x) if (!(x)) { ERROR("%s[%u] OUT OF MEMORY", __FILE__,
__LINE__); _fr_exit_now(__FILE__, __LINE__, 1); }
                      ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:712:47: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
    p = (char const *) sqlite3_column_text(conn->statement, i);
                                               ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:723:32: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
    p = sqlite3_column_blob(conn->statement, i);
                                ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:725:36: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
     len = sqlite3_column_bytes(conn->statement, i);
                                    ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_free_result’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:745:10: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
  if (conn->statement) {
          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:748:31: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
   (void) sqlite3_finalize(conn->statement);
                               ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:749:7: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘statement’
   conn->statement = NULL;
       ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:750:7: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘col_count’
   conn->col_count = 0;
       ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_error’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:782:29: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  error = sqlite3_errmsg(conn->db);
                             ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_affected_rows’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:801:10: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
  if (conn->db) {
          ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:802:30: error:
‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
   return sqlite3_changes(conn->db);
                              ^
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_select_query’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:594:1: warning:
control reaches end of non-void function [-Wreturn-type]
 }
 ^

src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c: In function
‘sql_query’:
src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:615:1: warning:
control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: ***
[build/objs/src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.lo]
Error 1



On Thu, 10 Dec 2015 at 13:52 Alan DeKok <aland at deployingradius.com> wrote:

> On Dec 10, 2015, at 7:09 AM, Bertalan Voros <bertalan.voros at gmail.com>
> wrote:
> > Then getting errors at the sqlite bit:
> > src/modules/rlm_sql/drivers/rlm_sql_sqlite/rlm_sql_sqlite.c:802:30:
> error:
> > ‘rlm_sql_sqlite_conn_t’ has no member named ‘db’
> >   return sqlite3_changes(conn->db);
> >                              ^
>
>   That's... weird.  Because the definition of rlm_sql_sqlite_conn_t is *in
> that file*.  And it has an entry "db".
>
>   The only reason it *might not* have that entry is if there's no
> 'sqlite3' data structure defined.
>
>   i.e. you're building on a system without sqlite3 development headers.
> And the errors you posted here are only a small portion of the errors.  An
> earlier error says something like "no such thing sqlite3".
>
>   Please post ALL of the errors from compiling rlm_sql_sqlite.c.
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list