Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error for nokogiri 1.14.5 with GCC 13 on RISC-V #19193

Closed
Xeonacid opened this issue May 22, 2024 · 3 comments · Fixed by #19195
Closed

Build error for nokogiri 1.14.5 with GCC 13 on RISC-V #19193

Xeonacid opened this issue May 22, 2024 · 3 comments · Fixed by #19195
Labels

Comments

@Xeonacid
Copy link

Steps to reproduce

  1. Build following the Setting Up a Metasploit Development Environment page, with GCC 13 on Arch Linux RISC-V

Were you following a specific guide/tutorial or reading documentation?

Setting Up a Metasploit Development Environment

Expected behavior

Build successfully.

Current behavior

test_global_handlers.c: In function ‘rb_foreign_error_handler’:
test_global_handlers.c:24:35: error: passing argument 2 of ‘xmlSetStructuredErrorFunc’ from incompatible pointer type
[-Wincompatible-pointer-types]
   24 |   xmlSetStructuredErrorFunc(NULL, foreign_error_handler);
      |                                   ^~~~~~~~~~~~~~~~~~~~~
      |                                   |
      |                                   void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)}
In file included from /usr/include/libxml2/libxml/valid.h:15,
                 from /usr/include/libxml2/libxml/parser.h:19,
                 from ./nokogiri.h:35,
                 from test_global_handlers.c:1:
/usr/include/libxml2/libxml/xmlerror.h:898:57: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but
argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’}
  898 |                                  xmlStructuredErrorFunc handler);
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
make: *** [Makefile:246: test_global_handlers.o] Error 1

I saw nokogiri is locked to '~> 1.14.0'. Wondering is there any way to upgrade since nokogiri fixed the error in sparklemotion/nokogiri@cdc2150, released since 1.16.0.

Metasploit version

Get this with the version command in msfconsole (or git log -1 --pretty=oneline for a source install).

Framework: 6.4.7-dev
Console  : 6.4.7-dev
@Xeonacid Xeonacid added the bug label May 22, 2024
@adfoster-r7
Copy link
Contributor

I've put up a PR to unpin this and verify that it doesn't cause any issues in our CI pipeline. We previously had issues in the past, but I've updated some of the tooling since then - so we'll have to see what the result is 👍

@adfoster-r7
Copy link
Contributor

Seems like it should be good to go; Does applying this patch and running a fresh bundle install work for you on risc-v? #19195

@Xeonacid
Copy link
Author

Seems like it should be good to go; Does applying this patch and running a fresh bundle install work for you on risc-v? #19195

Sure! It works fine with the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants