We are preparing Ruby 3.4 [1] for Fedora and we have identifies that the package is going to break due to upstream change [2]. The specific error looks like: ~~~ ... snip ... gcc -I. -I/usr/include -I/usr/include/ruby/backward -I/usr/include -I. -DHAVE_TERMIOS_H -DHAVE_UNISTD_H -fPIC -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -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 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DOS_LINUX -m64 -o posix_serialport_impl.o -c posix_serialport_impl.c posix_serialport_impl.c: In function ‘get_fd_helper’: posix_serialport_impl.c:74:4: warning: ‘fd’ is deprecated: rb_io_descriptor [-Wdeprecated-declarations] 74 | return (fptr->fd); | ^~~~~~ In file included from serialport.h:26, from posix_serialport_impl.c:21: /usr/include/ruby/io.h:154:9: note: declared here 154 | int fd; | ^~ posix_serialport_impl.c: In function ‘sp_create_impl’: posix_serialport_impl.c:112:4: error: implicit declaration of function ‘NEWOBJ’ [-Wimplicit-function-declaration] 112 | NEWOBJ(sp, struct RFile); | ^~~~~~ posix_serialport_impl.c:112:11: error: ‘sp’ undeclared (first use in this function); did you mean ‘fp’? 112 | NEWOBJ(sp, struct RFile); | ^~ | fp posix_serialport_impl.c:112:11: note: each undeclared identifier is reported only once for each function it appears in posix_serialport_impl.c:112:15: error: expected expression before ‘struct’ 112 | NEWOBJ(sp, struct RFile); | ^~~~~~ posix_serialport_impl.c:170:4: warning: ‘fd’ is deprecated: rb_io_descriptor [-Wdeprecated-declarations] 170 | fp->fd = fd; | ^~ /usr/include/ruby/io.h:154:9: note: declared here 154 | int fd; | ^~ posix_serialport_impl.c:174:4: warning: ‘mode’ is deprecated: rb_io_mode [-Wdeprecated-declarations] 174 | fp->mode = FMODE_READWRITE | FMODE_SYNC; | ^~ /usr/include/ruby/io.h:158:9: note: declared here 158 | int mode; | ^~~~ posix_serialport_impl.c:177:1: warning: control reaches end of non-void function [-Wreturn-type] 177 | } | ^ make: *** [Makefile:252: posix_serialport_impl.o] Error 1 ~~~ And I wonder what is the future of this package, if it is worth of fixing, given upstream support [3]. So I thought I'll open this ticket as an early warning. [1] https://fedoraproject.org/wiki/Changes/Ruby_3.4 [2] https://bugs.ruby-lang.org/issues/20265 [3] https://github.com/hparra/ruby-serialport/discussions/77 Reproducible: Always
Just FTR, the tentative patch is here: https://bugs.ruby-lang.org/issues/20265#note-7
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle. Changing version to 42.