[Bug 269144] databases/ruby-qdbm: Fix build with Ruby 3.1 and 12.3-RELEASE

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 25 Jan 2023 03:02:25 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269144

            Bug ID: 269144
           Summary: databases/ruby-qdbm: Fix build with Ruby 3.1 and
                    12.3-RELEASE
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: hrs@FreeBSD.org
          Reporter: yasu@freebsd.org
            Blocks: 268586
          Assignee: hrs@FreeBSD.org
             Flags: maintainer-feedback?(hrs@FreeBSD.org)

Created attachment 239693
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=239693&action=edit
Patch file

Fix build with Ruby 3.1 and 12.3-RELEASE.

===>  Configuring for ruby31-qdbm-1.8.78_4
configure: loading site script /usr/ports/Templates/config.site
checking for gcc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking for main in -lqdbm... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir
setting
cd /wrkdirs/usr/ports/databases/ruby-qdbm/work/qdbm-1.8.78/ruby && /usr/bin/env
RB_USER_INSTALL=yes CFLAGS="-O2 -pipe  -I/usr/local/include -DLIBICONV_PLUG
-fstack-protector-strong -fno-strict-aliasing " LDFLAGS=" -L/usr/local/lib
-fstack-protector-strong "  LOCALBASE="/usr/local"
XDG_DATA_HOME=/wrkdirs/usr/ports/databases/ruby-qdbm/work 
XDG_CONFIG_HOME=/wrkdirs/usr/ports/databases/ruby-qdbm/work 
XDG_CACHE_HOME=/wrkdirs/usr/ports/databases/ruby-qdbm/work/.cache 
HOME=/wrkdirs/usr/ports/databases/ruby-qdbm/work TMPDIR="/tmp"
PATH=/wrkdirs/usr/ports/databases/ruby-qdbm/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/nonexistent/bin
PKG_CONFIG_LIBDIR=/wrkdirs/usr/ports/databases/ruby-qdbm/work/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig
MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES
PREFIX=/usr/local  LOCALBASE=/usr/local  CC="cc" CFLAGS="-O2 -pipe 
-I/usr/local/include -DLIBICONV_PLUG -fstack-protector-strong
-fno-strict-aliasing "  CPP="cpp" CPPFLAGS="-DLIBICONV_PLUG"  LDFLAGS="
-L/usr/local/lib -fstack-protector-strong " LIBS=""  CXX="c++" CXXFLAGS="-O2
-pipe -I/usr/local/include -DLIBICONV_PLUG -fstack-protector-strong
-fno-strict-aliasing  -DLIBICONV_PLUG "  MANPREFIX="/usr/local"
BSD_INSTALL_PROGRAM="install  -s -m 555"  BSD_INSTALL_LIB="install  -s -m 0644"
 BSD_INSTALL_SCRIPT="install  -m 555"  BSD_INSTALL_DATA="install  -m 0644" 
BSD_INSTALL_MAN="install  -m 444"  /usr/bin/make configure
for d in depot curia villa; do  (cd $d && /usr/local/bin/ruby extconf.rb); 
done
checking for main() in -lc... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/local/bin/$(RUBY_BASE_NAME)31
        --with-depot-dir
        --without-depot-dir
        --with-depot-include
        --without-depot-include=${depot-dir}/include
        --with-depot-lib
        --without-depot-lib=${depot-dir}/lib
        --with-c-dir
        --without-c-dir
        --with-c-include
        --without-c-include=${c-dir}/include
        --with-c-lib
        --without-c-lib=${c-dir}/lib
        --with-clib
        --without-clib
/usr/local/lib/ruby/3.1/mkmf.rb:490:in `try_do': The compiler failed to
generate an executable file. (RuntimeError)
You have to install development tools first.
        from /usr/local/lib/ruby/3.1/mkmf.rb:583:in `try_link0'
        from /usr/local/lib/ruby/3.1/mkmf.rb:601:in `try_link'
        from /usr/local/lib/ruby/3.1/mkmf.rb:812:in `try_func'
        from /usr/local/lib/ruby/3.1/mkmf.rb:1062:in `block in have_library'
        from /usr/local/lib/ruby/3.1/mkmf.rb:989:in `block in checking_for'
        from /usr/local/lib/ruby/3.1/mkmf.rb:354:in `block (2 levels) in
postpone'
        from /usr/local/lib/ruby/3.1/mkmf.rb:324:in `open'
        from /usr/local/lib/ruby/3.1/mkmf.rb:354:in `block in postpone'
        from /usr/local/lib/ruby/3.1/mkmf.rb:324:in `open'
        from /usr/local/lib/ruby/3.1/mkmf.rb:350:in `postpone'
        from /usr/local/lib/ruby/3.1/mkmf.rb:988:in `checking_for'
        from /usr/local/lib/ruby/3.1/mkmf.rb:1057:in `have_library'
        from extconf.rb:9:in `<main>'
*** Error code 1

Stop.
make[1]: stopped in
/wrkdirs/usr/ports/databases/ruby-qdbm/work/qdbm-1.8.78/ruby
*** Error code 1

Stop.
make: stopped in /usr/ports/databases/ruby-qdbm


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268586
[Bug 268586] [exp-run] Mk/bsd.default-versions.mk: Change default version of
Ruby
-- 
You are receiving this mail because:
You are the assignee for the bug.