Skip to content

version 3.25.5 fails to install with ruby 3.4.1 #19938

Closed
@nick-lawrence-ctm

Description

What version of protobuf and what language are you using?
Version: 3.25.5
Language: Ruby

What operating system (Linux, Windows, ...) and version?
Amazon Linux release 2023.6.20241212 (Amazon Linux)

What runtime / compiler are you using (e.g., python version or gcc version)
Ruby 3.4.1

What did you do?
Steps to reproduce the behavior:

  1. install ruby 3.4.1
  2. gem install google-protobuf -v 3.25.5

What did you expect to see
Successful installation of the gem.

What did you see instead?

$ gem install google-protobuf -v 3.25.5
Fetching google-protobuf-3.25.5.gem
Defaulting to user installation because default installation directory (/usr/lib64/ruby/gems/3.4.0) is not writable.
Building native extensions. This could take a while...
ERROR:  Error installing google-protobuf:
        ERROR: Failed to build gem native extension.

    current directory: /home/josh/.local/share/gem/ruby/3.4.0/gems/google-protobuf-3.25.5/ext/google/protobuf_c
/usr/bin/ruby extconf.rb
creating Makefile

current directory: /home/josh/.local/share/gem/ruby/3.4.0/gems/google-protobuf-3.25.5/ext/google/protobuf_c
make DESTDIR\= sitearchdir\=./.gem.20250109-38649-d55nt sitelibdir\=./.gem.20250109-38649-d55nt clean

current directory: /home/josh/.local/share/gem/ruby/3.4.0/gems/google-protobuf-3.25.5/ext/google/protobuf_c
make DESTDIR\= sitearchdir\=./.gem.20250109-38649-d55nt sitelibdir\=./.gem.20250109-38649-d55nt
compiling protobuf.c
compiling convert.c
convert.c: In function 'Msgval_IsEqual':
convert.c:295:58: warning: passing argument 4 of 'shared_Msgval_IsEqual' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  295 |                                             type_info.def.msgdef, &status);
      |                                             ~~~~~~~~~~~~~^~~~~~~
In file included from convert.c:21:
shared_convert.h:19:60: note: expected 'upb_MessageDef *' but argument is of type 'const upb_MessageDef *'
   19 |                            upb_CType type, upb_MessageDef* msgdef,
      |                                            ~~~~~~~~~~~~~~~~^~~~~~
convert.c:299:5: error: format not a string literal and no format arguments [-Werror=format-security]
  299 |     rb_raise(rb_eRuntimeError, upb_Status_ErrorMessage(&status));
      |     ^~~~~~~~
convert.c: In function 'Msgval_GetHash':
convert.c:308:41: warning: passing argument 3 of 'shared_Msgval_GetHash' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  308 |       val, type_info.type, type_info.def.msgdef, seed, &status);
      |                            ~~~~~~~~~~~~~^~~~~~~
In file included from convert.c:21:
shared_convert.h:23:48: note: expected 'upb_MessageDef *' but argument is of type 'const upb_MessageDef *'
   23 |                                upb_MessageDef* msgdef, uint64_t seed,
      |                                ~~~~~~~~~~~~~~~~^~~~~~
convert.c:312:5: error: format not a string literal and no format arguments [-Werror=format-security]
  312 |     rb_raise(rb_eRuntimeError, upb_Status_ErrorMessage(&status));
      |     ^~~~~~~~
cc1: some warnings being treated as errors
make: *** [Makefile:251: convert.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/josh/.local/share/gem/ruby/3.4.0/gems/google-protobuf-3.25.5 for inspection.
Results logged to /home/josh/.local/share/gem/ruby/3.4.0/extensions/aarch64-linux/3.4.0/google-protobuf-3.25.5/gem_make.out

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions