Skip to content
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

Enable crate on 32-bit architectures #73

Open
ignatenkobrain opened this issue May 13, 2020 · 12 comments
Open

Enable crate on 32-bit architectures #73

ignatenkobrain opened this issue May 13, 2020 · 12 comments
Labels

Comments

@ignatenkobrain
Copy link

ignatenkobrain commented May 13, 2020

full bindgen trace
failures:
---- bindings::bindgen_test_layout_UConverterFromUnicodeArgs stdout ----
thread 'bindings::bindgen_test_layout_UConverterFromUnicodeArgs' panicked at 'assertion failed: `(left == right)`
  left: `28`,
 right: `56`: Size of: UConverterFromUnicodeArgs', src/bindings.rs:10144:3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- bindings::bindgen_test_layout__G_fpos_t stdout ----
thread 'bindings::bindgen_test_layout__G_fpos_t' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `16`: Size of: _G_fpos_t', src/bindings.rs:744:3
---- bindings::bindgen_test_layout__IO_marker stdout ----
thread 'bindings::bindgen_test_layout__IO_marker' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `24`: Size of: _IO_marker', src/bindings.rs:829:3
---- bindings::bindgen_test_layout_UConverterToUnicodeArgs stdout ----
thread 'bindings::bindgen_test_layout_UConverterToUnicodeArgs' panicked at 'assertion failed: `(left == right)`
  left: `28`,
 right: `56`: Size of: UConverterToUnicodeArgs', src/bindings.rs:10253:3
---- bindings::bindgen_test_layout__G_fpos64_t stdout ----
thread 'bindings::bindgen_test_layout__G_fpos64_t' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `16`: Size of: _G_fpos64_t', src/bindings.rs:783:3
---- bindings::bindgen_test_layout__IO_FILE stdout ----
thread 'bindings::bindgen_test_layout__IO_FILE' panicked at 'assertion failed: `(left == right)`
  left: `124`,
 right: `216`: Size of: _IO_FILE', src/bindings.rs:910:3
---- bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_1 stdout ----
thread 'bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_1' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of __pthread_cond_s__bindgen_ty_1', src/bindings.rs:12079:3
---- bindings::bindgen_test_layout___pthread_cond_s stdout ----
thread 'bindings::bindgen_test_layout___pthread_cond_s' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of __pthread_cond_s', src/bindings.rs:12211:3
---- bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_2 stdout ----
thread 'bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_2' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of __pthread_cond_s__bindgen_ty_2', src/bindings.rs:12174:3
---- bindings::bindgen_test_layout___pthread_internal_list stdout ----
thread 'bindings::bindgen_test_layout___pthread_internal_list' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: __pthread_internal_list', src/bindings.rs:11866:3
---- bindings::bindgen_test_layout___pthread_mutex_s stdout ----
thread 'bindings::bindgen_test_layout___pthread_mutex_s' panicked at 'assertion failed: `(left == right)`
  left: `32`,
 right: `40`: Size of: __pthread_mutex_s', src/bindings.rs:11912:3
---- bindings::bindgen_test_layout___sigset_t stdout ----
thread 'bindings::bindgen_test_layout___sigset_t' panicked at 'assertion failed: `(left == right)`
  left: `64`,
 right: `128`: Size of: __sigset_t', src/bindings.rs:11537:3
---- bindings::bindgen_test_layout___pthread_rwlock_arch_t stdout ----
thread 'bindings::bindgen_test_layout___pthread_rwlock_arch_t' panicked at 'assertion failed: `(left == right)`
  left: `48`,
 right: `56`: Size of: __pthread_rwlock_arch_t', src/bindings.rs:11721:3
---- bindings::bindgen_test_layout___va_list_tag stdout ----
thread 'bindings::bindgen_test_layout___va_list_tag' panicked at 'assertion failed: `(left == right)`
  left: `16`,
 right: `24`: Size of: __va_list_tag', src/bindings.rs:24263:3
