Project

General

Profile

Actions

Bug #10960

closed

libffiのビルドの不具合?

Added by ciel (T Yamada) about 9 years ago. Updated about 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
-
[ruby-dev:<unknown>]

Description

本当に不具合なのか判断できないため、Miscに投げます。
ruby-2.2.1/ext/fiddle/libffi-3.2.1/Makefileの、
CCASFLAGS,CFLAGS,CXXFLAGSに-fPICを(無理やり)追加することでビルドが通ります。
https://bugs.ruby-lang.org/issues/10954 で「パッケージシステムにlibffiがあるならそちらでインストールしてください」との返答を頂きましたが、レンタルサーバーが制限ユーザーのため、パッケージシステムは使用することができません。
細かい仕様が変わって2.2.2では何の問題もなしにビルドできたりするんだろうかとも思っております。。

以下、エラーメッセージです。

make 'AR_FLAGS='  'CC_FOR_BUILD='  'CFLAGS=-O3 -fno-fast-math -ggdb3  -Wall -fexceptions'  'CXXFLAGS=-O3 -fno-fast-math -ggdb3'  'CFLAGS_FOR_BUILD='  'CFLAGS_FOR_TARGET='  'INSTALL=/usr/bin/install -c'  'INSTALL_DATA=/usr/bin/install -c -m 644'  'INSTALL_PROGRAM=/usr/bin/install -c'  'INSTALL_SCRIPT=/usr/bin/install -c'  'JC1FLAGS='  'LDFLAGS=-L. -fstack-protector -rdynamic  -L../../..'  'LIBCFLAGS='  'LIBCFLAGS_FOR_TARGET='  'MAKE=make'  'MAKEINFO=/bin/sh /home/park50/ruby22-work/ruby-2.2.1/ext/fiddle/libffi-3.2.1/missing makeinfo '  'PICFLAG='  'PICFLAG_FOR_TARGET='  'RUNTESTFLAGS='  'SHELL=/bin/sh'  'exec_prefix=/usr/local'  'infodir=/usr/local/share/info'  'libdir=/usr/local/lib'  'mandir=/usr/local/share/man'  'prefix=/usr/local'  'AR=ar'  'AS=as'  'CC=gcc'  'CXX=g++'  'LD=ld'  'NM=/usr/bin/nm -B'  'RANLIB=ranlib'  'DESTDIR=' all-recursive
Making all in include
Making all in testsuite
Making all in man
  CC       src/prep_cif.lo
  CC       src/types.lo
  CC       src/raw_api.lo
  CC       src/java_raw_api.lo
  CC       src/closures.lo
  CC       src/x86/ffi64.lo
  CPPAS    src/x86/unix64.lo
  CC       src/x86/ffi.lo
  CPPAS    src/x86/sysv.lo
  CCLD     libffi_convenience.la
  CCLD     libffi.la
linking shared-object fiddle.so
/usr/bin/ld: ./libffi-3.2.1/.libs/libffi.a(prep_cif.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
./libffi-3.2.1/.libs/libffi.a: could not read symbols: Bad value
*** [../../.ext/x86_64-freebsd9.1/fiddle.so] Error code 1

Stop in /home/xxx/ruby22-work/ruby-2.2.1/ext/fiddle.
*** [ext/fiddle/all] Error code 1

Stop in /home/xxx/ruby22-work/ruby-2.2.1.
*** [build-ext] Error code 1

Stop in /home/xxx/ruby22-work/ruby-2.2.1.

Files

mkmf.log (21.9 KB) mkmf.log ciel (T Yamada), 03/11/2015 06:42 AM
Actions #1

Updated by ciel (T Yamada) about 9 years ago

環境を書き忘れていました。FreeBSD 9.1です。(10954と同環境)

Actions #2

Updated by nobu (Nobuyoshi Nakada) about 9 years ago

  • Description updated (diff)
  • Status changed from Open to Feedback

ext/fiddle/mkmf.log を見せてください。

Actions #3

Updated by ciel (T Yamada) about 9 years ago

添付します。宜しくお願い申し上げます。

Actions #4

Updated by usa (Usaku NAKAMURA) about 9 years ago

  • Tracker changed from Misc to Bug
  • Status changed from Feedback to Open
  • ruby -v set to -
  • Backport set to 2.1: DONTNEED, 2.2: REQUIRED

トラッカー移動します。
いろいろご配慮してくださったのだとは思いますが、不具合かどうかの最終判断はどうせ我々がするので、不具合の可能性があったら気にせずBugに突っ込んでください。
Bug以外のトラッカーには後の処理に必要な情報が欠けているので困ったりするのです。

てゆか、Miscって何に使うためにあるんだろう?

Actions #5

Updated by nobu (Nobuyoshi Nakada) about 9 years ago

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

Applied in changeset r49957.


libff: fix enable-shared condition

  • ext/fiddle/extconf.rb: needs --enable-shared when linked to
    libruby or fiddle.so. since --with-static-linked-ext does no
    longer link extensions to ruby program with --enable-shared, the
    only combination needs --enable-static is --disable-shared and
    --with-static-linked-ext. [ruby-dev:48901] [Bug #10960]
Actions #6

Updated by nagachika (Tomoyuki Chikanaga) about 9 years ago

  • Backport changed from 2.1: DONTNEED, 2.2: REQUIRED to 2.1: DONTNEED, 2.2: DONE

r49007, r49009 and r49957 were backported into ruby_2_2 branch at r50272.

Actions #7

Updated by ciel (T Yamada) about 9 years ago

こちらの不具合については2.2.2で修正されていることを確認しました。ありがとうございました。

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0