distribution icon indicating copy to clipboard operation
distribution copied to clipboard

ruby update

Open K1ngfish3r opened this issue 1 year ago • 5 comments

some updates for ruby package + bundle - for-review.txt

autospec notes remove build_prepend add libffi-dev to buildreq_add add /usr/lib64/ruby/gems/*/specifications/default/win32ole-*.gemspec to excludes configure

--prefix=/usr
--enable-shared
--disable-rpath
--with-dbm-type=gdbm_compat
--without-git
--with-compress-debug-sections=no
--enable-mkmf-verbose

for bundle, please add devpkg-libffi, devpkg-valgrind and (need to create) devpkg-yaml.

K1ngfish3r avatar Nov 20 '24 22:11 K1ngfish3r

can you give half a sentence or so describing what this brings ?

On Wed, Nov 20, 2024 at 2:27 PM K1ngfish3r @.***> wrote:

some updates for ruby package + bundle - for-review.txt https://gist.github.com/K1ngfish3r/5aecc34f3e784459ed2d57a5703d645c

autospec notes remove build_prepend add libffi-dev to buildreq_add configure

--prefix=/usr --enable-shared --disable-rpath --with-dbm-type=gdbm_compat --without-git --with-compress-debug-sections=no --enable-mkmf-verbose

for bundle, please add devpkg-libffi, devpkg-valgrind and (need to create) devpkg-yaml.

— Reply to this email directly, view it on GitHub https://github.com/clearlinux/distribution/issues/3209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ54FPROJMB6KRZ67OJDAD2BUEERAVCNFSM6AAAAABSFTWUNCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGY3TOMZWGE2DINI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fenrus75 avatar Nov 20 '24 22:11 fenrus75

basically, I ran into a couple of issues trying to install and run the default gems provided, so this would make the out of the box experience as bug-free as I could after some searching and consulting in the ruby discord

win32ole is a gem that is windows only and is not supposed to be on a linux install so I removed it from the gemspec (src.fedora also comments it out)

as for the configure file, I removed options which are obsolete since they were removed from ruby, and added some from src.fedora. I didnt remove the others which were still relevant

so overall, is a cleaning?

K1ngfish3r avatar Nov 21 '24 06:11 K1ngfish3r

The need for devpkg-yaml is due to psych, which requires it to build its C component:

$ sudo gem update
Updating installed gems
Updating psych
Building native extensions. This could take a while...
ERROR:  Error installing psych:
	ERROR: Failed to build gem native extension.

    current directory: /usr/lib64/ruby/gems/3.4.0/gems/psych-5.2.3/ext/psych
/usr/bin/ruby extconf.rb
checking for pkg-config for yaml-0.1... not found
checking for yaml.h... no
yaml.h not found
*** 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=${opt-dir}/include
	--without-opt-include
	--with-opt-lib=${opt-dir}/lib64
	--without-opt-lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/bin/$(RUBY_BASE_NAME)
	--with-libyaml-source-dir
	--without-libyaml-source-dir
	--with-yaml-0.1-dir
	--without-yaml-0.1-dir
	--with-yaml-0.1-include=${yaml-0.1-dir}/include
	--without-yaml-0.1-include
	--with-yaml-0.1-lib=${yaml-0.1-dir}/lib64
	--without-yaml-0.1-lib
	--with-yaml-0.1-config
	--without-yaml-0.1-config
	--with-pkg-config
	--without-pkg-config
	--with-libyaml-dir
	--without-libyaml-dir
	--with-libyaml-include=${libyaml-dir}/include
	--without-libyaml-include
	--with-libyaml-lib=${libyaml-dir}/lib64
	--without-libyaml-lib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /usr/lib64/ruby/gems/3.4.0/extensions/x86_64-linux-gnu/3.4.0/psych-5.2.3/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/lib64/ruby/gems/3.4.0/gems/psych-5.2.3 for inspection.
Results logged to /usr/lib64/ruby/gems/3.4.0/extensions/x86_64-linux-gnu/3.4.0/psych-5.2.3/gem_make.out
Gems updated: psych

Zopolis4 avatar Mar 11 '25 03:03 Zopolis4

In regards to the win32ole exclude:

~> sudo gem update
Updating installed gems
Updating win32ole
Building native extensions. This could take a while...
ERROR:  Error installing win32ole:
	ERROR: Failed to build gem native extension.

    current directory: /usr/lib64/ruby/gems/3.4.0/gems/win32ole-1.9.2/ext/win32ole
/usr/bin/ruby extconf.rb
checking for -lole32... no
*** 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=${opt-dir}/include
	--without-opt-include
	--with-opt-lib=${opt-dir}/lib64
	--without-opt-lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/usr/bin/$(RUBY_BASE_NAME)
	--with-win32-dir
	--without-win32-dir
	--with-win32-include=${win32-dir}/include
	--without-win32-include
	--with-win32-lib=${win32-dir}/lib64
	--without-win32-lib
	--with-ole32-dir
	--without-ole32-dir
	--with-ole32-include=${ole32-dir}/include
	--without-ole32-include
	--with-ole32-lib=${ole32-dir}/lib64
	--without-ole32-lib
	--with-ole32lib
	--without-ole32lib

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /usr/lib64/ruby/gems/3.4.0/extensions/x86_64-linux-gnu/3.4.0/win32ole-1.9.2/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /usr/lib64/ruby/gems/3.4.0/gems/win32ole-1.9.2 for inspection.
Results logged to /usr/lib64/ruby/gems/3.4.0/extensions/x86_64-linux-gnu/3.4.0/win32ole-1.9.2/gem_make.out
Gems updated: win32ole

This has been accompanying every gem update I run for the past few months now.

(I know clear linux is discontinued, so this is more for the sake of posterity/future documentation, and also the github hasn't been archived yet despite the annoucement saying it would be)

Zopolis4 avatar Aug 02 '25 00:08 Zopolis4

The easiest way to deal with this error is to delete this file. /usr/lib64/ruby/gems/*/specifications/default/win32ole-*.gemspec. The error instantly goes away and you don't have to worry about it anymore

If you want to do it properly, you can try and locally autospec the changes I wrote in OP. But probably not required

K1ngfish3r avatar Aug 02 '25 07:08 K1ngfish3r