Skip to contentSkip to conversation

ruby: fix build breakage

PATCH New Gustavo Zacarias 3 participants 6 messages Nov 25, 2011 – Nov 26, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ruby: fix build breakage

Fix build breakage regarding invalid file format of /usr/lib/libpthread.so
This is because ruby has rpath enabled by default and was throwing in the runtime paths and pulling in host libraries into the mix. So disable rpath.

---
 package/ruby/ruby.mk |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/ruby/ruby.mk +1 -1
index 3495333..a34a251 100644
@@ -10,7 +10,7 @@ RUBY_AUTORECONF = YES
 HOST_RUBY_AUTORECONF = YES
 RUBY_DEPENDENCIES = host-ruby
 RUBY_MAKE_ENV = $(TARGET_MAKE_ENV)
-RUBY_CONF_OPT = --disable-install-doc
+RUBY_CONF_OPT = --disable-install-doc --disable-rpath
 
 HOST_RUBY_CONF_OPT = --disable-install-doc
 
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 2/2 ruby: fix host build breakage

When building host-ruby with ncurses enabled on an x86_64 host we get a "relocation R_X86_64_32 against `_nc_globals' can not be used when making a shared object; recompile with -fPIC" error when building. Just disable ncurses and readline support for the host version - we don't need it.

---
 package/ruby/ruby.mk |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
package/ruby/ruby.mk +1 -2
index a34a251..ad791f8 100644
@@ -11,8 +11,7 @@ HOST_RUBY_AUTORECONF = YES
 RUBY_DEPENDENCIES = host-ruby
 RUBY_MAKE_ENV = $(TARGET_MAKE_ENV)
 RUBY_CONF_OPT = --disable-install-doc --disable-rpath
-
-HOST_RUBY_CONF_OPT = --disable-install-doc
+HOST_RUBY_CONF_OPT = --disable-install-doc --without-ncurses --without-readline
 
 # Force optionals to build before we do
 ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
Signature · 1 line
1.7.3.4
#2 lore raw

PATCH 2/2 ruby: fix host build breakage

Quoted 5 lines · Gustavo Zacarias

When building host-ruby with ncurses enabled on an x86_64 host we get a "relocation R_X86_64_32 against `_nc_globals' can not be used when making a shared object; recompile with -fPIC" error when building. Just disable ncurses and readline support for the host version - we don't need it.

I get the same "_nc_globals" error you are seeing when I try to add the ruby package to the build. I can confirm this patch allows the build of ruby to succeed.

I'm not able to reproduce the problem you're fixing with your first patch (--disable-rpath) so I can't confirm its effectiveness.

#3 lore raw

PATCH 2/2 ruby: fix host build breakage

I should also point out... the additional flags you provide are only required if the ncurses package is scheduled to be built, but I don't think it matters if they are conditional or not.

#4 lore raw

PATCH 2/2 ruby: fix host build breakage

Quoted 3 lines · Trevor Woerner

I should also point out... the additional flags you provide are only required if the ncurses package is scheduled to be built, but I don't think it matters if they are conditional or not.

Yes, there's no need to make it conditional.
If there's no ncurses/readline then no harm is done by "forcibly" disabling them.
Even so it's just for the host ruby, not the target. Regards.

#5 lore raw

PATCH 1/2 ruby: fix build breakage

In reply to Gustavo Zacarias
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> Fix build breakage regarding invalid file format of Gustavo> /usr/lib/libpthread.so
Gustavo> This is because ruby has rpath enabled by default and was throwing in Gustavo> the runtime paths and pulling in host libraries into the mix. Gustavo> So disable rpath.

Committed both, thanks.

Signature · 1 line
Bye, Peter Korsgaard