---- bindings::bindgen_test_layout__htmlElemDesc stdout ----
thread 'bindings::bindgen_test_layout__htmlElemDesc' panicked at 'assertion failed: `(left == right)`
  left: `36`,
 right: `64`: Size of: _htmlElemDesc', src/bindings.rs:15756:3
---- bindings::bindgen_test_layout__htmlEntityDesc stdout ----
thread 'bindings::bindgen_test_layout__htmlEntityDesc' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `24`: Size of: _htmlEntityDesc', src/bindings.rs:15918:3
---- bindings::bindgen_test_layout__uconv_t stdout ----
thread 'bindings::bindgen_test_layout__uconv_t' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _uconv_t', src/bindings.rs:10987:3
---- bindings::bindgen_test_layout__xlinkHandler stdout ----
thread 'bindings::bindgen_test_layout__xlinkHandler' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `24`: Size of: _xlinkHandler', src/bindings.rs:13339:3
---- bindings::bindgen_test_layout__xmlAttr stdout ----
thread 'bindings::bindgen_test_layout__xmlAttr' panicked at 'assertion failed: `(left == right)`
  left: `48`,
 right: `96`: Size of: _xmlAttr', src/bindings.rs:3275:3
---- bindings::bindgen_test_layout__xmlAttribute stdout ----
thread 'bindings::bindgen_test_layout__xmlAttribute' panicked at 'assertion failed: `(left == right)`
  left: `64`,
 right: `120`: Size of: _xmlAttribute', src/bindings.rs:2209:3
---- bindings::bindgen_test_layout__xmlBuffer stdout ----
thread 'bindings::bindgen_test_layout__xmlBuffer' panicked at 'assertion failed: `(left == right)`
  left: `20`,
 right: `32`: Size of: _xmlBuffer', src/bindings.rs:1952:3
---- bindings::bindgen_test_layout__xmlChRangeGroup stdout ----
thread 'bindings::bindgen_test_layout__xmlChRangeGroup' panicked at 'assertion failed: `(left == right)`
  left: `16`,
 right: `24`: Size of: _xmlChRangeGroup', src/bindings.rs:16304:3
---- bindings::bindgen_test_layout__xmlCharEncodingHandler stdout ----
thread 'bindings::bindgen_test_layout__xmlCharEncodingHandler' panicked at 'assertion failed: `(left == right)`
  left: `28`,
 right: `56`: Size of: _xmlCharEncodingHandler', src/bindings.rs:11034:3
---- bindings::bindgen_test_layout__xmlDOMWrapCtxt stdout ----
thread 'bindings::bindgen_test_layout__xmlDOMWrapCtxt' panicked at 'assertion failed: `(left == right)`
  left: `16`,
 right: `32`: Size of: _xmlDOMWrapCtxt', src/bindings.rs:4100:3
---- bindings::bindgen_test_layout__xmlDoc stdout ----
thread 'bindings::bindgen_test_layout__xmlDoc' panicked at 'assertion failed: `(left == right)`
  left: `96`,
 right: `176`: Size of: _xmlDoc', src/bindings.rs:3817:3
---- bindings::bindgen_test_layout__xmlDtd stdout ----
thread 'bindings::bindgen_test_layout__xmlDtd' panicked at 'assertion failed: `(left == right)`
  left: `64`,
 right: `128`: Size of: _xmlDtd', src/bindings.rs:3081:3
---- bindings::bindgen_test_layout__xmlElement stdout ----
thread 'bindings::bindgen_test_layout__xmlElement' panicked at 'assertion failed: `(left == right)`
  left: `56`,
 right: `112`: Size of: _xmlElement', src/bindings.rs:2809:3
---- bindings::bindgen_test_layout__xmlEntity stdout ----
thread 'bindings::bindgen_test_layout__xmlEntity' panicked at 'assertion failed: `(left == right)`
  left: `76`,
 right: `136`: Size of: _xmlEntity', src/bindings.rs:7018:3
