Bug #7913

`./configure --enable-multiarch` fails

Added by Antonio Terceiro about 1 year ago. Updated about 1 year ago.

[ruby-core:52693]
Status:Closed
Priority:Normal
Assignee:Nobuyoshi Nakada
Category:-
Target version:-
ruby -v:ruby 2.0.0dev (2013-02-22 trunk 39384) Backport:

Description

Hi, since the changes in bug #7874 ./configure --enable-multiarch does not work in trunk anymore:

$ autoreconf && ./configure --target=x86_64-linux-gnu --enable-multiarch
[...]
configure: creating ./config.status
config.status: creating Makefile
config.status: creating ruby-2.0.pc
Variable 'archlibdir' not defined in './ruby.tmp.pc'

... and ./configure exits with a failure status (1).

The attached patch fixes this by moving the archlibdir variable up in template,
pkg-config template so that it is defined at the point of substitution in the
LDFLAGS part below.

0001-template-ruby.pc.in-move-archlibdir-variable-up-sinc.patch Magnifier (923 Bytes) Antonio Terceiro, 02/22/2013 08:36 PM

0001-Fix-build-by-adding-archlibdir.patch Magnifier (563 Bytes) Antonio Terceiro, 02/23/2013 09:46 AM

Associated revisions

Revision 39393
Added by Nobuyoshi Nakada about 1 year ago

ruby.pc.in: reorder

  • template/ruby.pc.in: reorder library flags which may refer library names. [Bug #7913]

History

#1 Updated by Antonio Terceiro about 1 year ago

My patch make the ./configure part pass, but the build still fails at linking stage:

gcc -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=implicit-function-declaration -ansi -std=iso9899:199409 -L. -fstack-protector -rdynamic -Wl,-export-dynamic -fstack-protector -pie main.o dmyext.o -Wl,-R -Wl, -L -lruby-static -lpthread -lrt -ldl -lcrypt -lm -o ruby
main.o: In function main':
/home/terceiro/src/ruby/main.c:32: undefined reference to
rubysysinit'
/home/terceiro/src/ruby/main.c:34: undefined reference to ruby_init_stack'
/home/terceiro/src/ruby/main.c:35: undefined reference to
ruby
init'
/home/terceiro/src/ruby/main.c:36: undefined reference to ruby_options'
/home/terceiro/src/ruby/main.c:36: undefined reference to
rubyrunnode'
collect2: error: ld returned 1 exit status
make[2]: ** [ruby] Erro 1
make[2]: Saindo do diretório /home/terceiro/src/ruby'
make[1]: ** [all] Erro 2
make[1]: Saindo do diretório
/home/terceiro/src/ruby'
make: ** [build-ext] Erro 2

I don't think my patch is causing this.

Note the "-L" without a directory in the command line.

#2 Updated by Nobuyoshi Nakada about 1 year ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r39393.
Antonio, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


ruby.pc.in: reorder

  • template/ruby.pc.in: reorder library flags which may refer library names. [Bug #7913]

#3 Updated by Antonio Terceiro about 1 year ago

Hi, sorry, but even with this change it sill fails at the linking stage with the same error.

The attached patch fixes the problem - I hope I get this one rigtr! :-)

#4 Updated by Nobuyoshi Nakada about 1 year ago

  • Priority changed from Urgent to Normal

r39427 should fix this.

Also available in: Atom PDF