Bug #7913
closed`./configure --enable-multiarch` fails
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.
Files
Updated by terceiro (Antonio Terceiro) over 12 years 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 ruby_sysinit'
/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 ruby_run_node'
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.
Updated by nobu (Nobuyoshi Nakada) over 12 years 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]
Updated by terceiro (Antonio Terceiro) over 12 years 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! :-)
Updated by nobu (Nobuyoshi Nakada) over 12 years ago
- Priority changed from 6 to Normal
r39427 should fix this.