[MDEV-10270] tokudb compile failure with clang Created: 2016-06-22  Updated: 2016-09-20  Resolved: 2016-09-20

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - TokuDB
Affects Version/s: 10.2.2
Fix Version/s: 5.5.50

Type: Bug Priority: Major
Reporter: Daniel Black Assignee: Vicențiu Ciorbaru
Resolution: Duplicate Votes: 0
Labels: clang

Issue Links:
Relates
relates to MDEV-10229 TokuDB fails to build with CLang Closed

 Description   

compile error using clang-3.8.0

12:01:54 /source/storage/tokudb/PerconaFT/ft/txn/txn.cc:251:21: error: missing field '__count' initializer [-Werror,-Wmissing-field-initializers]
12:01:54         .txn_lock = ZERO_MUTEX_INITIALIZER,
12:01:54                     ^
12:01:54 /source/storage/tokudb/PerconaFT/portability/toku_pthread.h:82:37: note: expanded from macro 'ZERO_MUTEX_INITIALIZER'
12:01:54 # define ZERO_MUTEX_INITIALIZER {{{0}}}
12:01:54                                     ^
12:01:54 /source/storage/tokudb/PerconaFT/ft/txn/txn.cc:254:23: error: missing field '__count' initializer [-Werror,-Wmissing-field-initializers]
12:01:54         .state_lock = ZERO_MUTEX_INITIALIZER,
12:01:54                       ^
12:01:54 /source/storage/tokudb/PerconaFT/portability/toku_pthread.h:82:37: note: expanded from macro 'ZERO_MUTEX_INITIALIZER'
12:01:54 # define ZERO_MUTEX_INITIALIZER {{{0}}}
12:01:54                                     ^
12:01:54 2[ 30%] Built target sequence_embedded
12:01:54  errors generated.

Looks to me like ZERO_MUTEX_INITIALIZER should be defined to PTHREAD_MUTEX_INITIALIZER, at least on linux. The definition in pthread.h looks to be a struct of 0s anyway.



 Comments   
Comment by Elena Stepanova [ 2016-06-22 ]

cvicentiu recently fixed TokuDB+clang compilation failures in 5.5 (MDEV-10229), I don't know though if these ones have been covered. Assigning to check.

cvicentiu, please modify Affects and Fix Version/s as needed.

Comment by Daniel Black [ 2016-06-22 ]

Dup of MDEV-10229

Thanks elenst and cvicentiu, https://github.com/MariaDB/server/commit/34a104ba0ccbe254100a235c04e4648136c9aa7e seems to cover the fix.

Waiting for merge.

Comment by Vicențiu Ciorbaru [ 2016-09-20 ]

Since MDEV-10229 fixes this issue, I've closed it as a duplicate.

Generated at Thu Feb 08 07:40:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.