Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problem with ruby [solved]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Wed Nov 14, 2018 6:50 am    Post subject: Reply with quote

kaetahr welcome to gentoo forum!
the problem is a issue with profile (https://bugs.gentoo.org/671064) now resolved.
Re-sync the tree end try again probably you don't need emerge -UD @world
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
lik
n00b
n00b


Joined: 14 Nov 2018
Posts: 3

PostPosted: Wed Nov 14, 2018 10:40 am    Post subject: Reply with quote

Looks like bug 671064 introduced new issue. I have RUBY_TARGETS defined in make.conf and recently started to receive error message:

Code:
# grep RUBY_TARGETS /etc/portage/make.conf
RUBY_TARGETS="${RUBY_TARGETS} ruby24 ruby25"

# emerge --info | grep RUBY_TARGETS
Invalid '-' operator in non-incremental variable 'RUBY_TARGETS': '-ruby24'
RUBY_TARGETS="ruby23 ruby24 ruby25"


Error message appears even in case 'ruby24 ruby25' omitted:
Code:
RUBY_TARGETS="${RUBY_TARGETS}"


Finally, no error message in case RUBY_TARGETS is not set in make.conf:

Code:

# emerge --info | grep RUBY_TARGETS
RUBY_TARGETS="ruby23"


Last edited by lik on Wed Nov 14, 2018 11:32 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Wed Nov 14, 2018 11:12 am    Post subject: Reply with quote

lik you right.
I'm not sure if add RUBY_TARGETS="${RUBY_TARGETS}" in make.conf is correct way (in wiki no reference).

I don't know why entry ruby_targets_ruby24 profile arch/amd64/use.stable.mask doesn't work.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
lik
n00b
n00b


Joined: 14 Nov 2018
Posts: 3

PostPosted: Wed Nov 14, 2018 12:01 pm    Post subject: Reply with quote

Use the same notation for PYTHON_TARGETS and USE without issues:

Code:

/etc/portage/make.conf:

PYTHON_TARGETS="${PYTHON_TARGETS} python3_6"
USE="idn threads laptop gtk3 java alsa xinerama"
USE="${USE} -handbook -geolocation -systemd"
USE="${USE} custom-cflags optimized-qmake custom-optimization"


PYTHON_TARGETS="${PYTHON_TARGETS}" also does not trigger error.

Just checked and can confirm, that there is no error message in case of expanded list:

Code:
RUBY_TARGETS="ruby23 ruby24 ruby25"


Strange, I use this type of notation for quite a long time and until today did not face any issues. Something changed with RUBY_TARGETS in incompatible way with this bug anyway.
Back to top
View user's profile Send private message
lik
n00b
n00b


Joined: 14 Nov 2018
Posts: 3

PostPosted: Wed Nov 14, 2018 12:07 pm    Post subject: Reply with quote

Other combinations also trigger error message:

Code:

/etc/portage/make.conf:

RUBY_TARGETS="-ruby23 -ruby24 ruby25"

# emerge --info | grep RUBY_TARGETS
Invalid '-' operator in non-incremental variable 'RUBY_TARGETS': '-ruby23'
Invalid '-' operator in non-incremental variable 'RUBY_TARGETS': '-ruby24'


So, the question is:

When and why RUBY_TARGETS became non-incremental variable?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Wed Nov 14, 2018 3:18 pm    Post subject: Reply with quote

lik wrote:
When and why RUBY_TARGETS became non-incremental variable?

Maybe a portage bug? Also ruby_targets_ruby24 in arch/amd64/use.stable.mask is not triggered in a stable system, because current result is:
Code:
# emerge -pvq racc
[ebuild   R   ] dev-ruby/racc-1.4.14  USE="-doc -test" RUBY_TARGETS="ruby23 -ruby24 -ruby25"

but expected would be
Code:
# emerge -pvq racc
[ebuild   R   ] dev-ruby/racc-1.4.14  USE="-doc -test" RUBY_TARGETS="ruby23 (-ruby24) -ruby25

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Muso
Veteran
Veteran


Joined: 22 Oct 2002
Posts: 1052
Location: The Holy city of Honolulu

PostPosted: Wed Nov 14, 2018 4:59 pm    Post subject: Reply with quote

Two questions.

1. I have both ruby 2.3 and 2.4 installed :
Code:
eselect ruby list
Available Ruby profiles:
  [1]   ruby23 (with Rubygems)
  [2]   ruby24 *


emerge -uUD @world want to rebuild app-text/ronn-0.7.3-r3 with RUBY_TARGETS="-ruby24*"

This build fails :
Code:
Emerging (1 of 1) app-text/ronn-0.7.3-r3::gentoo
 * ronn-0.7.3.gem BLAKE2B SHA512 size ;-) ...                                                                                         [ ok ]
