Bug 1792787

Summary: libprelude fails to build with Python 3.9 (possibly unrelated)
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: libpreludeAssignee: Thomas Andrejak <thomas.andrejak>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, mail, mhroncok, thomas.andrejak, tscherf, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-27 21:20:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1785415    

Description Miro Hrončok 2020-01-20 00:10:08 UTC
libprelude fails to build with Python 3.9.0a2:

Prelude.cxx:1263:81: error: invalid conversion from 'void (*)(VALUE, ID, void*, rb_global_variable*)' {aka 'void (*)(long unsigned int, long unsigned int, void*, rb_global_variable*)'} to 'void (*)(...)' [-fpermissive]
 1263 |   rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", swig_ruby_trackings_count, (rb_gvar_setter_t *)NULL);
      |                                                                                 ^
      |                                                                                 |
      |                                                                                 void (*)(VALUE, ID, void*, rb_global_variable*) {aka void (*)(long unsigned int, long unsigned int, void*, rb_global_variable*)}
In file included from /usr/include/ruby.h:33,
                 from Prelude.cxx:879:
/usr/include/ruby/ruby.h:1779:63: note:   initializing argument 3 of 'void rb_define_virtual_variable(const char*, VALUE (*)(...), void (*)(...))'
 1779 | void rb_define_virtual_variable(const char*,VALUE(*)(ANYARGS),void(*)(ANYARGS));
      |                                                               ^~~~~~~~~~~~~~~~
Prelude.cxx: In function 'int IDMEFValue_to_SWIG(VALUE, const Prelude::IDMEFValue&, void*, VALUE*)':
Prelude.cxx:4644:58: warning: enum constant in boolean context [-Wint-in-bool-context]
 4644 |                 else if ( t == IDMEF_DATA_TYPE_UINT32 || IDMEF_DATA_TYPE_INT )
      |                                                          ^~~~~~~~~~~~~~~~~~~
Prelude.cxx: In instantiation of 'static Type swig::traits_as<Type, swig::pointer_category>::as(VALUE, bool) [with Type = Prelude::IDMEF; VALUE = long unsigned int]':
Prelude.cxx:3001:68:   required from 'Type swig::as(VALUE, bool) [with Type = Prelude::IDMEF; VALUE = long unsigned int]'
Prelude.cxx:3781:20:   required from 'swig::RubySequence_Ref<T>::operator T() const [with T = Prelude::IDMEF]'
Prelude.cxx:4180:30:   required from 'void swig::assign(const RubySeq&, Seq*) [with RubySeq = swig::RubySequence_Cont<Prelude::IDMEF>; Seq = std::vector<Prelude::IDMEF>]'
Prelude.cxx:4195:12:   required from 'static int swig::traits_asptr_stdseq<Seq, T>::asptr(VALUE, swig::traits_asptr_stdseq<Seq, T>::sequence**) [with Seq = std::vector<Prelude::IDMEF>; T = Prelude::IDMEF; VALUE = long unsigned int; swig::traits_asptr_stdseq<Seq, T>::sequence = std::vector<Prelude::IDMEF>]'
Prelude.cxx:4299:52:   required from 'static int swig::traits_asptr<std::vector<T> >::asptr(VALUE, std::vector<T>**) [with T = Prelude::IDMEF; VALUE = long unsigned int]'
Prelude.cxx:2890:37:   required from 'int swig::asptr(VALUE, Type**) [with Type = std::vector<Prelude::IDMEF>; VALUE = long unsigned int]'
Prelude.cxx:11049:37:   required from here
Prelude.cxx:2975:8: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class Prelude::IDMEF' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
 2975 |  memset(v_def,0,sizeof(Type));
      |  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from ../../bindings/c++/include/prelude-client.hxx:27,
                 from ../../bindings/c++/include/prelude.hxx:29,
                 from Prelude.cxx:2692:
../../bindings/c++/include/idmef.hxx:43:15: note: 'class Prelude::IDMEF' declared here
   43 |         class IDMEF {
      |               ^~~~~
Prelude.cxx: In instantiation of 'static Type swig::traits_as<Type, swig::pointer_category>::as(VALUE, bool) [with Type = Prelude::IDMEFValue; VALUE = long unsigned int]':
Prelude.cxx:3001:68:   required from 'Type swig::as(VALUE, bool) [with Type = Prelude::IDMEFValue; VALUE = long unsigned int]'
Prelude.cxx:3781:20:   required from 'swig::RubySequence_Ref<T>::operator T() const [with T = Prelude::IDMEFValue]'
Prelude.cxx:4180:30:   required from 'void swig::assign(const RubySeq&, Seq*) [with RubySeq = swig::RubySequence_Cont<Prelude::IDMEFValue>; Seq = std::vector<Prelude::IDMEFValue>]'
Prelude.cxx:4195:12:   required from 'static int swig::traits_asptr_stdseq<Seq, T>::asptr(VALUE, swig::traits_asptr_stdseq<Seq, T>::sequence**) [with Seq = std::vector<Prelude::IDMEFValue>; T = Prelude::IDMEFValue; VALUE = long unsigned int; swig::traits_asptr_stdseq<Seq, T>::sequence = std::vector<Prelude::IDMEFValue>]'
Prelude.cxx:4299:52:   required from 'static int swig::traits_asptr<std::vector<T> >::asptr(VALUE, std::vector<T>**) [with T = Prelude::IDMEFValue; VALUE = long unsigned int]'
Prelude.cxx:2890:37:   required from 'int swig::asptr(VALUE, Type**) [with Type = std::vector<Prelude::IDMEFValue>; VALUE = long unsigned int]'
Prelude.cxx:11127:37:   required from here
Prelude.cxx:2975:8: warning: 'void* memset(void*, int, size_t)' clearing an object of type 'class Prelude::IDMEFValue' with no trivial copy-assignment; use assignment or value-initialization instead [-Wclass-memaccess]
 2975 |  memset(v_def,0,sizeof(Type));
      |  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In file included from ../../bindings/c++/include/idmef.hxx:29,
                 from ../../bindings/c++/include/prelude-client.hxx:27,
                 from ../../bindings/c++/include/prelude.hxx:29,
                 from Prelude.cxx:2692:
../../bindings/c++/include/idmef-value.hxx:37:15: note: 'class Prelude::IDMEFValue' declared here
   37 |         class IDMEFValue {
      |               ^~~~~~~~~~
make[3]: *** [Makefile:1586: Prelude_la-Prelude.lo] Error 1
make[2]: *** [Makefile:1582: all-recursive] Error 1
make[1]: *** [Makefile:1669: all-recursive] Error 1
make: *** [Makefile:1534: all] Error 2

Currently, I have no idea what may cause this or whether it has to do with Python 3.9 at all

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01160569-libprelude/

For all our attempts to build libprelude with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/libprelude/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2020-01-20 00:17:11 UTC
(The package seems to build fine in regular rawhide.)

Comment 2 Ben Cotton 2020-02-11 17:33:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 3 Thomas Andrejak 2020-02-27 20:58:59 UTC
It is OK on my side, can you retry to build ?

Comment 4 Miro Hrončok 2020-02-27 21:20:54 UTC
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/libprelude/ says succeeded. Thanks.