---- bindings::bindgen_test_layout__xmlEnumeration stdout ----
thread 'bindings::bindgen_test_layout__xmlEnumeration' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _xmlEnumeration', src/bindings.rs:2151:3
---- bindings::bindgen_test_layout__xmlError stdout ----
thread 'bindings::bindgen_test_layout__xmlError' panicked at 'assertion failed: `(left == right)`
  left: `52`,
 right: `88`: Size of: _xmlError', src/bindings.rs:5134:3
---- bindings::bindgen_test_layout__xmlGlobalState stdout ----
thread 'bindings::bindgen_test_layout__xmlGlobalState' panicked at 'assertion failed: `(left == right)`
  left: `516`,
 right: `968`: Size of: _xmlGlobalState', src/bindings.rs:14023:3
---- bindings::bindgen_test_layout__xmlID stdout ----
thread 'bindings::bindgen_test_layout__xmlID' panicked at 'assertion failed: `(left == right)`
  left: `24`,
 right: `48`: Size of: _xmlID', src/bindings.rs:3423:3
---- bindings::bindgen_test_layout__xmlNode stdout ----
thread 'bindings::bindgen_test_layout__xmlNode' panicked at 'assertion failed: `(left == right)`
  left: `60`,
 right: `120`: Size of: _xmlNode', src/bindings.rs:3598:3
---- bindings::bindgen_test_layout__xmlLocationSet stdout ----
thread 'bindings::bindgen_test_layout__xmlLocationSet' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `16`: Size of: _xmlLocationSet', src/bindings.rs:24133:3
---- bindings::bindgen_test_layout__xmlNodeSet stdout ----
thread 'bindings::bindgen_test_layout__xmlNodeSet' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `16`: Size of: _xmlNodeSet', src/bindings.rs:17021:3
---- bindings::bindgen_test_layout__xmlNotation stdout ----
thread 'bindings::bindgen_test_layout__xmlNotation' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `24`: Size of: _xmlNotation', src/bindings.rs:2075:3
---- bindings::bindgen_test_layout__xmlElementContent stdout ----
thread 'bindings::bindgen_test_layout__xmlElementContent' panicked at 'assertion failed: `(left == right)`
  left: `28`,
 right: `48`: Size of: _xmlElementContent', src/bindings.rs:2415:3
---- bindings::bindgen_test_layout__xmlParserCtxt stdout ----
thread 'bindings::bindgen_test_layout__xmlParserCtxt' panicked at 'assertion failed: `(left == right)`
  left: `472`,
 right: `752`: Size of: _xmlParserCtxt', src/bindings.rs:7749:3
---- bindings::bindgen_test_layout__xmlOutputBuffer stdout ----
thread 'bindings::bindgen_test_layout__xmlOutputBuffer' panicked at 'assertion failed: `(left == right)`
  left: `32`,
 right: `56`: Size of: _xmlOutputBuffer', src/bindings.rs:14895:3
---- bindings::bindgen_test_layout__xmlParserInput stdout ----
thread 'bindings::bindgen_test_layout__xmlParserInput' panicked at 'assertion failed: `(left == right)`
  left: `60`,
 right: `104`: Size of: _xmlParserInput', src/bindings.rs:7319:3
---- bindings::bindgen_test_layout__xmlNs stdout ----
thread 'bindings::bindgen_test_layout__xmlNs' panicked at 'assertion failed: `(left == right)`
  left: `24`,
 right: `48`: Size of: _xmlNs', src/bindings.rs:2982:3
---- bindings::bindgen_test_layout__xmlParserInputBuffer stdout ----
thread 'bindings::bindgen_test_layout__xmlParserInputBuffer' panicked at 'assertion failed: `(left == right)`
  left: `36`,
 right: `64`: Size of: _xmlParserInputBuffer', src/bindings.rs:14780:3
