Re: Update on the Modern C initiative

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Dne 02. 12. 23 v 17:42 Florian Weimer napsal(a):
* Vít Ondruch:

Dne 01. 12. 23 v 11:40 Milan Crha napsal(a):
On Thu, 2023-11-30 at 18:09 +0100, Florian Weimer wrote:
Again, some of these are false positives.
	Hi,
I think the errors from the configure time of the script are not always
problems, are they?

This probably falls into the configuration bucket:

https://gitlab.com/fweimer-rh/fedora-modernc-logs/-/blob/main/logs/r/rubygem-ruby-libvirt.log?ref_type=heads

But I don't even know where GCC digs up the issues.
It looks like the GCC output lands in this file:

ruby-libvirt-0.7.1/usr/lib64/gems/ruby/ruby-libvirt-0.7.1/mkmf.log

I have not seen that one before, so the log dumper in the buildroot
instrumentation does not cover it, sorry.

The failures look like this:

“
LD_LIBRARY_PATH=.:/usr/lib64 "gcc -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I.     -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64   -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  -fPIC  -m64  -c conftest.c"
conftest.c:8:16: error: initialization of ‘int’ from ‘char *’ makes integer from pointer without a cast
     8 | static int t = VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES;
       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/libvirt/libvirt.h:35,
                  from conftest.c:5:
conftest.c:8:16: error: initializer element is not computable at load time
     8 | static int t = VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES;
       |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
conftest.c:8:12: warning: ‘t’ defined but not used [-Wunused-variable]
     8 | static int t = VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES;
       |            ^
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include "ruby.h"
4:
5: #include <libvirt/libvirt.h>
6:
7: /*top*/
8: static int t = VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES;
/* end */
”

Looking at the Ruby MakeMakefile documention:

<https://docs.ruby-lang.org/en/master/MakeMakefile.html#method-i-have_const>

I think you need to supply a type for these constants and call
have_const like this:

   have_const(["VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES",
               "const char *"], ["libvirt/virterror.h"])

Does this help?  I'm not a Ruby programmer, so I'm not even sure if I
got the list syntax right …


Forwarded to upstream:

https://gitlab.com/libvirt/libvirt-ruby/-/issues/8

I'll look again into this unless I hear back from upstream.


Vít



Thanks,
Florian

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux