[#70257] [Ruby trunk - Feature #11420] [Open] Introduce ID key table into MRI — ko1@...

Issue #11420 has been reported by Koichi Sasada.

11 messages 2015/08/06

[ruby-core:70333] [Ruby trunk - Bug #11434] [Open] test_try_ldflag_invalid_opt fails when ruby is not installed

From: v.ondruch@...
Date: 2015-08-11 13:16:15 UTC
List: ruby-core #70333
Issue #11434 has been reported by Vit Ondruch.

----------------------------------------
Bug #11434: test_try_ldflag_invalid_opt fails when ruby is not installed
https://bugs.ruby-lang.org/issues/11434

* Author: Vit Ondruch
* Status: Open
* Priority: Normal
* Assignee: Usaku NAKAMURA
* ruby -v: ruby 2.0.0p645 (2015-04-13) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
This test fails when building Ruby package:

~~~
$ make test-all TESTS="-n /test_try_ldflag_invalid_opt/"
	CC = gcc
	LD = ld
	LDSHARED = gcc -shared
	CFLAGS = -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -mtune=generic -fPIC -m64
	XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
	CPPFLAGS =   -I. -I.ext/include/x86_64-linux -I./include -I.
	DLDFLAGS = -Wl,-soname,libruby.so.2.0  -fstack-protector  -m64
	SOLIBS = -lpthread -lrt -ldl -lcrypt -lm  
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems"  -n /test_try_ldflag_invalid_opt/
/builddir/build/BUILD/ruby-2.0.0-p645/test/-ext-/symbol/test_type.rb: cannot load such file -- -test-/symbol
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" -n /test_try_ldflag_invalid_opt/

# Running tests:

[1/1] TestMkmf::TestFlags#test_try_ldflag_invalid_opt = 0.11 s
  1) Error:
test_try_ldflag_invalid_opt(TestMkmf::TestFlags):
RuntimeError: The compiler failed to generate an executable file.
You have to install development tools first.

    /builddir/build/BUILD/ruby-2.0.0-p645/lib/mkmf.rb:434:in `try_do'
    /builddir/build/BUILD/ruby-2.0.0-p645/lib/mkmf.rb:519:in `try_link0'
    /builddir/build/BUILD/ruby-2.0.0-p645/lib/mkmf.rb:534:in `try_link'
    /builddir/build/BUILD/ruby-2.0.0-p645/lib/mkmf.rb:615:in `try_ldflags'
    /builddir/build/BUILD/ruby-2.0.0-p645/test/mkmf/base.rb:145:in `<main>'

Finished tests in 0.824727s, 1.2125 tests/s, 1.2125 assertions/s.
1 tests, 1 assertions, 0 failures, 1 errors, 0 skips

ruby -v: ruby 2.0.0p645 (2015-04-13) [x86_64-linux]
uncommon.mk:513: recipe for target 'yes-test-all' failed
make: *** [yes-test-all] Error 1
~~~

When I link the libruby.so into /usr/lib64/, it passes just fine:

~~~
# ln -sf /builddir/build/BUILD/ruby-2.0.0-p645/libruby.so /usr/lib64/

$ make test-all TESTS="-n /test_try_ldflag_invalid_opt/"
	CC = gcc
	LD = ld
	LDSHARED = gcc -shared
	CFLAGS = -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -mtune=generic -fPIC -m64
	XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT
	CPPFLAGS =   -I. -I.ext/include/x86_64-linux -I./include -I.
	DLDFLAGS = -Wl,-soname,libruby.so.2.0  -fstack-protector  -m64
	SOLIBS = -lpthread -lrt -ldl -lcrypt -lm  
./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems"  -n /test_try_ldflag_invalid_opt/
/builddir/build/BUILD/ruby-2.0.0-p645/test/-ext-/symbol/test_type.rb: cannot load such file -- -test-/symbol
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common  ./tool/runruby.rb --extout=.ext  -- --disable-gems" -n /test_try_ldflag_invalid_opt/

# Running tests:

Finished tests in 0.841411s, 1.1885 tests/s, 5.9424 assertions/s.     
1 tests, 5 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0p645 (2015-04-13) [x86_64-linux]
~~~

This is probably due to backport of #10821. Interestingly, for Ruby 2.2.2, the test passes just fine. Not sure about Ruby 2.1



-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next