---- bindings::bindgen_test_layout__xmlParserNodeInfoSeq stdout ----
thread 'bindings::bindgen_test_layout__xmlParserNodeInfoSeq' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `24`: Size of: _xmlParserNodeInfoSeq', src/bindings.rs:7570:3
---- bindings::bindgen_test_layout__xmlParserNodeInfo stdout ----
thread 'bindings::bindgen_test_layout__xmlParserNodeInfo' panicked at 'assertion failed: `(left == right)`
  left: `20`,
 right: `40`: Size of: _xmlParserNodeInfo', src/bindings.rs:7498:3
---- bindings::bindgen_test_layout__xmlRef stdout ----
thread 'bindings::bindgen_test_layout__xmlRef' panicked at 'assertion failed: `(left == right)`
  left: `20`,
 right: `40`: Size of: _xmlRef', src/bindings.rs:3510:3
---- bindings::bindgen_test_layout__xmlSAXLocator stdout ----
thread 'bindings::bindgen_test_layout__xmlSAXLocator' panicked at 'assertion failed: `(left == right)`
  left: `16`,
 right: `32`: Size of: _xmlSAXLocator', src/bindings.rs:8669:3
---- bindings::bindgen_test_layout__xmlSAXHandlerV1 stdout ----
thread 'bindings::bindgen_test_layout__xmlSAXHandlerV1' panicked at 'assertion failed: `(left == right)`
  left: `112`,
 right: `224`: Size of: _xmlSAXHandlerV1', src/bindings.rs:9512:3
---- bindings::bindgen_test_layout__xmlSchemaAttributeGroup stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaAttributeGroup' panicked at 'assertion failed: `(left == right)`
  left: `60`,
 right: `120`: Size of: _xmlSchemaAttributeGroup', src/bindings.rs:19863:3
---- bindings::bindgen_test_layout__xmlSchemaAttributeLink stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaAttributeLink' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _xmlSchemaAttributeLink', src/bindings.rs:19620:3
---- bindings::bindgen_test_layout__xmlSchema stdout ----
thread 'bindings::bindgen_test_layout__xmlSchema' panicked at 'assertion failed: `(left == right)`
  left: `84`,
 right: `160`: Size of: _xmlSchema', src/bindings.rs:21003:3
---- bindings::bindgen_test_layout__xmlSchemaElement stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaElement' panicked at 'assertion failed: `(left == right)`
  left: `104`,
 right: `200`: Size of: _xmlSchemaElement', src/bindings.rs:20499:3
---- bindings::bindgen_test_layout__xmlSAXHandler stdout ----
thread 'bindings::bindgen_test_layout__xmlSAXHandler' panicked at 'assertion failed: `(left == right)`
  left: `128`,
 right: `256`: Size of: _xmlSAXHandler', src/bindings.rs:9143:3
---- bindings::bindgen_test_layout__xmlSchemaFacet stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaFacet' panicked at 'assertion failed: `(left == right)`
  left: `40`,
 right: `72`: Size of: _xmlSchemaFacet', src/bindings.rs:20787:3
---- bindings::bindgen_test_layout__xmlSchemaFacetLink stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaFacetLink' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _xmlSchemaFacetLink', src/bindings.rs:20084:3
---- bindings::bindgen_test_layout__xmlSchemaAnnot stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaAnnot' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _xmlSchemaAnnot', src/bindings.rs:19346:3
---- bindings::bindgen_test_layout__xmlSchemaType stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaType' panicked at 'assertion failed: `(left == right)`
  left: `120`,
 right: `224`: Size of: _xmlSchemaType', src/bindings.rs:20154:3
---- bindings::bindgen_test_layout__xmlSchemaNotation stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaNotation' panicked at 'assertion failed: `(left == right)`
  left: `20`,
 right: `40`: Size of: _xmlSchemaNotation', src/bindings.rs:20912:3
---- bindings::bindgen_test_layout__xmlSchemaAttribute stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaAttribute' panicked at 'assertion failed: `(left == right)`
  left: `76`,
 right: `152`: Size of: _xmlSchemaAttribute', src/bindings.rs:19406:3
