Bug 1827

Summary: Build fails with swig 4.1 the java bindings are enabled
Product: libsigrok Reporter: sigrok_bugzilla
Component: Bindings: SWIGAssignee: Nobody <nobody>
Status: CONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unreleased development snapshot   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: build log
possible fix

Description sigrok_bugzilla 2023-01-31 18:34:13 CET
Created attachment 788 [details]
build log

libsigrok-unreleased-1543-ge7c7aa11
swig 4.1.1

Summary of build commands and truncated output.  Full build log attached

../libsigrok/configure --prefix=/usr --enable-java --enable-ruby
....
make
....
  GEN      bindings/python/sigrok/core/doc_start.i
  GEN      bindings/java/org/sigrok/core/classes/doc.i
  GEN      bindings/python/sigrok/core/doc_end.i
  GEN      bindings/ruby/doc.i
  GEN      bindings/ruby/classes_wrap.cpp
  GEN      bindings/java/org/sigrok/core/classes/classes_wrap.cxx
bindings/swig/enums.i:1: Error: Unknown directive '%attribute'.
make[1]: *** [Makefile:5691: bindings/java/org/sigrok/core/classes/classes_wrap.cxx] Error 1
Comment 1 sigrok_bugzilla 2023-02-01 13:25:39 CET
Created attachment 789 [details]
possible fix

Limiting %include "swig/enums.i" to to the CXX bindings with #ifdef SWIGCXX allows the build to succeed.