Opened 6 years ago

Closed 6 years ago

#3532 closed defect (fixed)

PgSqlLeaseMgr does not build on i686

Reported by: jpopelka Owned by: tomek
Priority: medium Milestone: Kea0.9
Component: dhcp Version: 0.9 beta1
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

Building of 0.9beta1 with --with-dhcp-pgsql fails with:

pgsql_lease_mgr.cc: In member function 'isc::dhcp::Lease4Ptr isc::dhcp::PgSqlLease4Exchange::convertFromDatabase(PGresult*&, int)':
pgsql_lease_mgr.cc:667:68: error: no matching function for call to 'isc::dhcp::PgSqlLease4Exchange::convertFromBytea(PGresult*&, int&, const size_t&, uint8_t [20], unsigned int, long unsigned int&)'
                              sizeof(hwaddr_buffer_), hwaddr_length_);
                                                                    ^
pgsql_lease_mgr.cc:667:68: note: candidate is:
pgsql_lease_mgr.cc:476:10: note: void isc::dhcp::PgSqlLeaseExchange::convertFromBytea(PGresult*&, int, size_t, uint8_t*, size_t, size_t&)
     void convertFromBytea(PGresult*& r, const int row, const size_t col,
          ^
pgsql_lease_mgr.cc:476:10: note:   no known conversion for argument 6 from 'long unsigned int' to 'size_t& {aka unsigned int&}'
pgsql_lease_mgr.cc:670:74: error: no matching function for call to 'isc::dhcp::PgSqlLease4Exchange::convertFromBytea(PGresult*&, int&, const size_t&, uint8_t [128], unsigned int, long unsigned int&)'
                              sizeof(client_id_buffer_), client_id_length_);
                                                                          ^
pgsql_lease_mgr.cc:670:74: note: candidate is:
pgsql_lease_mgr.cc:476:10: note: void isc::dhcp::PgSqlLeaseExchange::convertFromBytea(PGresult*&, int, size_t, uint8_t*, size_t, size_t&)
     void convertFromBytea(PGresult*& r, const int row, const size_t col,
          ^
pgsql_lease_mgr.cc:476:10: note:   no known conversion for argument 6 from 'long unsigned int' to 'size_t& {aka unsigned int&}'
pgsql_lease_mgr.cc: In member function 'isc::dhcp::Lease6Ptr isc::dhcp::PgSqlLease6Exchange::convertFromDatabase(PGresult*&, int)':
pgsql_lease_mgr.cc:843:64: error: no matching function for call to 'isc::dhcp::PgSqlLease6Exchange::convertFromBytea(PGresult*&, int&, const int&, uint8_t [128], unsigned int, long unsigned int&)'
                              sizeof(duid_buffer_), duid_length_);
                                                                ^
pgsql_lease_mgr.cc:843:64: note: candidate is:
pgsql_lease_mgr.cc:476:10: note: void isc::dhcp::PgSqlLeaseExchange::convertFromBytea(PGresult*&, int, size_t, uint8_t*, size_t, size_t&)
     void convertFromBytea(PGresult*& r, const int row, const size_t col,
          ^
pgsql_lease_mgr.cc:476:10: note:   no known conversion for argument 6 from 'long unsigned int' to 'size_t& {aka unsigned int&}'

There's also a build.log at the moment, but it'll be garbage-collected later.

I don't understand why the compiler thinks size_t is defined as unsigned int, I think it's defined as long unsigned int. Anyway the attached patch fixes the problem for me.

I see similar structes in MySqlLeaseMgr?, but that builds OK so I wasn't touching that.

Subtickets

Attachments (1)

0001-Fix-building-of-PgSqlLeaseMgr-on-i686.patch (3.7 KB) - added by jpopelka 6 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 6 years ago by tomek

  • Milestone changed from Kea-proposed to Kea0.9

Thanks for reporting and sending a patch!

comment:2 Changed 6 years ago by tomek

  • Owner set to tomek
  • Status changed from new to assigned

Thanks for reporting this issue and sending a patch! Merged to master. This will be included in upcoming 0.9 release. Closing ticket.

comment:3 Changed 6 years ago by tomek

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.