---- bindings::bindgen_test_layout__xmlSchemaWildcard stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaWildcard' panicked at 'assertion failed: `(left == right)`
  left: `44`,
 right: `72`: Size of: _xmlSchemaWildcard', src/bindings.rs:19715:3
---- bindings::bindgen_test_layout__xmlSchemaWildcardNs stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaWildcardNs' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _xmlSchemaWildcardNs', src/bindings.rs:19663:3
---- bindings::bindgen_test_layout__xmlShellCtxt stdout ----
thread 'bindings::bindgen_test_layout__xmlShellCtxt' panicked at 'assertion failed: `(left == right)`
  left: `28`,
 right: `56`: Size of: _xmlShellCtxt', src/bindings.rs:18498:3
---- bindings::bindgen_test_layout__xmlURI stdout ----
thread 'bindings::bindgen_test_layout__xmlURI' panicked at 'assertion failed: `(left == right)`
  left: `44`,
 right: `88`: Size of: _xmlURI', src/bindings.rs:21381:3
---- bindings::bindgen_test_layout__xmlValidCtxt stdout ----
thread 'bindings::bindgen_test_layout__xmlValidCtxt' panicked at 'assertion failed: `(left == right)`
  left: `64`,
 right: `112`: Size of: _xmlValidCtxt', src/bindings.rs:6449:3
---- bindings::bindgen_test_layout__xmlXPathAxis stdout ----
thread 'bindings::bindgen_test_layout__xmlXPathAxis' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _xmlXPathAxis', src/bindings.rs:17358:3
---- bindings::bindgen_test_layout__xmlXPathContext stdout ----
thread 'bindings::bindgen_test_layout__xmlXPathContext' panicked at 'assertion failed: `(left == right)`
  left: `204`,
 right: `352`: Size of: _xmlXPathContext', src/bindings.rs:17490:3
---- bindings::bindgen_test_layout__xmlXPathObject stdout ----
thread 'bindings::bindgen_test_layout__xmlXPathObject' panicked at 'assertion failed: `(left == right)`
  left: `40`,
 right: `72`: Size of: _xmlXPathObject', src/bindings.rs:17090:3
---- bindings::bindgen_test_layout__xmlXPathParserContext stdout ----
thread 'bindings::bindgen_test_layout__xmlXPathParserContext' panicked at 'assertion failed: `(left == right)`
  left: `48`,
 right: `88`: Size of: _xmlXPathParserContext', src/bindings.rs:17924:3
---- bindings::bindgen_test_layout__xmlXPathType stdout ----
thread 'bindings::bindgen_test_layout__xmlXPathType' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _xmlXPathType', src/bindings.rs:17215:3
---- bindings::bindgen_test_layout__xmlXPathVariable stdout ----
thread 'bindings::bindgen_test_layout__xmlXPathVariable' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _xmlXPathVariable', src/bindings.rs:17256:3
---- bindings::bindgen_test_layout_drand48_data stdout ----
thread 'bindings::bindgen_test_layout_drand48_data' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of drand48_data', src/bindings.rs:12849:3
---- bindings::bindgen_test_layout_fd_set stdout ----
thread 'bindings::bindgen_test_layout_fd_set' panicked at 'assertion failed: `(left == right)`
  left: `64`,
 right: `128`: Size of: fd_set', src/bindings.rs:11646:3