>>> Unpacking source...
 * Running unpack phase for all ...
 * Unpacking .gem file... ...                                                                                                         [ ok ]
 * Uncompressing metadata ...                                                                                                         [ ok ]
 * Unpacking data.tar.gz ...                                                                                                          [ ok ]
>>> Source unpacked in /var/tmp/portage/app-text/ronn-0.7.3-r3/work
>>> Preparing source in /var/tmp/portage/app-text/ronn-0.7.3-r3/work ...
 * Running prepare phase for all ...
 * Running source copy phase for ruby23 ...
 * Running prepare phase for ruby23 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-text/ronn-0.7.3-r3/work ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-text/ronn-0.7.3-r3/work ...
 * Running compile phase for all ...
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2018-12-01.
Gem::Specification#has_rdoc= called from (eval):92.
ronn -w -s toc -r5 --markdown man/*.ronn
/usr/lib64/ruby/2.3.0/x86_64-linux/rbconfig.rb:9:in `<module:RbConfig>': ruby lib version (2.3.8) doesn't match executable version (2.4.5) (RuntimeError)
   from /usr/lib64/ruby/2.3.0/x86_64-linux/rbconfig.rb:7:in `<top (required)>'
   from /usr/lib64/ruby/site_ruby/2.3.0/rubygems.rb:9:in `require'
   from /usr/lib64/ruby/site_ruby/2.3.0/rubygems.rb:9:in `<top (required)>'
   from <internal:gem_prelude>:4:in `require'
   from <internal:gem_prelude>:4:in `<internal:gem_prelude>'
rake aborted!
Command failed with status (1): [ronn -w -s toc -r5 --markdown man/*.ronn...]
/var/tmp/portage/app-text/ronn-0.7.3-r3/work/all/ronn-0.7.3/Rakefile:50:in `block in <top (required)>'
Tasks: TOP => man


Switching profiles to ruby 2.4 does not ask for a rebuild with ronn. I'm not sure what I need to do to fix this issue, or if it even is an issue at all.

Second question

When running eselect ruby 2.4 I get the following message :
Code:
eselect ruby set 2                                                   
!!! Warning: Could not set gem symlink
It appears you do not have RubyGems installed for this profile.
If you need RubyGems, emerge dev-ruby/rubygems with the appropriate RUBY_TARGETS setting.

Successfully switched to profile:
  ruby24


Can I install rubygems on 2.4 as well as 2.3?
_________________
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Wed Nov 14, 2018 5:02 pm    Post subject: Reply with quote

Muso,
you are in a stable or unstable system?
If you are in a stable system you have unmasked ruby24 for some reason?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Muso
Veteran
Veteran


Joined: 22 Oct 2002
Posts: 1052
Location: The Holy city of Honolulu

PostPosted: Wed Nov 14, 2018 5:04 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Muso,
you are in a stable or unstable system?
If you are in a stable system you have unmasked ruby24 for some reason?


~amd64

I'm assuming most of the 2.3 was pulled in because of metasploit and other similar tools.

To clarify on the ronn failure, emerge --sync && emerge -uUD @world had around 130 packages to rebuild, nearly all were ruby. Only 2 failed, ronn and another, but that one was just missing a manifest, so easy fix.
_________________
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop!


Last edited by Muso on Wed Nov 14, 2018 5:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Wed Nov 14, 2018 5:09 pm    Post subject: Reply with quote

Try to running
Code:
# emerge -UD --with-bdeps y @world

because seems that not all packages with RUBY_TARGETS are compiled with ruby24
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Muso
Veteran
Veteran


Joined: 22 Oct 2002
Posts: 1052
Location: The Holy city of Honolulu

PostPosted: Wed Nov 14, 2018 5:16 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Try to running
Code:
# emerge -UD --with-bdeps y @world

because seems that not all packages with RUBY_TARGETS are compiled with ruby24


Code:
emerge -UDp --with-bdeps y @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-text/ronn-0.7.3-r3  RUBY_TARGETS="-ruby24*"

!!! The following installed packages are masked:
- x11-libs/gksu-2.0.2-r2::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Pacho Ramos <pacho@gentoo.org> (11 Nov 2018)
# Dead for years (#425156) with security issues (#534540). Removal in a
# month.

- x11-libs/libgksu-2.0.12-r4::gentoo (masked by: package.mask)
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.

╭─root@Otherness ~ 
╰─# eselect ruby set 2               
!!! Warning: Could not set gem symlink
It appears you do not have RubyGems installed for this profile.
If you need RubyGems, emerge dev-ruby/rubygems with the appropriate RUBY_TARGETS setting.

Successfully switched to profile:
  ruby24
╭─root@Otherness ~ 
╰─# emerge -UDp --with-bdeps y @world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] app-text/ronn-0.7.3-r3  RUBY_TARGETS="-ruby24*"

!!! The following installed packages are masked:
- x11-libs/gksu-2.0.2-r2::gentoo (masked by: package.mask)
/usr/portage/profiles/package.mask:
# Pacho Ramos <pacho@gentoo.org> (11 Nov 2018)
# Dead for years (#425156) with security issues (#534540). Removal in a
# month.

- x11-libs/libgksu-2.0.12-r4::gentoo (masked by: package.mask)
For more information, see the MASKED PACKAGES section in the emerge
man page or refer to the Gentoo Handbook.


With ruby eselected to 2 it failed, but switching back to 1 worked. Very odd, but now solved.

Thank you, very much, fedeliallalinea
_________________
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop!
Back to top
View user's profile Send private message
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 328
Location: Minsk, Belarus

PostPosted: Mon Nov 19, 2018 6:21 am    Post subject: Reply with quote

well now ruby 24 works but with ruby 25, we get:
Code:
 sudo emerge --ask --update --changed-use --deep @world

These are the packages that would be merged, in order:

Calculating dependencies... done!

The following keyword changes are necessary to proceed:
 (see "package.accept_keywords" in the portage(5) man page for more details)
# required by dev-ruby/rdoc-6.0.4::gentoo[ruby_targets_ruby25]
# required by dev-lang/ruby-2.3.8::gentoo[rdoc]
# required by dev-ruby/mail-2.7.0::gentoo[ruby_targets_ruby23]
# required by @selected
# required by @world (argument)
=dev-lang/ruby-2.5.3 ~amd64

Would you like to add these changes to your config files? [Yes/No] n

 * In order to avoid wasting time, backtracking has terminated early
 * due to the above autounmask change(s). The --autounmask-backtrack=y
 * option can be used to force further backtracking, but there is no
 * guarantee that it will produce a solution.

emerge: there are no ebuilds to satisfy ">dev-ruby/racc-1.4.10[ruby_targets_ruby25]".
(dependency required by "dev-ruby/rdoc-6.0.4::gentoo[ruby_targets_ruby25]" [ebuild])
(dependency required by "dev-lang/ruby-2.3.8::gentoo[rdoc]" [installed])
(dependency required by "dev-ruby/mail-2.7.0::gentoo[ruby_targets_ruby23]" [installed])
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])


after adding:
=dev-lang/ruby-2.5.3 ~amd64

Code:
$ sudo emerge --ask --update --changed-use --deep @world

These are the packages that would be merged, in order:

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy ">dev-ruby/racc-1.4.10[ruby_targets_ruby25]".
(dependency required by "dev-ruby/rdoc-6.0.4::gentoo[ruby_targets_ruby25]" [ebuild])
(dependency required by "dev-lang/ruby-2.3.8::gentoo[rdoc]" [installed])
(dependency required by "dev-ruby/mail-2.7.0::gentoo[ruby_targets_ruby23]" [installed])
(dependency required by "@selected" [set])
(dependency required by "@world" [argument])

_________________
Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Mon Nov 19, 2018 6:27 am    Post subject: Reply with quote

you don't have to unmask ruby25, the problem is another.
Post output of command emerge -pv dev-ruby/rdoc
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 328
Location: Minsk, Belarus

PostPosted: Mon Nov 19, 2018 6:37 am    Post subject: Reply with quote

sudo emerge -pv dev-ruby/rdoc

These are the packages that would be merged, in order:

Calculating dependencies... done!

emerge: there are no ebuilds to satisfy ">dev-ruby/racc-1.4.10[ruby_targets_ruby25]".
(dependency required by "dev-ruby/rdoc-6.0.4::gentoo[ruby_targets_ruby25]" [ebuild])
(dependency required by "dev-ruby/rdoc" [argument])
_________________
Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Mon Nov 19, 2018 7:13 am    Post subject: Reply with quote

Post emerge -pv dev-ruby/rdoc --nodeps, portageq envvar RUBY_TARGETS and grep -r ruby25 /etc/portage/package.use*
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 328
Location: Minsk, Belarus

PostPosted: Mon Nov 19, 2018 7:17 am    Post subject: Reply with quote

Code:
emerge -pv dev-ruby/rdoc --nodeps

These are the packages that would be merged, in order:

[ebuild   R   ~] dev-ruby/rdoc-6.0.4::gentoo  USE="-doc -test" RUBY_TARGETS="ruby23 ruby24 ruby25*" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB


Code:
grep -r ruby25 /etc/portage/package.use
 ~ $


RUBY_TARGETS="ruby23 ruby24 ruby25"
_________________
Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Mon Nov 19, 2018 7:40 am    Post subject: Reply with quote

You are in a stable system right? Why ruby25 is in RUBY_TARGETS?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 328
Location: Minsk, Belarus

PostPosted: Mon Nov 19, 2018 7:48 am    Post subject: Reply with quote

I just put it in to check, maybe freeradius uses it, other than that, I don't use it.
_________________
Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Mon Nov 19, 2018 8:57 am    Post subject: Reply with quote

I don't understand what enable ruby25, now profile seems correct (I just got synced).
But another question why you unmasked dev-ruby/rdoc-6.0.4 and you don't use latest stable dev-ruby/rdoc-5.1.0?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 328
Location: Minsk, Belarus

PostPosted: Mon Nov 19, 2018 9:01 am    Post subject: Reply with quote

I explicitly enabled ruby24 and updated, which asked to accept the package you mentioned, then i tried to add ruby25 which made the problem.
_________________
Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Mon Nov 19, 2018 11:57 am    Post subject: Reply with quote

Majed17 wrote:
I explicitly enabled ruby24 and updated, which asked to accept the package you mentioned, then i tried to add ruby25 which made the problem.

Remove ruby25 from make.conf and remove dev-ruby/rdoc from package.accept_keywords and re-run update
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Majed17
Guru
Guru


Joined: 31 Aug 2011
Posts: 328
Location: Minsk, Belarus

PostPosted: Mon Nov 19, 2018 12:36 pm    Post subject: Reply with quote

well that installed dev-ruby/rdoc-5.1.0
but does that mean ruby25 is still experimental?
_________________
Seek and you shall find, Knock and it shall be opened, cry and you shall find comfort.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Mon Nov 19, 2018 12:37 pm    Post subject: Reply with quote

Majed17 wrote:
well that installed dev-ruby/rdoc-5.1.0
but does that mean ruby25 is still experimental?

Yes current stable version are ruby23 or ruby24
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
cappellaiomatto
n00b
n00b


Joined: 04 Sep 2010
Posts: 11

PostPosted: Sun Dec 30, 2018 10:54 am    Post subject: Reply with quote

fedeliallalinea wrote:
lik you right.
I'm not sure if add RUBY_TARGETS="${RUBY_TARGETS}" in make.conf is correct way (in wiki no reference).

I don't know why entry ruby_targets_ruby24 profile arch/amd64/use.stable.mask doesn't work.


I had a similar problem, there was no way to enable ruby26:
Code:

[root@aemaeth:/etc/portage]# eme -av =dev-ruby/xmlrpc-0.3.0
 
  These are the packages that would be merged, in order:

  Calculating dependencies... done!
  [ebuild   R    ] dev-ruby/xmlrpc-0.3.0::gentoo  USE="-doc -test" RUBY_TARGETS="ruby23 ruby24 ruby25 (-ruby26)" 0 KiB


Even if I had:
1) in make.conf
Code:

RUBY_TARGETS="ruby23 ruby24 ruby25 ruby26"

2) in /etc/portage/package.use/package.use_file
Code:

>=dev-ruby/xmlrpc-0.3.0 ruby_targets_ruby25 ruby_targets_ruby26


The way to unlock the situation? Add in /etc/portage/profile/use.stable.mask:
Code:

-ruby_targets_ruby26


Note the "minus" prepended
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30914
Location: here

PostPosted: Sun Dec 30, 2018 11:27 am    Post subject: Reply with quote

cappellaiomatto wrote:
The way to unlock the situation? Add in /etc/portage/profile/use.stable.mask:
Code:

-ruby_targets_ruby26

Correct file is /etc/portage/profile/use.mask
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum