[MDEV-4658] connect storage engine fails to build on *BSD OS's Created: 2013-06-14  Updated: 2013-09-16  Resolved: 2013-09-16

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.3, 10.0.4
Fix Version/s: 10.0.5

Type: Bug Priority: Major
Reporter: Brad Smith Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: connect-engine, netbsd
Environment:

OpenBSD NetBSD DragonFly


Issue Links:
Relates
relates to MDEV-20339 FreeBSD VM builder Open

 Description   

The connect storage engine fails to build on *BSD OS's..

[ 73%] Building CXX object storage/connect/CMakeFiles/connect.dir/filamfix.cpp.o
cd /home/ports/pobj/mariadb-10.0.3/build-amd64/storage/connect && /usr/bin/c++   -DFORCE_INIT_OF_VARS -DHAVE_CONFIG_H -DHUGE_SUPPORT -DLIBXML2_SUPPORT -DLINUX -DMARIADB -DMYSQL_DYNAMIC_PLUGIN -DMYSQL_SUPPORT -DPIVOT_SUPPORT -DUBUNTU -DUNIX -DZIP_SUPPORT -Dconnect_EXPORTS -Wall -O2 -pipe   -Wall -Wno-unused-parameter -fno-exceptions -fno-rtti -fpermissive -fexceptions -fPIC  -O2 -g -DNDEBUG -DDBUG_OFF -fPIC -I/home/ports/pobj/mariadb-10.0.3/build-amd64/include -I/usr/local/include/libxml2 -I/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/include -I/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/sql -I/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/regex    -Wall -Wmissing-declarations -Wno-write-strings -Wno-unused-variable -Wno-unused-value -Wno-unused-function -Wno-parentheses -o CMakeFiles/connect.dir/filamfix.cpp.o -c /home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp
cc1plus: warning: command line option "-Wmissing-declarations" is valid for C/ObjC but not for C++
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp: In member function 'bool BGXFAM::BigSeek(_global*, HANDLE, BIGINT, int)':
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp:612: error: 'lseek64' was not declared in this scope
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp: In member function 'virtual bool BGXFAM::OpenTableFile(_global*)':
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp:817: error: 'O_LARGEFILE' was not declared in this scope
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp: In member function 'virtual int BGXFAM::Cardinality(_global*)':
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp:940: error: 'open64' was not declared in this scope
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp:960: error: 'lseek64' was not declared in this scope
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp:963: error: 'lseek64' was not declared in this scope
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp: In member function 'virtual int BGXFAM::DeleteRecords(_global*, int)':
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp:1264: error: 'ftruncate64' was not declared in this scope
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp: In member function 'virtual bool BGXFAM::OpenTempFile(_global*)':
/home/ports/pobj/mariadb-10.0.3/mariadb-10.0.3/storage/connect/filamfix.cpp:1307: error: 'open64' was not declared in this scope

The storage/connect/os.h header has a chunk of code like so..

#if defined(__FreeBSD__) || defined(__APPLE__)
typedef off_t off64_t;
#define lseek64(fd, offset, whence) lseek((fd), (offset), (whence))
#define open64(path, flags, mode)   open((path), (flags), (mode))
#define ftruncate64(fd, length)     ftruncate((fd), (length))
#define O_LARGEFILE 0
#endif

The OS's in question could simply be added to the list but it would be better to add some sort of CMake test instead of having a hard coded list of OS's.



 Comments   
Comment by Brad Smith [ 2013-09-15 ]

10.0.4 is still broken.

Comment by Olivier Bertrand [ 2013-09-16 ]

Temporarily fixed by adding some OS's to the list.

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