---- bindings::bindgen_test_layout_ldiv_t stdout ----
thread 'bindings::bindgen_test_layout_ldiv_t' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: ldiv_t', src/bindings.rs:11348:3
---- bindings::bindgen_test_layout_lldiv_t stdout ----
thread 'bindings::bindgen_test_layout_lldiv_t' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of lldiv_t', src/bindings.rs:11392:3
---- bindings::bindgen_test_layout_pthread_attr_t stdout ----
thread 'bindings::bindgen_test_layout_pthread_attr_t' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of pthread_attr_t', src/bindings.rs:12364:3
---- bindings::bindgen_test_layout_pthread_barrier_t stdout ----
thread 'bindings::bindgen_test_layout_pthread_barrier_t' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of pthread_barrier_t', src/bindings.rs:12598:3
---- bindings::bindgen_test_layout_pthread_cond_t stdout ----
thread 'bindings::bindgen_test_layout_pthread_cond_t' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of pthread_cond_t', src/bindings.rs:12456:3
---- bindings::bindgen_test_layout_pthread_mutex_t stdout ----
thread 'bindings::bindgen_test_layout_pthread_mutex_t' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of pthread_mutex_t', src/bindings.rs:12405:3
---- bindings::bindgen_test_layout_pthread_rwlock_t stdout ----
thread 'bindings::bindgen_test_layout_pthread_rwlock_t' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of pthread_rwlock_t', src/bindings.rs:12507:3
---- bindings::bindgen_test_layout__xmlXPathFunct stdout ----
thread 'bindings::bindgen_test_layout__xmlXPathFunct' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _xmlXPathFunct', src/bindings.rs:17305:3
---- bindings::bindgen_test_layout_pthread_rwlockattr_t stdout ----
thread 'bindings::bindgen_test_layout_pthread_rwlockattr_t' panicked at 'assertion failed: `(left == right)`
  left: `4`,
 right: `8`: Alignment of pthread_rwlockattr_t', src/bindings.rs:12557:3
---- bindings::bindgen_test_layout_timespec stdout ----
thread 'bindings::bindgen_test_layout_timespec' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: timespec', src/bindings.rs:11606:3
---- bindings::bindgen_test_layout_random_data stdout ----
thread 'bindings::bindgen_test_layout_random_data' panicked at 'assertion failed: `(left == right)`
  left: `28`,
 right: `48`: Size of: random_data', src/bindings.rs:12693:3
---- bindings::bindgen_test_layout__xmlSchemaTypeLink stdout ----
thread 'bindings::bindgen_test_layout__xmlSchemaTypeLink' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: _xmlSchemaTypeLink', src/bindings.rs:20041:3
---- bindings::bindgen_test_layout_timeval stdout ----
thread 'bindings::bindgen_test_layout_timeval' panicked at 'assertion failed: `(left == right)`
  left: `8`,
 right: `16`: Size of: timeval', src/bindings.rs:11567:3
