Bug 1222272

Summary: openwsman fails to build with the new swig update
Product: [openSUSE] PUBLIC SUSE Linux Enterprise Server 15 SP6 Reporter: Lubos Kocman <lubos.kocman>
Component: OtherAssignee: Klaus Kämpf <kkaempf>
Status: RESOLVED FIXED QA Contact:
Severity: Normal    
Priority: P5 - None    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: build log
Patch for newer Swig versions

Description Lubos Kocman 2024-04-03 10:09:17 UTC
Created attachment 874025 [details]
build log

openswan doesn't seem to build with swig 4.2.1 update which was requested in https://jira.suse.com/browse/PED-7004

length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fno-strict-aliasing -fPIC -MD -MT bindings/ruby/CMakeFiles/rbwsman.dir/openwsman_wrap.c.o -MF CMakeFiles/rbwsman.dir/openwsman_wrap.c.o.d -o CMakeFiles/rbwsman.dir/openwsman_wrap.c.o -c /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:3842:19: error: static declaration of 'SwigClassXmlDoc' follows non-static declaration
[   58s]  static swig_class SwigClassXmlDoc;
[   58s]                    ^~~~~~~~~~~~~~~
[   58s] In file included from /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:2071:0:
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:2732:16: note: previous declaration of 'SwigClassXmlDoc' was here
[   58s]      KLASS_DECL(SwigClassXmlDoc,SWIGTYPE_p__WsXmlDoc);
[   58s]                 ^
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/bindings/ruby/helpers.h:54:43: note: in definition of macro 'KLASS_DECL'
[   58s]  #define KLASS_DECL(k,t) extern swig_class k
[   58s]                                            ^
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:4303:19: error: static declaration of 'SwigClassXmlNode' follows non-static declaration
[   58s]  static swig_class SwigClassXmlNode;
[   58s]                    ^~~~~~~~~~~~~~~~
[   58s] In file included from /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:2071:0:
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:2731:16: note: previous declaration of 'SwigClassXmlNode' was here
[   58s]      KLASS_DECL(SwigClassXmlNode,SWIGTYPE_p___WsXmlNode);
[   58s]                 ^
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/bindings/ruby/helpers.h:54:43: note: in definition of macro 'KLASS_DECL'
[   58s]  #define KLASS_DECL(k,t) extern swig_class k
[   58s]                                            ^
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:5628:19: error: static declaration of 'SwigClassEndPointReference' follows non-static declaration
[   58s]  static swig_class SwigClassEndPointReference;
[   58s]                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
[   58s] In file included from /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:2071:0:
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:3425:16: note: previous declaration of 'SwigClassEndPointReference' was here
[   58s]      KLASS_DECL(SwigClassEndPointReference,SWIGTYPE_p_epr_t);
[   58s]                 ^
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/bindings/ruby/helpers.h:54:43: note: in definition of macro 'KLASS_DECL'
[   58s]  #define KLASS_DECL(k,t) extern swig_class k
[   58s]                                            ^
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:8191:19: error: static declaration of 'SwigClassTransport' follows non-static declaration
[   58s]  static swig_class SwigClassTransport;
[   58s]                    ^~~~~~~~~~~~~~~~~~
[   58s] In file included from /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build/bindings/ruby/openwsman_wrap.c:2071:0:
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/bindings/ruby/helpers.h:194:16: note: previous declaration of 'SwigClassTransport' was here
[   58s]      KLASS_DECL(SwigClassTransport,SWIGTYPE_p__WsManTransport);
[   58s]                 ^
[   58s] /home/abuild/rpmbuild/BUILD/openwsman-2.6.7/bindings/ruby/helpers.h:54:43: note: in definition of macro 'KLASS_DECL'
[   58s]  #define KLASS_DECL(k,t) extern swig_class k
[   58s]                                            ^
[   58s] make[2]: *** [bindings/ruby/CMakeFiles/rbwsman.dir/build.make:86: bindings/ruby/CMakeFiles/rbwsman.dir/openwsman_wrap.c.o] Error 1
[   58s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build'
[   58s] make[1]: *** [CMakeFiles/Makefile2:1649: bindings/ruby/CMakeFiles/rbwsman.dir/all] Error 2
[   58s] make[1]: Leaving directory '/home/abuild/rpmbuild/BUILD/openwsman-2.6.7/build'
[   58s] make: *** [Makefile:169: all] Error 2
[   58s] error: Bad exit status from /var/tmp/rpm-tmp.WHsJuK (%build)
[   58s] 
[   58s]
Comment 3 Lubos Kocman 2024-04-03 10:15:50 UTC
Sorry for intial confusion with openwsman (correct) vs openswan (incorrect)
Comment 5 Klaus Kämpf 2024-04-03 12:22:24 UTC
(In reply to Lubos Kocman from comment #4)
> rebuild experiment
> https://build.opensuse.org/project/show/home:lkocman:branches:
> systemsmanagement:wbem

This is confusing. It shows that 'latest openwsman' + 'latest swig' work nicely together. Which is similar to openwsman's devel project building against Tumbleweed.
Comment 6 Klaus Kämpf 2024-04-04 12:58:05 UTC
Created attachment 874070 [details]
Patch for newer Swig versions

https://build.suse.de/request/show/325382
Comment 7 Klaus Kämpf 2024-04-04 12:58:27 UTC
considered fixed