[MDEV-18715] error: cannot convert 'std::nullptr_t' to 'timer_t {aka int}' in assignment Created: 2019-02-24  Updated: 2019-03-28  Resolved: 2019-03-28

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Storage Engine - RocksDB
Affects Version/s: 10.3.13
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Michal Nowak Assignee: Sergei Petrunia
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

OpenIndiana 2018.10 (illumos kernel). 32-bit build.



 Description   

32-bit compilation on OpenIndiana fails with:

{{[ 61%] Building CXX object storage/perfschema/CMakeFiles/perfschema_embedded.dir/pfs.cc.o
In file included from /export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/./ha_rocksdb.h:55:0,
from /export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/rdb_cf_options.cc:36:
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_io_watchdog.h: In member function 'int myrocks::Rdb_io_watchdog::stop_timers()':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_io_watchdog.h:63:37: error: cannot convert 'std::nullptr_t' to 'timer_t

{aka int}' in assignment
m_io_check_watchdog_timer = nullptr;
^~~~~~~
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_io_watchdog.h:71:28: error: cannot convert 'std::nullptr_t' to 'timer_t {aka int}

' in assignment
m_io_check_timer = nullptr;
^~~~~~~
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_io_watchdog.h: In constructor 'myrocks::Rdb_io_watchdog::Rdb_io_watchdog(const std::vector<std::__cxx11::basic_string<char> >&)':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_io_watchdog.h:98:22: error: cannot convert 'std::nullptr_t' to 'timer_t

{aka int}' in initialization
m_buf(nullptr) {
^
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_io_watchdog.h:98:22: error: cannot convert 'std::nullptr_t' to 'timer_t {aka int}

' in initialization
In file included from /export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/./ha_rocksdb.h:475:0,
from /export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/rdb_cf_options.cc:36:
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h: In function 'void myrocks::rdb_netstr_append_uint64(String*, const uint64&)':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h:56:31: error: 'htobe64' was not declared in this scope
uint64 net_val = htobe64(val);
^
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h: In function 'void myrocks::rdb_netstr_append_uint32(String*, const uint32&)':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h:66:31: error: 'htobe32' was not declared in this scope
uint32 net_val = htobe32(val);
^
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h: In function 'void myrocks::rdb_netstr_append_uint16(String*, const uint16&)':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h:76:31: error: 'htobe16' was not declared in this scope
uint16 net_val = htobe16(val);
^
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h: In function 'void myrocks::rdb_netbuf_store_uint64(uchar*, const uint64&)':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h:89:29: error: 'htobe64' was not declared in this scope
uint64 net_val = htobe64;
^
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h: In function 'void myrocks::rdb_netbuf_store_uint32(uchar*, const uint32&)':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h:98:29: error: 'htobe32' was not declared in this scope
uint32 net_val = htobe32;
^
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h: In function 'void myrocks::rdb_netbuf_store_uint16(uchar*, const uint16&)':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h:107:29: error: 'htobe16' was not declared in this scope
uint16 net_val = htobe16;
^
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h: In function 'uint64 myrocks::rdb_netbuf_to_uint64(const uchar*)':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h:137:25: error: 'be64toh' was not declared in this scope
return be64toh(net_val);
^
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h: In function 'uint32 myrocks::rdb_netbuf_to_uint32(const uchar*)':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h:148:25: error: 'be32toh' was not declared in this scope
return be32toh(net_val);
^
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h: In function 'uint16 myrocks::rdb_netbuf_to_uint16(const uchar*)':
/export/home/newman/ws/oi-userland/components/database/mariadb-103/mariadb-10.3.13/storage/rocksdb/././rdb_buff.h:159:25: error: 'be16toh' was not declared in this scope
return be16toh(net_val);
^
make[3]: *** [storage/rockdb/CMakeFiles/rocksdb_aux_lib.dir/build.make:63: storage/rocksdb/CMakeFiles/rocksdb_aux_lib.dir/rdb_cf_options.cc.o] Error 1
make[3]: Leaving directory '/export/home/newman/ws/oi-userland/components/database/mariadb-103/build/i86'
make[2]: *** [CMakeFiles/Makefile2:6870: storage/rocksdb/CMakeFiles/rocksdb_aux_lib.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
}}

Build was fine with 10.3.12.



 Comments   
Comment by Elena Stepanova [ 2019-02-24 ]

According to the documentation, RocksDB is only [guaranteed to be] built on 64-bit.
Still, assigning to psergey to take a look.

Comment by Michal Nowak [ 2019-02-26 ]

It went away after I cleaned-up my build environment. Now it compiles cleanly. Thank you!

Comment by Sergei Petrunia [ 2019-03-28 ]

Closing as the issue doesn't seem to exist

Generated at Thu Feb 08 08:46:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.