failures:
    bindings::bindgen_test_layout_UConverterFromUnicodeArgs
    bindings::bindgen_test_layout_UConverterToUnicodeArgs
    bindings::bindgen_test_layout__G_fpos64_t
    bindings::bindgen_test_layout__G_fpos_t
    bindings::bindgen_test_layout__IO_FILE
    bindings::bindgen_test_layout__IO_marker
    bindings::bindgen_test_layout___pthread_cond_s
    bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_1
    bindings::bindgen_test_layout___pthread_cond_s__bindgen_ty_2
    bindings::bindgen_test_layout___pthread_internal_list
    bindings::bindgen_test_layout___pthread_mutex_s
    bindings::bindgen_test_layout___pthread_rwlock_arch_t
    bindings::bindgen_test_layout___sigset_t
    bindings::bindgen_test_layout___va_list_tag
    bindings::bindgen_test_layout__htmlElemDesc
    bindings::bindgen_test_layout__htmlEntityDesc
    bindings::bindgen_test_layout__uconv_t
    bindings::bindgen_test_layout__xlinkHandler
    bindings::bindgen_test_layout__xmlAttr
    bindings::bindgen_test_layout__xmlAttribute
    bindings::bindgen_test_layout__xmlBuffer
    bindings::bindgen_test_layout__xmlChRangeGroup
    bindings::bindgen_test_layout__xmlCharEncodingHandler
    bindings::bindgen_test_layout__xmlDOMWrapCtxt
    bindings::bindgen_test_layout__xmlDoc
    bindings::bindgen_test_layout__xmlDtd
    bindings::bindgen_test_layout__xmlElement
    bindings::bindgen_test_layout__xmlElementContent
    bindings::bindgen_test_layout__xmlEntity
    bindings::bindgen_test_layout__xmlEnumeration
    bindings::bindgen_test_layout__xmlError
    bindings::bindgen_test_layout__xmlGlobalState
    bindings::bindgen_test_layout__xmlID
    bindings::bindgen_test_layout__xmlLocationSet
    bindings::bindgen_test_layout__xmlNode
    bindings::bindgen_test_layout__xmlNodeSet
    bindings::bindgen_test_layout__xmlNotation
    bindings::bindgen_test_layout__xmlNs
    bindings::bindgen_test_layout__xmlOutputBuffer
    bindings::bindgen_test_layout__xmlParserCtxt
    bindings::bindgen_test_layout__xmlParserInput
    bindings::bindgen_test_layout__xmlParserInputBuffer
    bindings::bindgen_test_layout__xmlParserNodeInfo
    bindings::bindgen_test_layout__xmlParserNodeInfoSeq
    bindings::bindgen_test_layout__xmlRef
    bindings::bindgen_test_layout__xmlSAXHandler
    bindings::bindgen_test_layout__xmlSAXHandlerV1
    bindings::bindgen_test_layout__xmlSAXLocator
    bindings::bindgen_test_layout__xmlSchema
    bindings::bindgen_test_layout__xmlSchemaAnnot
    bindings::bindgen_test_layout__xmlSchemaAttribute
    bindings::bindgen_test_layout__xmlSchemaAttributeGroup
    bindings::bindgen_test_layout__xmlSchemaAttributeLink
    bindings::bindgen_test_layout__xmlSchemaElement
    bindings::bindgen_test_layout__xmlSchemaFacet
    bindings::bindgen_test_layout__xmlSchemaFacetLink
    bindings::bindgen_test_layout__xmlSchemaNotation
    bindings::bindgen_test_layout__xmlSchemaType
    bindings::bindgen_test_layout__xmlSchemaTypeLink
    bindings::bindgen_test_layout__xmlSchemaWildcard
    bindings::bindgen_test_layout__xmlSchemaWildcardNs
    bindings::bindgen_test_layout__xmlShellCtxt
    bindings::bindgen_test_layout__xmlURI
    bindings::bindgen_test_layout__xmlValidCtxt
    bindings::bindgen_test_layout__xmlXPathAxis
    bindings::bindgen_test_layout__xmlXPathContext
    bindings::bindgen_test_layout__xmlXPathFunct
    bindings::bindgen_test_layout__xmlXPathObject
    bindings::bindgen_test_layout__xmlXPathParserContext
    bindings::bindgen_test_layout__xmlXPathType
    bindings::bindgen_test_layout__xmlXPathVariable
    bindings::bindgen_test_layout_drand48_data
    bindings::bindgen_test_layout_fd_set
    bindings::bindgen_test_layout_ldiv_t
    bindings::bindgen_test_layout_lldiv_t
    bindings::bindgen_test_layout_pthread_attr_t
    bindings::bindgen_test_layout_pthread_barrier_t
    bindings::bindgen_test_layout_pthread_cond_t
    bindings::bindgen_test_layout_pthread_mutex_t
    bindings::bindgen_test_layout_pthread_rwlock_t
    bindings::bindgen_test_layout_pthread_rwlockattr_t
    bindings::bindgen_test_layout_random_data
    bindings::bindgen_test_layout_timespec
    bindings::bindgen_test_layout_timeval
test result: FAILED. 12 passed; 84 failed; 0 ignored; 0 measured; 0 filtered out

Noticed that when runnning cargo test on i686 and armv7hl.

@dginev dginev added the bug label May 13, 2020
@dginev
Copy link
Member

dginev commented May 13, 2020

Thanks for the report!

Do you have any pointer to how to emulate a 32bit target in a cargo test suite? Would love to figure out some way to troubleshoot locally and land some patches. Open to pull requests too if this looks easy to patch on your end.

