Bug 199452 - lang/ruby21 illegal instruction on arm
Summary: lang/ruby21 illegal instruction on arm
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: freebsd-ruby (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-14 21:47 UTC by Ulrich Grey
Modified: 2015-11-17 16:04 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Grey 2015-04-14 21:47:46 UTC
root@wqtest:/usr/ports/ports-mgmt/portupgrade # portupgrade
[Reading data from pkg(8) ... - 314 packages found - done]
** Stale lock file was found. Removed.
Illegal instruction (core dumped)

There is no core file in the working directory.

# uname -a
FreeBSD wqtest 11.0-CURRENT FreeBSD 11.0-CURRENT #1 r281266M: Wed Apr  8 23:57:19 CEST 2015     root@noname.privat:/usr/home/CROCHET/crochet/work/obj/arm.armv6/usr/SRC/head/sys/WANDBOARD-QUAD  arm
Comment 1 Ulrich Grey 2015-04-15 12:11:28 UTC
(In reply to Ulrich Grey from comment #0)

Now I have built lang/ruby21 with debugging support.
In /usr/local/sbin/portinstall I have added --debug:

#!/usr/local/bin/ruby21 --debug

If I start ports-mgmt/portupgrade now I get this:

root@wqtest:~ # portinstall mail/sylpheed
Exception `LoadError' at /usr/local/lib/ruby/2.1/rubygems.rb:1194 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /usr/local/lib/ruby/2.1/rubygems.rb:1203 - cannot load such file -- rubygems/defaults/ruby
/usr/local/sbin/portinstall:1040: warning: shadowing outer local variable - deps
/usr/local/sbin/portinstall:1583: warning: ambiguous first argument; put parentheses or even spaces
/usr/local/sbin/portinstall:1902: warning: assigned but unused variable - files
/usr/local/sbin/portinstall:2002: warning: assigned but unused variable - newpkg
/usr/local/sbin/portinstall:2193: warning: assigned but unused variable - pkgdep
/usr/local/sbin/portinstall:2206: warning: assigned but unused variable - file1
/usr/local/sbin/portinstall:2206: warning: assigned but unused variable - file2
/usr/local/sbin/portinstall:2223: warning: assigned but unused variable - pkgdep
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgtools.rb:99: warning: assigned but unused variable - table
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgtools.rb:363: warning: shadowing outer local variable - i
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgtools.rb:857: warning: assigned but unused variable - str
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgdb.rb:417: warning: assigned but unused variable - prev_sync
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgdbtools.rb:38: warning: assigned but unused variable - mode
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgdbtools.rb:124: warning: assigned but unused variable - e
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgdbtools.rb:139: warning: assigned but unused variable - pid
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/portsdb.rb:564: warning: shadowing outer local variable - i
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/portsdb.rb:551: warning: assigned but unused variable - i
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/portsdb.rb:756: warning: assigned but unused variable - pkg
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/portinfo.rb:118: warning: assigned but unused variable - other_name
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgdb.rb:126: warning: instance variable @with_pkgng not initialized
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgdbtools.rb:47: warning: instance variable @db_dir not initialized
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgdbtools.rb:188: warning: instance variable @lock_file not initialized
/usr/local/lib/ruby/site_ruby/2.1/pkgtools/pkgmisc.rb:99: warning: global variable `$tmpdir' not initialized
** Stale lock file was found. Removed.
Illegal instruction (core dumped)
Comment 2 Ulrich Grey 2015-04-15 12:25:12 UTC
(In reply to Ulrich Grey from comment #1)

Sorry, I forgot to mention that lang/ruby21 was built with 
--with-setjmp-type=_setjmp added to configure due to a clang problem.

See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199048 Comment13
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2015-04-15 12:50:00 UTC
I can't reproduce your problem on my beaglebone armv6hf but I have a different issue:

portupgrade -a
[Reading data from pkg(8) ... - 67 packages found - done]
[Updating the portsdb <format:bdb_btree> in /usr/ports ... - 24771 port entries found ** Stale lock file was found. Removed.
/usr/local/lib/ruby/site_ruby/2.1/armv6-freebsd11/bdb.so: Undefined symbol "ruby_safe_level_4_warning"
Comment 4 Bryan Drewery freebsd_committer freebsd_triage 2015-04-15 18:11:51 UTC
This is a ruby problem.
Comment 5 Steve Wills freebsd_committer freebsd_triage 2015-04-15 19:20:55 UTC
(In reply to Bryan Drewery from comment #4)

I think it may be a ruby-bdb issue, rather than in ruby proper, but I'm not sure yet.
Comment 6 Mikael Urankar freebsd_committer freebsd_triage 2015-04-16 08:36:50 UTC
I'm having some hard time with poudriere, qemu and armv6hf: my ruby packages are broken, let me rebuild them on a real hw and discard my issue for the moment.

By the way, we will have issues if we ship ruby binaries built with poudriere: CPP, CXX and CC are prefixed with /nxb-bin/usr/bin/ and if we try to rebuild a ruby package on a system without native-xtool it will fail because /nxb-bin/usr/bin/cc cannot be found (see CONFIG["CC"] in /usr/local/lib/ruby/2.1/armv6-freebsd11/rbconfig.rb)
Comment 7 Michael Moll freebsd_committer freebsd_triage 2015-11-15 16:37:42 UTC
can this get closed like #199048 ?
Comment 8 Mikael Urankar freebsd_committer freebsd_triage 2015-11-17 16:03:17 UTC
Yes it can be closed. I think the root cause of the problem was in databases/db5: bug 197227
Comment 9 Michael Moll freebsd_committer freebsd_triage 2015-11-17 16:04:13 UTC
Perfect, thanks!