Issue #11533 has been updated by Nobuyoshi Nakada.


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 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.

`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.


----------------------------------------
Bug #11533: AIX6.1 - Ruby 2.2.3 - TestMkmf::TestConvertible#test_typeof_builtin fails
https://bugs.ruby-lang.org/issues/11533#change-54214

* Author: Tony Reix
* Status: Feedback
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.3p173 (2015-08-18 revision 51636) [powerpc-aix6.1.0.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
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.



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