bugnyacc parser generator - Bugs: bug #56229, ffi-helper 0.92.0 issue w/ fdb

 
 

bug #56229: ffi-helper 0.92.0 issue w/ fdb

Submitter:  Matt Wette <mwette>
Submitted:  Sat 27 Apr 2019 08:25:53 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  mwette
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 15 Dec 2019 09:00:45 PM UTC, comment #4: 


verified pre-1.0 release

scheme@(guile-user)> ,use (nyacc lang c99 parser)
scheme@(guile-user)> (define code "#define /* fdb_error_t */ fdb_select_api_version(v) fdb_select_api_version_impl(v, FDB_API_VERSION) \nint foo() { return fdb_select_api_version(1); }")
scheme@(guile-user)> (with-input-from-string code parse-c99)
$1 = (trans-unit (fctn-defn (decl-spec-list (type-spec (fixed-type "int"))) (ftn-declr (ident "foo") (param-list)) (compd-stmt (block-item-list (return (fctn-call (p-expr (ident "fdb_select_api_version_impl")) (expr-list (p-expr (fixed "1")) (p-expr (ident "FDB_API_VERSION")))))))))
scheme@(guile-user)> ,pp $1
$2 = (trans-unit
  (fctn-defn
    (decl-spec-list (type-spec (fixed-type "int")))
    (ftn-declr (ident "foo") (param-list))
    (compd-stmt
      (block-item-list
        (return
          (fctn-call
            (p-expr (ident "fdb_select_api_version_impl"))
            (expr-list
              (p-expr (fixed "1"))
              (p-expr (ident "FDB_API_VERSION")))))))))
scheme@(guile-user)>

Matt Wette <mwette>
Group administrator
Sat 27 Apr 2019 09:13:01 PM UTC, comment #3: 

This will appear fixed in 0.93.

Matt Wette <mwette>
Group administrator
Sat 27 Apr 2019 08:50:15 PM UTC, comment #2: 

gcc accepts this.  I will see if I can accommodate it.

Matt Wette <mwette>
Group administrator
Sat 27 Apr 2019 08:40:03 PM UTC, comment #1: 

This has to do with the following code in fdb_c.h:

    #define /* fdb_error_t */ fdb_select_api_version(v) fdb_select_api_version_impl(v, FDB_API_VERSION)

I'm not sure that is legal C, with the comment between `define' and `fdb_select...'.  I am checking.

As a workaround, remove the comment.  Then guile compile-ffi works.

Matt Wette <mwette>
Group administrator
Sat 27 Apr 2019 08:25:53 PM UTC, original submission:  

Hello,


Using guix nyacc 0.86.0 I can not build the bindings based on
`ffi.ffi` module attached to this mail. The headers files are
also attached to this mail.

Here is the error I have:

  $ guild compile-ffi foundationdb/ffi.ffi
  ffi-help: WARNING: the FFI helper is experimental
  ERROR: In procedure string->symbol:
  In procedure string->symbol: Wrong type argument in position 1 (expecting string): #f

I also tried 0.92.0 I got the same error.

Can you help?


Amirouche ~ amz

Matt Wette <mwette>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #46838:  fdb.options added by mwette (27KiB - application/octet-stream)
file #46839:  fdb_c_options.g.h added by mwette (23KiB - text/x-chdr)
file #46840:  fdb_c.h added by mwette (12KiB - text/x-chdr)
file #46841:  ffi.ffi added by mwette (114B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mwette (Submitted the item)
  • -email is unavailable- added by mwette
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-15 mwette Open/ClosedOpen Closed
    2019-04-27 mwette StatusNone Fixed
    2019-04-27 mwette Attached File- Added fdb.options, #46838
        Attached File- Added fdb_c_options.g.h, #46839
        Attached File- Added fdb_c.h, #46840
        Attached File- Added ffi.ffi, #46841
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code