cl-autowrap: c-including /usr/include/lzma/LzmaEnc.h fails

(autowrap:c-include "/usr/include/lzma/LzmaEnc.h") fails with error code 134 for me.

This is from freshly compiled branch clang-4.0.0.

https://pastebin.com/0TmJKZxz <- logs from running the c2ffi command manually. Last line:

c2ffi: /usr/lib/llvm-4.0/include/clang/AST/Expr.h:1532: llvm::StringRef clang::StringLiteral::getString() const: Assertion `CharByteWidth==1 && "This function is used in places that assume strings use char"' failed.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Just wanted to give you a heads-up - I’ve successfully wrapped my stuff with cl-autowrap and was able to use the foreign library successfully.

https://gist.github.com/phoe/8cfdcb4f34e0584c703f1751072a7813

LZMA> (apply #'lzma-decompress (multiple-value-list (lzma-compress #(1 2 3 4 5 6 7 8 9 0))))
#(1 2 3 4 5 6 7 8 9 0)
LZMA> (apply #'lzma-decompress (multiple-value-list (lzma-compress (make-array 100 :element-type '(unsigned-byte 8)))))
#(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)

Sorry for the delay, was out of town.

Probably not an LLVM issue. LLVM uses assertions for things like these if built with them. Will check it out.