-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing MacOS support #10
Comments
There is no currently support for MacOS. If you wish, you can add it - just implement OS-specific stuff (functions and structs with p_* prefix) in https://github.com/valyala/ybc/tree/master/platform similar to https://github.com/valyala/ybc/blob/master/platform/linux.c and hook it up at the end of https://github.com/valyala/ybc/blob/master/platform.h . |
Any hope to add in the MAC support recently? Since this issue is committed one year ago...If not I will try my to do it myself |
@xuyin224 , go on and try adding MacOS support yourself! Waiting for a pull request... |
When I execute this command go get -u github.com/valyala/ybc/bindings/go/ybc
I get the next result(MAC 10.10.1) :
github.com/valyala/ybc/bindings/go/ybc
gcc did not produce error at completed:1
on input:
line 15 "&GOPATH/src/github.com/valyala/ybc/bindings/go/ybc/ybc.go"
include "ybc_go_glue.c"
include <stdlib.h> // free
include <stddef.h> /* for ptrdiff_t and size_t below */
/* Define intgo when compiling with GCC. */
typedef ptrdiff_t intgo;
typedef struct { char *p; intgo n; } GoString;
typedef struct { char *p; intgo n; intgo c; } GoBytes;
GoString GoString(char *p);
GoString GoStringN(char *p, int l);
GoBytes GoBytes(void *p, int n);
char *CString(GoString);
void *_CMalloc(size_t);
line 1 "not-declared"
void cgo_f_1_1(void) { __typeof(CString) *cgo_undefined; }
line 1 "not-type"
void *cgo_f_1_2(void) { CString __cgo_undefined; }
line 1 "not-const"
void cgo_f_1_3(void) { enum { __cgo__undefined = (CString)*1 }; }
line 2 "not-declared"
void cgo_f_2_1(void) { __typeof(GoBytes) *cgo_undefined; }
line 2 "not-type"
void *cgo_f_2_2(void) { GoBytes __cgo_undefined; }
line 2 "not-const"
void cgo_f_2_3(void) { enum { __cgo__undefined = (GoBytes)*1 }; }
line 3 "not-declared"
void cgo_f_3_1(void) { __typeof(YBC_DE_NOTFOUND) *cgo_undefined; }
line 3 "not-type"
void *cgo_f_3_2(void) { YBC_DE_NOTFOUND __cgo_undefined; }
line 3 "not-const"
void cgo_f_3_3(void) { enum { __cgo__undefined = (YBC_DE_NOTFOUND)*1 }; }
line 4 "not-declared"
void cgo_f_4_1(void) { __typeof(YBC_DE_SUCCESS) *cgo_undefined; }
line 4 "not-type"
void *cgo_f_4_2(void) { YBC_DE_SUCCESS __cgo_undefined; }
line 4 "not-const"
void cgo_f_4_3(void) { enum { __cgo__undefined = (YBC_DE_SUCCESS)*1 }; }
line 5 "not-declared"
void cgo_f_5_1(void) { __typeof(YBC_DE_WOULDBLOCK) *cgo_undefined; }
line 5 "not-type"
void *cgo_f_5_2(void) { YBC_DE_WOULDBLOCK __cgo_undefined; }
line 5 "not-const"
void cgo_f_5_3(void) { enum { __cgo__undefined = (YBC_DE_WOULDBLOCK)*1 }; }
line 6 "not-declared"
void cgo_f_6_1(void) { __typeof(free) *cgo_undefined; }
line 6 "not-type"
void *cgo_f_6_2(void) { free __cgo_undefined; }
line 6 "not-const"
void cgo_f_6_3(void) { enum { __cgo__undefined = (free)*1 }; }
line 7 "not-declared"
void cgo_f_7_1(void) { __typeof(go_commit_item_and_value) *cgo_undefined; }
line 7 "not-type"
void *cgo_f_7_2(void) { go_commit_item_and_value __cgo_undefined; }
line 7 "not-const"
void cgo_f_7_3(void) { enum { __cgo__undefined = (go_commit_item_and_value)*1 }; }
line 8 "not-declared"
void cgo_f_8_1(void) { __typeof(go_get_item_and_value) *cgo_undefined; }
line 8 "not-type"
void *cgo_f_8_2(void) { go_get_item_and_value __cgo_undefined; }
line 8 "not-const"
void cgo_f_8_3(void) { enum { __cgo__undefined = (go_get_item_and_value)*1 }; }
line 9 "not-declared"
void cgo_f_9_1(void) { __typeof(go_get_item_and_value_de_async) *cgo_undefined; }
line 9 "not-type"
void *cgo_f_9_2(void) { go_get_item_and_value_de_async __cgo_undefined; }
line 9 "not-const"
void cgo_f_9_3(void) { enum { __cgo__undefined = (go_get_item_and_value_de_async)*1 }; }
line 10 "not-declared"
void cgo_f_10_1(void) { __typeof(go_set_item_and_value) *cgo_undefined; }
line 10 "not-type"
void *cgo_f_10_2(void) { go_set_item_and_value __cgo_undefined; }
line 10 "not-const"
void cgo_f_10_3(void) { enum { __cgo__undefined = (go_set_item_and_value)*1 }; }
line 11 "not-declared"
void cgo_f_11_1(void) { __typeof(int) *cgo_undefined; }
line 11 "not-type"
void *cgo_f_11_2(void) { int __cgo_undefined; }
line 11 "not-const"
void cgo_f_11_3(void) { enum { __cgo__undefined = (int)*1 }; }
line 12 "not-declared"
void cgo_f_12_1(void) { __typeof(size_t) *cgo_undefined; }
line 12 "not-type"
void *cgo_f_12_2(void) { size_t __cgo_undefined; }
line 12 "not-const"
void cgo_f_12_3(void) { enum { __cgo__undefined = (size_t)*1 }; }
line 13 "not-declared"
void cgo_f_13_1(void) { __typeof(uint64_t) *cgo_undefined; }
line 13 "not-type"
void *cgo_f_13_2(void) { uint64_t __cgo_undefined; }
line 13 "not-const"
void cgo_f_13_3(void) { enum { __cgo__undefined = (uint64_t)*1 }; }
line 14 "not-declared"
void cgo_f_14_1(void) { __typeof(ybc_clear) *cgo_undefined; }
line 14 "not-type"
void *cgo_f_14_2(void) { ybc_clear __cgo_undefined; }
line 14 "not-const"
void cgo_f_14_3(void) { enum { __cgo__undefined = (ybc_clear)*1 }; }
line 15 "not-declared"
void cgo_f_15_1(void) { __typeof(ybc_close) *cgo_undefined; }
line 15 "not-type"
void *cgo_f_15_2(void) { ybc_close __cgo_undefined; }
line 15 "not-const"
void cgo_f_15_3(void) { enum { __cgo__undefined = (ybc_close)*1 }; }
line 16 "not-declared"
void cgo_f_16_1(void) { __typeof(ybc_config_destroy) *cgo_undefined; }
line 16 "not-type"
void *cgo_f_16_2(void) { ybc_config_destroy __cgo_undefined; }
line 16 "not-const"
void cgo_f_16_3(void) { enum { __cgo__undefined = (ybc_config_destroy)*1 }; }
line 17 "not-declared"
void cgo_f_17_1(void) { __typeof(ybc_config_disable_overwrite_protection) *cgo_undefined; }
line 17 "not-type"
void *cgo_f_17_2(void) { ybc_config_disable_overwrite_protection __cgo_undefined; }
line 17 "not-const"
void cgo_f_17_3(void) { enum { __cgo__undefined = (ybc_config_disable_overwrite_protection)*1 }; }
line 18 "not-declared"
void cgo_f_18_1(void) { __typeof(ybc_config_get_size) *cgo_undefined; }
line 18 "not-type"
void *cgo_f_18_2(void) { ybc_config_get_size __cgo_undefined; }
line 18 "not-const"
void cgo_f_18_3(void) { enum { __cgo__undefined = (ybc_config_get_size)*1 }; }
line 19 "not-declared"
void cgo_f_19_1(void) { __typeof(ybc_config_init) *cgo_undefined; }
line 19 "not-type"
void *cgo_f_19_2(void) { ybc_config_init __cgo_undefined; }
line 19 "not-const"
void cgo_f_19_3(void) { enum { __cgo__undefined = (ybc_config_init)*1 }; }
line 20 "not-declared"
void cgo_f_20_1(void) { __typeof(ybc_config_set_data_file) *cgo_undefined; }
line 20 "not-type"
void *cgo_f_20_2(void) { ybc_config_set_data_file __cgo_undefined; }
line 20 "not-const"
void cgo_f_20_3(void) { enum { __cgo__undefined = (ybc_config_set_data_file)*1 }; }
line 21 "not-declared"
void cgo_f_21_1(void) { __typeof(ybc_config_set_data_file_size) *cgo_undefined; }
line 21 "not-type"
void *cgo_f_21_2(void) { ybc_config_set_data_file_size __cgo_undefined; }
line 21 "not-const"
void cgo_f_21_3(void) { enum { __cgo__undefined = (ybc_config_set_data_file_size)*1 }; }
line 22 "not-declared"
void cgo_f_22_1(void) { __typeof(ybc_config_set_de_hashtable_size) *cgo_undefined; }
line 22 "not-type"
void *cgo_f_22_2(void) { ybc_config_set_de_hashtable_size __cgo_undefined; }
line 22 "not-const"
void cgo_f_22_3(void) { enum { __cgo__undefined = (ybc_config_set_de_hashtable_size)*1 }; }
line 23 "not-declared"
void cgo_f_23_1(void) { __typeof(ybc_config_set_hot_data_size) *cgo_undefined; }
line 23 "not-type"
void *cgo_f_23_2(void) { ybc_config_set_hot_data_size __cgo_undefined; }
line 23 "not-const"
void cgo_f_23_3(void) { enum { __cgo__undefined = (ybc_config_set_hot_data_size)*1 }; }
line 24 "not-declared"
void cgo_f_24_1(void) { __typeof(ybc_config_set_hot_items_count) *cgo_undefined; }
line 24 "not-type"
void *cgo_f_24_2(void) { ybc_config_set_hot_items_count __cgo_undefined; }
line 24 "not-const"
void cgo_f_24_3(void) { enum { __cgo__undefined = (ybc_config_set_hot_items_count)*1 }; }
line 25 "not-declared"
void cgo_f_25_1(void) { __typeof(ybc_config_set_index_file) *cgo_undefined; }
line 25 "not-type"
void *cgo_f_25_2(void) { ybc_config_set_index_file __cgo_undefined; }
line 25 "not-const"
void cgo_f_25_3(void) { enum { __cgo__undefined = (ybc_config_set_index_file)*1 }; }
line 26 "not-declared"
void cgo_f_26_1(void) { __typeof(ybc_config_set_max_items_count) *cgo_undefined; }
line 26 "not-type"
void *cgo_f_26_2(void) { ybc_config_set_max_items_count __cgo_undefined; }
line 26 "not-const"
void cgo_f_26_3(void) { enum { __cgo__undefined = (ybc_config_set_max_items_count)*1 }; }
line 27 "not-declared"
void cgo_f_27_1(void) { __typeof(ybc_config_set_sync_interval) *cgo_undefined; }
line 27 "not-type"
void *cgo_f_27_2(void) { ybc_config_set_sync_interval __cgo_undefined; }
line 27 "not-const"
void cgo_f_27_3(void) { enum { __cgo__undefined = (ybc_config_set_sync_interval)*1 }; }
line 28 "not-declared"
void cgo_f_28_1(void) { __typeof(ybc_get_size) *cgo_undefined; }
line 28 "not-type"
void *cgo_f_28_2(void) { ybc_get_size __cgo_undefined; }
line 28 "not-const"
void cgo_f_28_3(void) { enum { __cgo__undefined = (ybc_get_size)*1 }; }
line 29 "not-declared"
void cgo_f_29_1(void) { __typeof(ybc_item_get_size) *cgo_undefined; }
line 29 "not-type"
void *cgo_f_29_2(void) { ybc_item_get_size __cgo_undefined; }
line 29 "not-const"
void cgo_f_29_3(void) { enum { __cgo__undefined = (ybc_item_get_size)*1 }; }
line 30 "not-declared"
void cgo_f_30_1(void) { __typeof(ybc_item_release) *cgo_undefined; }
line 30 "not-type"
void *cgo_f_30_2(void) { ybc_item_release __cgo_undefined; }
line 30 "not-const"
void cgo_f_30_3(void) { enum { __cgo__undefined = (ybc_item_release)*1 }; }
line 31 "not-declared"
void cgo_f_31_1(void) { __typeof(ybc_item_remove) *cgo_undefined; }
line 31 "not-type"
void *cgo_f_31_2(void) { ybc_item_remove __cgo_undefined; }
line 31 "not-const"
void cgo_f_31_3(void) { enum { __cgo__undefined = (ybc_item_remove)*1 }; }
line 32 "not-declared"
void cgo_f_32_1(void) { __typeof(ybc_item_set) *cgo_undefined; }
line 32 "not-type"
void *cgo_f_32_2(void) { ybc_item_set __cgo_undefined; }
line 32 "not-const"
void cgo_f_32_3(void) { enum { __cgo__undefined = (ybc_item_set)*1 }; }
line 33 "not-declared"
void cgo_f_33_1(void) { __typeof(ybc_open) *cgo_undefined; }
line 33 "not-type"
void *cgo_f_33_2(void) { ybc_open __cgo_undefined; }
line 33 "not-const"
void cgo_f_33_3(void) { enum { __cgo__undefined = (ybc_open)*1 }; }
line 34 "not-declared"
void cgo_f_34_1(void) { __typeof(ybc_remove) *cgo_undefined; }
line 34 "not-type"
void *cgo_f_34_2(void) { ybc_remove __cgo_undefined; }
line 34 "not-const"
void cgo_f_34_3(void) { enum { __cgo__undefined = (ybc_remove)*1 }; }
line 35 "not-declared"
void cgo_f_35_1(void) { __typeof(ybc_set_txn_begin) *cgo_undefined; }
line 35 "not-type"
void *cgo_f_35_2(void) { ybc_set_txn_begin __cgo_undefined; }
line 35 "not-const"
void cgo_f_35_3(void) { enum { __cgo__undefined = (ybc_set_txn_begin)*1 }; }
line 36 "not-declared"
void cgo_f_36_1(void) { __typeof(ybc_set_txn_commit) *cgo_undefined; }
line 36 "not-type"
void *cgo_f_36_2(void) { ybc_set_txn_commit __cgo_undefined; }
line 36 "not-const"
void cgo_f_36_3(void) { enum { __cgo__undefined = (ybc_set_txn_commit)*1 }; }
line 37 "not-declared"
void cgo_f_37_1(void) { __typeof(ybc_set_txn_get_size) *cgo_undefined; }
line 37 "not-type"
void *cgo_f_37_2(void) { ybc_set_txn_get_size __cgo_undefined; }
line 37 "not-const"
void cgo_f_37_3(void) { enum { __cgo__undefined = (ybc_set_txn_get_size)*1 }; }
line 38 "not-declared"
void cgo_f_38_1(void) { __typeof(ybc_set_txn_get_value) *cgo_undefined; }
line 38 "not-type"
void *cgo_f_38_2(void) { ybc_set_txn_get_value __cgo_undefined; }
line 38 "not-const"
void cgo_f_38_3(void) { enum { __cgo__undefined = (ybc_set_txn_get_value)*1 }; }
line 39 "not-declared"
void cgo_f_39_1(void) { __typeof(ybc_set_txn_rollback) *cgo_undefined; }
line 39 "not-type"
void *cgo_f_39_2(void) { ybc_set_txn_rollback __cgo_undefined; }
line 39 "not-const"
void cgo_f_39_3(void) { enum { __cgo__undefined = (ybc_set_txn_rollback)*1 }; }
line 40 "not-declared"
void cgo_f_40_1(void) { __typeof(ybc_set_txn_update_value_size) *cgo_undefined; }
line 40 "not-type"
void *cgo_f_40_2(void) { ybc_set_txn_update_value_size __cgo_undefined; }
line 40 "not-const"
void cgo_f_40_3(void) { enum { __cgo__undefined = (ybc_set_txn_update_value_size)*1 }; }
line 41 "not-declared"
void cgo_f_41_1(void) { __typeof(ybc_simple_get) *cgo_undefined; }
line 41 "not-type"
void *cgo_f_41_2(void) { ybc_simple_get __cgo_undefined; }
line 41 "not-const"
void cgo_f_41_3(void) { enum { __cgo__undefined = (ybc_simple_get)*1 }; }
line 42 "not-declared"
void cgo_f_42_1(void) { __typeof(ybc_simple_set) *cgo_undefined; }
line 42 "not-type"
void *cgo_f_42_2(void) { ybc_simple_set __cgo_undefined; }
line 42 "not-const"
void cgo_f_42_3(void) { enum { __cgo__undefined = (ybc_simple_set)*1 }; }
line 1 "completed"
int __cgo__1 = __cgo__2;
full error output:
not-type:1:35: error: use of undeclared identifier 'cgo_undefined'
void *cgo_f_1_2(void) { CString __cgo_undefined; }
^
not-const:1:63: error: invalid operands to binary expression ('char ()(GoString)' and 'int')
void cgo_f_1_3(void) { enum { __cgo__undefined = (CString)1 }; }
~~~~~~~~~^~
not-type:2:35: error: use of undeclared identifier 'cgo_undefined'
void *cgo_f_2_2(void) { GoBytes __cgo_undefined; }
^
not-const:2:63: error: invalid operands to binary expression ('GoBytes ()(void _, int)' and 'int')
void cgo_f_2_3(void) { enum { __cgo__undefined = (GoBytes)1 }; }
~~~~~~~~~^~
not-type:3:43: error: use of undeclared identifier 'cgo_undefined'
void *cgo_f_3_2(void) { YBC_DE_NOTFOUND __cgo_undefined; }
^
not-type:4:42: error: use of undeclared identifier 'cgo_undefined'
void *cgo_f_4_2(void) { YBC_DE_SUCCESS __cgo_undefined; }
^
not-type:5:45: error: use of undeclared identifier 'cgo_undefined'
void *cgo_f_5_2(void) { YBC_DE_WOULDBLOCK __cgo_undefined; }
^
not-type:6:32: error: use of undeclared identifier 'cgo_undefined'
void *cgo_f_6_2(void) { free __cgo_undefined; }
^
not-const:6:60: error: invalid operands to binary expression ('void ()(void *)' and 'int')
void cgo_f_6_3(void) { enum { __cgo__undefined = (free)1 }; }
~~~~~~^~
not-type:7:52: error: use of undeclared identifier 'cgo_undefined'
void *cgo_f_7_2(void) { go_commit_item_and_value __cgo_undefined; }
^
not-const:7:80: error: invalid operands to binary expression ('void ()(struct ybc_set_txn *const, struct ybc_item *const, struct ybc_value *const)' and 'int')
void cgo_f_7_3(void) { enum { __cgo__undefined = (go_commit_item_and_value)1 }; }
~~~~~~~~~~~~~~~~~~~~~~~~~~^~
not-type:8:49: error: use of undeclared identifier 'cgo_undefined'
void *cgo_f_8_2(void) { go_get_item_and_value __cgo_undefined; }
^
not-const:8:77: error: invalid operands to binary expression ('int ()(struct ybc *const, struct ybc_item *const, struct ybc_value *const, const struct ybc_key *const)' and 'int')
void cgo_f_8_3(void) { enum { __cgo__undefined = (go_get_item_and_value)1 }; }
~~~~~~~~~~~~~~~~~~~~~~~^~
not-type:9:58: error: use of undeclared identifier 'cgo_undefined'
void *cgo_f_9_2(void) { go_get_item_and_value_de_async __cgo_undefined; }
^
not-const:9:86: error: invalid operands to binary expression ('enum ybc_de_status ()(struct ybc *const, struct ybc_item *const, struct ybc_value *const, const struct ybc_key *const, const uint64_t)' and 'int')
void cgo_f_9_3(void) { enum { __cgo__undefined = (go_get_item_and_value_de_async)1 }; }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
not-type:10:50: error: use of undeclared identifier 'cgo_undefined'
void *cgo_f_10_2(void) { go_set_item_and_value __cgo_undefined; }
^
not-const:10:78: error: invalid operands to binary expression ('int ()(struct ybc *const, struct ybc_item *const, const struct ybc_key *const, struct ybc_value *const)' and 'int')
void cgo_f_10_3(void) { enum { __cgo__undefined = (go_set_item_and_value)_1 }; }
~~~~~~~~~~~~~~~~~~~~~~~^~
not-const:11:60: error: indirection requires pointer operand ('int' invalid)
void cgo_f_11_3(void) { enum { __cgo__undefined = (int)_1 }; }
^~
not-const:12:63: error: indirection requires pointer operand ('int' invalid)
void cgo_f_12_3(void) { enum { __cgo__undefined = (size_t)_1 }; }
^~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
The text was updated successfully, but these errors were encountered: