Bug #11533
closedAIX6.1 - Ruby 2.2.3 - TestMkmf::TestConvertible#test_typeof_builtin fails
Description
AIX6.1 - Ruby 2.2.3
The following test fails (constantly):
./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 --extout=.ext -- --disable-gems" -n TestMkmf::TestConvertible#test_typeof_builtin -v
1) Failure:
TestMkmf::TestConvertible#test_typeof_builtin [/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/test/mkmf/test_convertible.rb:8]:
convertible_int: checking for convertible type of short... -------------------- short
--------------------
convertible_int: checking for convertible type of int... -------------------- int
--------------------
convertible_int: checking for convertible type of long... -------------------- long
--------------------
convertible_int: checking for convertible type of signed short... -------------------- **failed**
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 614.16: 1506-434 (I) The left-hand side of a bitwise right shift expression has a signed promoted type.
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 623.31: 1506-434 (I) The left-hand side of a bitwise right shift expression has a signed promoted type.
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 678.16: 1506-434 (I) The left-hand side of a bitwise right shift expression has a signed promoted type.
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 1303.9: 1506-434 (I) The left-hand side of a bitwise right shift expression has a signed promoted type.
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 1324.9: 1506-434 (I) The left-hand side of a bitwise right shift expression has a signed promoted type.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 614.16: ....
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: /*top*/
6: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1];
/* end */
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 614.16: .......
"conftest.c", line 6.12: 1506-343 (S) Redeclaration of foo differs from previous declaration on line 5 of "conftest.c".
"conftest.c", line 6.12: 1506-050 (I) Return type "int" in redeclaration is not compatible with the previous return type "short".
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern int foo();
/* end */
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 614.16: .........
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern short foo();
/* end */
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 614.16: ..........
"conftest.c", line 6.13: 1506-343 (S) Redeclaration of foo differs from previous declaration on line 5 of "conftest.c".
"conftest.c", line 6.13: 1506-050 (I) Return type "long" in redeclaration is not compatible with the previous return type "short".
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern long foo();
/* end */
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 614.16: .......
"conftest.c", line 6.18: 1506-343 (S) Redeclaration of foo differs from previous declaration on line 5 of "conftest.c".
"conftest.c", line 6.18: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "short".
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern long long foo();
/* end */
--------------------
.
<"short"> expected but was
<nil>.
1 tests, 7 assertions, 1 failures, 0 errors, 0 skips
I'd like to have the temporary files (Makefile
, conftest.c
, etc) to be NOT removed, and I' like to print some traces for helping me to understand what's wrong.
However, I cannot find any hint on the Web about how to proceed.
I've started to look at files: lib/mkmf.rb
& test/mkmf/test_convertible.rb
, but I cannot find how to proceed for keeping temp files and for adding traces.
So, I'm lost about how I can analyze/debug this issue, and I need some help.
Updated by TRex58 (Tony Reix) almost 9 years ago
The issue appears only when compiling with XLC.
XLC: 1 tests, ** 7** assertions,** 1 failures**, 0 errors, 0 skips
GCC: 1 tests, **12** assertions, **0 failures, 0 errors**, 0 skips
Anyway, how can I get information about what is going wrong ?
Updated by nobu (Nobuyoshi Nakada) almost 9 years ago
- Description updated (diff)
- Status changed from Open to Feedback
Tony Reix wrote:
"/opt/freeware/src/packages/BUILD/ruby-2.2.3-xlc/include/ruby/ruby.h", line 614.16: 1506-434 (I) The left-hand side of a bitwise right shift expression has a signed promoted type.
Seems these warnings cause the failures.
Does xlc
have an option to suppress them?
Updated by nobu (Nobuyoshi Nakada) almost 9 years ago
configure
with cflags=-qsuppress=1506-434
may work.
Updated by TRex58 (Tony Reix) almost 9 years ago
Nobuyoshi Nakada wrote:
configure
withcflags=-qsuppress=1506-434
may work.
Yes. That works. However, it is not enough.
I know have:
CC = xlc
CFLAGS = -qsuppress=1506-434
...
Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common --extout=.ext -- --disable-gem\ns" -n TestMkmf::TestConvertible#test_typeof_builtin -v
# Running tests:
TestMkmf::TestConvertible#test_typeof_builtin = 2.04 s = F
Finished tests in 97.187762s, 0.0103 tests/s, 0.0926 assertions/s.
1) Failure:
TestMkmf::TestConvertible#test_typeof_builtin [/opt/freeware/src/packages/BUILD/ruby-2.2.3/test/mkmf/test_convertible.rb:8]:
convertible_int: checking for convertible type of short... -------------------- short
--------------------
convertible_int: checking for convertible type of int... -------------------- int
--------------------
convertible_int: checking for convertible type of long... -------------------- long
--------------------
convertible_int: checking for convertible type of signed short... -------------------- short
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: /*top*/
6: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1];
/* end */
"conftest.c", line 6.12: 1506-343 (S) Redeclaration of foo differs from previous declaration on line 5 of "conftest.c".
"conftest.c", line 6.12: 1506-050 (I) Return type "int" in redeclaration is not compatible with the previous return type "short".
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern int foo();
/* end */
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed short rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern short foo();
/* end */
--------------------
convertible_int: checking for convertible type of signed int... -------------------- int
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed int rbcv_typedef_;
4:
5: /*top*/
6: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1];
/* end */
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed int rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern int foo();
/* end */
--------------------
convertible_int: checking for convertible type of signed long... -------------------- int
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed long rbcv_typedef_;
4:
5: /*top*/
6: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1];
/* end */
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: typedef signed long rbcv_typedef_;
4:
5: extern rbcv_typedef_ foo();
6: extern int foo();
/* end */
--------------------
.
<"long"> expected but was
<"int">.
1 tests, 9 assertions, 1 failures, 0 errors, 0 skips
I think that xlc is managing signed int/long in a "special" way.
I could use gcc instead. But, if there are issues with xlc, I'd like to understand them and open defects so that they are fixed in the future.
And, in order to understand the issues, I need to go inside the test: display more details, or understand how the tests work, or debug.
But, in that case, Ruby seems to build Makefile, conftest.c file, compile it, run it, and produce some result. Debug does not seem useful. And I'm a beginner in Ruby.
But I cannot find a way to not have the files removed. I even don't know where they are created.
Some clarification about this kind of test works would help me. Moreover, there is another similar tests which fails too: TestMkmf::TestConvertible#test_typeof_typedef
.
Anyway, thanks for your help.
Updated by nobu (Nobuyoshi Nakada) almost 9 years ago
Tony Reix wrote:
And, in order to understand the issues, I need to go inside the test: display more details, or understand how the tests work, or debug.
But, in that case, Ruby seems to buildMakefile
,conftest.c
file, compile it, run it, and produce some result. Debug does not seem useful. And I'm a beginner in Ruby.
But I cannot find a way to not have the files removed. I even don't know where they are created.
mkmf
does not create Makefile
until create_makefile
is called, so no Makefile
s are created by the tests in question.
conftest.c
s are shown, as "checked program"s.
Updated by jeremyevans0 (Jeremy Evans) over 3 years ago
- Status changed from Feedback to Closed