Details
- 
    
Bug
 - 
    Status: Closed (View Workflow)
 - 
    
Critical
 - 
    Resolution: Fixed
 - 
    10.2.9
 - 
    None
 - 
    FreeBSD 11.0-RELEASE-p6
Clang 3.8
cmake 3.9.2 
- 
        10.2.10
 
Description
While building RocksDB I get a fatal compilation error
					/usr/bin/c++ -DHAVE_CONFIG_H -DLZ4 -DMYSQL_DYNAMIC_PLUGIN -DOS_FREEBSD -DROCKSDB_JEMALLOC -DROCKSDB_LIB_IO_POSIX -DROCKSDB_MALLOC_USABLE_SIZE -DROCKSDB_PLATFORM_POSIX -DROCKSDB_SUPPORT_THREAD_LOCAL -DSNAPPY -DZLIB -DZSTD -Drocksdb_EXPORTS -Iinclude -Isql -Ipcre -Istorage/rocksdb/rocksdb -Istorage/rocksdb/rocksdb/include -isystem storage/rocksdb/rocksdb/third-party/gtest-1.7.0/fused-src -Istorage/rocksdb/rocksdb/util -I/usr/include -I/usr/local/include -O2 -pipe -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -DWITH_INNODB_DISALLOW_WRITES -fno-rtti -DDBUG_OFF -fPIC -std=c++11 -MD -MT storage/rocksdb/CMakeFiles/rocksdb.dir/rdb_datadic.cc.o -MF storage/rocksdb/CMakeFiles/rocksdb.dir/rdb_datadic.cc.o.d -o storage/rocksdb/CMakeFiles/rocksdb.dir/rdb_datadic.cc.o -c storage/rocksdb/rdb_datadic.cc
			 | 
		
					In file included from storage/rocksdb/rdb_datadic.cc:26:
			 | 
		
					In file included from storage/rocksdb/./rdb_datadic.h:35:
			 | 
		
					storage/rocksdb/./ha_rocksdb.h:1066:3: warning: declaration does not declare anything [-Wmissing-declarations]
			 | 
		
					  MY_ATTRIBUTE((__nonnull__, __warn_unused_result__));
			 | 
		
					  ^
			 | 
		
					storage/rocksdb/rdb_mariadb_port.h:18:27: note: expanded from macro 'MY_ATTRIBUTE'
			 | 
		
					#  define MY_ATTRIBUTE(A) __attribute__(A)
			 | 
		
					                          ^
			 | 
		
					In file included from storage/rocksdb/rdb_datadic.cc:26:
			 | 
		
					In file included from storage/rocksdb/./rdb_datadic.h:36:
			 | 
		
					storage/rocksdb/./properties_collector.h:84:27: warning: 'AddUserKey' overrides a member function but is not marked 'override'
			 | 
		
					      [-Winconsistent-missing-override]
			 | 
		
					  virtual rocksdb::Status AddUserKey(const rocksdb::Slice &key,
			 | 
		
					                          ^
			 | 
		
					storage/rocksdb/rocksdb/include/rocksdb/table_properties.h:89:18: note: overridden virtual function is here
			 | 
		
					  virtual Status AddUserKey(const Slice& key, const Slice& value,
			 | 
		
					                 ^
			 | 
		
					storage/rocksdb/rdb_datadic.cc:371:19: error: no member named 'strtoul' in namespace 'std'; did you mean simply 'strtoul'?
			 | 
		
					  *ttl_duration = std::strtoull(ttl_duration_str.c_str(), nullptr, 0);
			 | 
		
					                  ^~~~~
			 | 
		
					/usr/include/stdlib.h:113:3: note: 'strtoul' declared here
			 | 
		
					         strtoul(const char * __restrict, char ** __restrict, int);
			 | 
		
					         ^
			 | 
		
					2 warnings and 1 error generated.
			 | 
		
Adding `#include <cstdlib>` to `storage/rocksdb/rdb_datadic.h` solves the issue on FreeBSD 11.0. Not sure if this should be enclosed in a #ifdef _FreeBSD_ block
Attachments
Issue Links
- is duplicated by
 - 
                    
MDEV-13945 RocksDB fails to build on macOS (llvm?)
-         
 - Closed
 
 -         
 
- relates to
 - 
                    
MDEV-13945 RocksDB fails to build on macOS (llvm?)
-         
 - Closed
 
 -