@ignatenkobrain
Copy link
Author

@dginev not really sure, but libc crate is doing such tests so probably worth to look at?

I guess by specifying --target i686-unknown-linux-gnu when running cargo test

@ignatenkobrain
Copy link
Author

@dginev I guess this is because you have generated bindings using bindgen just on your computer so things like https://github.com/KWARC/rust-libxml/blob/master/src/bindings.rs#L16-L20 just get hardcoded there, together with other things.

Proper solution would be to use bindgen from build.rs to have it generated dynamically.

@dginev
Copy link
Member

dginev commented May 13, 2020

That's a good tip! Sadly, I think I'll need to make a VM after all, since I also need the native libxml2.so library to stay compatible. Thanks in any case!

@dginev
Copy link
Member

dginev commented May 13, 2020

Ah, having to run bindgen on every build would likely be a good solution. Seems like a lot of wasted work if you stick to the same platform, but definitely makes sense for the 32-bit case. Will take a look into that...

@ignatenkobrain
Copy link
Author

@dginev well, it is not only about 32bit case, but also about libxml2 version (the bindings which are generated are derived for some specific libxml2 version, so let's say if I try to use those constants in my code, they will report wrong information).

Oh yeah, we also have another beast - s390x which is BigEndian, that can also behave for some things differently :)

Let me know once you have some patch which uses bindgen dynamically or some other fix and I can try it out.

@dginev
Copy link
Member

dginev commented May 13, 2020

Started investigating and quickly ran into the full list of painpoints that has seemingly been discussed online before:
https://www.reddit.com/r/rust/comments/5x5em7/pain_points_using_rustbindgen_at_buildtime/

It seems that the reasonable way out of the heavy bindgen dependency burden is to

"ship several pregenerated bindings and pick the right one at build time"

So I'll likely have to get a VM with your setup, generate an alternative src/bindings.rs and put in place a mechanism for fishing out the right one at build time -- and giving a clean error on platforms the wrapper wasn't prepared for. Ugh.

The good news is that libxml2 itself is a slow velocity project due to its maturity, so regenerating the bindings file on breakage is a reasonable tradeoff. Might be years until that is needed. My long-term hope for the crate is to bundle in a Rust-transpiled equivalent of libxml2 (in development by c2rust), and entirely escape the C dependency games.

Will read more in that reddit thread, and let you know when I have the build mechanism. If you feel like running bindgen as specified in the PR #74 , and share the resulting file with me, that would speed me along nicely.

@dginev dginev changed the title Many tests fail on 32bit architectures Enable crate on 32-bit architectures May 13, 2020
@ignatenkobrain
Copy link
Author

@dginev any news here? This is blocking me from getting https://gitlab.com/news-flash/news_flash_gtk from being packaged.

@ghost
Copy link

ghost commented Sep 22, 2020

Maybe we need to remove unnecessary assert.

I've generated bindings.rs on Manjaro, tested on Windows10, and found out that c_ulong's size or c_long's is different from Win. So I removed the corresponding assert. It's worked so far.

Similarly, we need to remove the pointer's size assert for 32-bit .

@dginev
Copy link
Member

dginev commented Sep 29, 2020

As suggested by @simoin , I've dropped a few troublesome asserts in #78 , wouldn't call them "unnecessary", but definitely difficult to maintain for multiple architectures... I've done so only to the extent where the Appveyor CI can successfully pass tests on Windows, and just released a 0.2.15 minor version that anchors that.

So, if anyone wants to revisit here and file a better PR than my half-hearted #76, they should feel welcome.

@decathorpe
Copy link

I wonder, are the bindings themselves actually different between the different architectures, or is it just the tests (which hard-code architecture specific expected struct sizes and struct layout / field offsets)?

If the bindings themselves are architecture-independent but the generated bindgen tests hard-code information that depends on the host system, then the easiest solution would probably be to just wrap the tests in #[cfg(target_arch = $host_arch) (and I'm assuming that the host architecture is x86_64 here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants