The Ruby greener test challenge (a Windows challenge)

931 views
Skip to first unread message

Luis Lavena

unread,
Jun 25, 2012, 10:54:47 AM6/25/12
to rubyin...@googlegroups.com, theco...@googlegroups.com, Ruby Talk
Hello,

Since I started RubyInstaller 4 years ago, ensuring that Ruby worked on every
single release took time.

Back then, my hardware was limited, so running Ruby tests took a considerable
amount of time (more than one cup of tea using tea cups scale).

Not only that, even after 4 years and different versions of Ruby and Windows,
Ruby still have some failures:

   Finished tests in 526.522392s, 21.2128 tests/s, 3665.2629 assertions/s.
   11169 tests, 1929843 assertions, 9 failures, 2 errors, 80 skips

Wouldn't be awesome that Ruby own tests were all green on Windows?

The truth is that having Ruby achieve `0F0E` (0 failures, 0 errors) will help
detect real errors, not to mention automate the testing process, perhaps
allowing teams have *nightly builds* of Ruby to play with.

Following a similar idea from Ruby 1.9.3 Documentation Challenge [1], I would
like to propose some test-fixing hunt!

## Objective

Reach 0 failures and 0 errors for Windows (MinGW) in the upcoming weeks, is
not that hard: 9 failures and 2 errors.

The target is Ruby **trunk** (upcoming 2.0), but I expect these fixes be
backported to Ruby 1.9.3 too.

## I have no idea how to compile things...

I heard *I would like to help but have no idea how to compile Ruby*, and I
know is not easy, so that is why I present to you the **Ruby Challenge Kit**

Those of you who are well versed in the art of compiling can skip to the next
section (Compiling).

### Ruby Challenge Pack

The Ruby Challenge Pack is a single-file package that provides all the tools
require to compile, test and fix Ruby. Once extracted, it provides:

- Ruby 1.9.3-p194 (required as base to compile Ruby).
- 32bits DevKit GCC 4.6.1 (based on TDM builds).
- 32bits support libraries (OpenSSL, zlib, libffi, libyaml, etc).
- Easy 1-click batch to start a tailored Command Prompt
- Easy 1-step batch to compile Ruby and run basic tests
- A document (README) describing how compile and send your fixes.

What is not included and you need is:

- A working Git installation on your computer (recommended is msysGit).
- A clone of Ruby source from GitHub [2]

Download here:
http://cdn.rubyinstaller.org/archives/experimental/RubyChallengePack-v1.exe

MD5 for verification:
0e6259c256beb5fba7e7ec53bd9e5c21

After download of the package, extract into a directory *without spaces*
(e.g. C:\RubyChallenge) and check the included README for instructions (or
keep reading)

## Compiling

For those using the Ruby Challenge Pack, simply run `quick-compile.bat`
as indicated in the documentation.

For others, do what you do and always verify Ruby core tests pass:

   make test

Compiling will take long, depending on your system. You can go and grab
a cup of tea while it completes.

## Running and fixing tests

Once you've compiled Ruby, you can run the tests:

   make test-all TESTS="-q"

Above command will run **all** Ruby tests, which could take around 10
minutes.

Once it completes, you should get a list that only contains the errors. For
example, let's look at the following one:

   [ 3348/11169] TestEnv#test_win32_blocksize = 0.00 s
     4) Failure:
   test_win32_blocksize(TestEnv)
[C:/Users/Worker/Code/ruby/ruby/test/ruby/test_env.rb:404]:
   Errno::EINVAL expected but nothing was raised.

Notice the file where the test failed: `test/ruby/test_env.rb` and the line
too.

Now open your editor/IDE, find that file, open it, and locate the failing
test.

Figure out if the test is valid and Ruby is failing or is test that is not
meant to be run on Windows.

At any time, you can email RubyInstaller group [3] and ask questions,
everybody will be pleased to help you out.

Once you find a solution, modify the file and run the tests again, but this
time just for a single file:

   make test-all TESTS="-q ruby/test_env.rb"

## Sending your patches

You fixed a test, great! Now is time to send this to Ruby developers so they
can apply it.

Open a ticket on Ruby-trunk [4] tracker and assign it to me (luislavena).
I'll review and merge accordingly.

To reduce changes people stepping into each other, please email RubyInstaller
group [3] before to announce or see if others are working on that particular
failure.

## A big thank you

There is no such thing as small contributions, all contributions are valuable.

Help us make a better Ruby.

Thank you.
--

[1] http://blog.segment7.net/2011/05/09/ruby-1-9-3-documentation-challenge
[2] http://github.com/ruby/ruby
[3] https://groups.google.com/forum/?fromgroups#!forum/rubyinstaller
[4] http://bugs.ruby-lang.org/projects/ruby-trunk/issues/new

--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

Dušan D. Majkić

unread,
Jun 25, 2012, 6:53:00 PM6/25/12
to theco...@googlegroups.com, rubyin...@googlegroups.com, Ruby Talk
> For those using the Ruby Challenge Pack, simply run `quick-compile.bat`

This failed on my machine. It killed CMD.exe garbling the screen, so I
suspect that it collides with ansicon.

It worked when I manually did those:

cd ruby
sh
autoconf
./configure --enable-shared --disable-install-doc debugflags=-g
CPPFLAGS='-DFD_SETSIZE=32767'
make all test
make test-all TESTS="-q"

... but then it freezes at:

[ 6290/10867] TestOpen3#test_commandline

Luis Lavena

unread,
Jun 25, 2012, 6:57:36 PM6/25/12
to theco...@googlegroups.com, rubyin...@googlegroups.com, Ruby Talk
On Mon, Jun 25, 2012 at 7:53 PM, Dušan D. Majkić <dma...@gmail.com> wrote:
>> For those using the Ruby Challenge Pack, simply run `quick-compile.bat`
>
> This failed on my machine. It killed CMD.exe garbling the screen, so I
> suspect that it collides with ansicon.
>

Oh yeah, a lot of things don't play nice with ANSICON. We had the same
problem RubyInstaller, make + ANSICON last year.

Please disable ANSICON before attempting to compile from the batch
file, ANSICON will try to hook cmd.exe and the child processes
(make.exe) which will fail and crash.

You can "set ANSICON_EXC=make.exe" to exclude it from being hooked.

The good thing is that Ruby 2.0 doesn't require external tools for
ANSI coloring anymore ;-9

Thanks for pointing it out.

Luis Lavena

unread,
Jun 26, 2012, 2:21:26 AM6/26/12
to rubyin...@googlegroups.com, Ruby Talk, theco...@googlegroups.com

Please tell us which revision you have cloned and if you have any existing instalation of ruby, gcc or something like that.

Sorry for top posting. Sent from mobile.

On Jun 26, 2012 3:18 AM, "lizzy leiz" <liz...@gmail.com> wrote:
Hello,

I'm having problems trying to compile it. I'm using windows 7 64bit.

This is my cmd:

*** Ruby Challenge Pack ***

ruby 1.9.3p194 (2012-04-20) [i386-mingw32]
Adding the DevKit to PATH...
Adding Knapsack (x86-windows) to the env...

*** Environment is ready! ***

C:\RubyChallenge>quick-compile.bat
---> Configuring
checking build system type... i686-pc-mingw32
checking host system type... i686-pc-mingw32
checking target system type... i686-pc-mingw32
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc needs -traditional... no
checking for ld... ld
checking whether the linker is GNU ld... yes
checking whether gcc -E accepts -o... yes
checking for ranlib... ranlib
checking for ar... ar
checking for as... as
checking for objdump... objdump
checking for objcopy... (cached) :
checking for windres... windres
checking for dllwrap... dllwrap
checking for mingw32 runtime DLL... msvcrt
checking for nm... nm
checking whether ln -s works... no, using cp -p
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for dot... no
checking for doxygen... no
checking for pkg-config... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd
checking whether -Wno-unused-parameter is accepted as CFLAGS... yes
checking whether -Wno-parentheses is accepted as CFLAGS... yes
checking whether -Wno-long-long is accepted as CFLAGS... yes
checking whether -Wno-missing-field-initializers is accepted as CFLAGS... yes
checking whether -Wunused-variable is accepted as CFLAGS... yes
checking whether -Werror=pointer-arith is accepted as CFLAGS... yes
checking whether -Werror=write-strings is accepted as CFLAGS... yes
checking whether -Werror=declaration-after-statement is accepted as CFLAGS... yes
checking whether -Werror=shorten-64-to-32 is accepted as CFLAGS... no
checking whether -Wshorten-64-to-32 is accepted as CFLAGS... no
checking whether -Werror=implicit-function-declaration is accepted as CFLAGS... yes
checking whether -Wall -Wextra is accepted as CFLAGS... yes
checking whether -D_FORTIFY_SOURCE=2 is accepted as CFLAGS... yes
checking whether -fno-strict-overflow is accepted as CFLAGS... yes
checking whether -fvisibility=hidden is accepted as CFLAGS... yes
checking whether -Wl,-unexported_symbol,_Init_* is accepted as LDFLAGS... no
checking whether -fno-omit-frame-pointer is accepted as CFLAGS... yes
checking whether -fno-fast-math is accepted as CFLAGS... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... unknown
checking for _LARGE_FILES value needed for large files... unknown
checking whether byte ordering is bigendian... no
checking for an ANSI C-conforming const... yes
checking whether char is unsigned... no
checking for inline... inline
checking for working volatile... yes
checking for long long... yes
checking for off_t... (cached) yes
checking char bit... 8
checking size of int... 0
checking size of short... 2
checking size of long... 4
checking size of long long... 8
checking size of __int64... 8
checking size of off_t... (cached) 8
checking size of void*... 4
checking size of float... 4
checking size of double... 8
checking size of time_t... 4
checking for printf prefix for long long... I64
checking for pid_t... yes
checking for convertible type of pid_t... INT
checking for uid_t... no
checking for convertible type of uid_t... INT
checking for gid_t... no
checking for convertible type of gid_t... INT
checking for time_t... yes
checking for convertible type of time_t... LONG
checking for dev_t... yes
checking for convertible type of dev_t... UINT
checking for mode_t... yes
checking for convertible type of mode_t... UINT
checking for rlim_t... no
checking for convertible type of rlim_t... LONG
checking for prototypes... yes
checking token paste string... ansi
checking stringization... #expr
checking string literal concatenation... yes
checking for variable length prototypes and stdarg.h... yes
checking for variable length macro... yes
checking for noreturn function attribute... __attribute__ ((noreturn)) x
checking for deprecated function attribute... __attribute__ ((deprecated)) x
checking for noinline function attribute... __attribute__ ((noinline)) x
checking for stdcall function attribute... __attribute__ ((stdcall)) x
checking for cdecl function attribute... __attribute__ ((cdecl)) x
checking for fastcall function attribute... __attribute__ ((fastcall)) x
checking for function alias... alias
checking for atomic builtins... yes
checking for __builtin_unreachable... yes
checking for exported function attribute... __attribute__ ((visibility("default")))
checking whether sys_nerr is declared... yes
checking for crypt in -lcrypt... (cached) no
checking for dlopen in -ldl... (cached) no
checking for shl_load in -ldld... no
checking for socketpair in -lsocket... no
checking for clock_gettime in -lrt... no
checking for main in -lunicows... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for sys/wait.h that is POSIX.1 compatible... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking for sys/ioctl.h... (cached) no
checking sys/syscall.h usability... no
checking sys/syscall.h presence... no
checking for sys/syscall.h... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking sys/fcntl.h usability... yes
checking sys/fcntl.h presence... yes
checking for sys/fcntl.h... yes
checking for sys/select.h... (cached) no
checking for sys/time.h... (cached) no
checking for sys/times.h... (cached) no
checking for sys/param.h... (cached) no
checking syscall.h usability... no
checking syscall.h presence... no
checking for syscall.h... no
checking for pwd.h... (cached) no
checking grp.h usability... no
checking grp.h presence... no
checking for grp.h... no
checking for a.out.h... (cached) no
checking for utime.h... (cached) no
checking direct.h usability... yes
checking direct.h presence... yes
checking for direct.h... yes
checking for sys/resource.h... (cached) no
checking sys/mkdev.h usability... no
checking sys/mkdev.h presence... no
checking for sys/mkdev.h... no
checking sys/utime.h usability... yes
checking sys/utime.h presence... yes
checking for sys/utime.h... yes
checking xti.h usability... no
checking xti.h presence... no
checking for xti.h... no
checking netinet/in_systm.h usability... no
checking netinet/in_systm.h presence... no
checking for netinet/in_systm.h... no
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking ucontext.h usability... no
checking ucontext.h presence... no
checking for ucontext.h... no
checking intrinsics.h usability... no
checking intrinsics.h presence... no
checking for intrinsics.h... no
checking langinfo.h usability... no
checking langinfo.h presence... no
checking for langinfo.h... no
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking sys/sendfile.h usability... no
checking sys/sendfile.h presence... no
checking for sys/sendfile.h... no
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking for net/socket.h... (cached) no
checking for sys/socket.h... (cached) no
checking process.h usability... yes
checking process.h presence... yes
checking for process.h... yes
checking sys/prctl.h usability... no
checking sys/prctl.h presence... no
checking for sys/prctl.h... no
checking for size_t... yes
checking size of size_t... 4
checking size of ptrdiff_t... 4
checking for printf prefix for size_t... NONE
checking for printf prefix for ptrdiff_t... NONE
checking for struct stat.st_blksize... no
checking for struct stat.st_blocks... no
checking for struct stat.st_rdev... yes
checking size of struct stat.st_size... SIZEOF_INT
checking for struct stat.st_atim... no
checking for struct stat.st_atimespec... no
checking for struct stat.st_atimensec... no
checking for struct stat.st_mtim... no
checking for struct stat.st_mtimespec... no
checking for struct stat.st_mtimensec... no
checking for struct stat.st_ctim... no
checking for struct stat.st_ctimespec... no
checking for struct stat.st_ctimensec... no
checking for struct timespec... no
checking for struct timezone... no
checking for clockid_t... no
(cached) checking for int8_t... yes
checking size of int8_t... 1
checking for uint8_t... yes
checking size of uint8_t... 1
checking for int16_t... yes
checking size of int16_t... 2
checking for uint16_t... yes
checking size of uint16_t... 2
checking for int32_t... yes
checking size of int32_t... 4
checking for uint32_t... yes
checking size of uint32_t... 4
checking for int64_t... yes
checking size of int64_t... 8
checking for uint64_t... yes
checking size of uint64_t... 8
checking for int128_t... no
checking for uint128_t... no
checking for intptr_t... yes
checking size of intptr_t... 4
checking for uintptr_t... yes
checking size of uintptr_t... 4
checking for ssize_t... yes
checking size of ssize_t... 4
checking for stack end address... no
checking for gc_mark and gc_children stack frame approximate size(word)... 29
checking for uid_t in sys/types.h... (cached) no
checking type of array argument to getgroups... int
checking return type of signal handlers... void
checking for working alloca.h... no
checking for alloca... yes
checking for dynamic size alloca... ok
checking for working memcmp... (cached) yes
checking for broken erfc of glibc-2.3.6 on IA64... no
checking for dup2... yes
checking for memmove... no
checking for strerror ... no
checking for strchr... no
checking for strstr... no
checking for crypt... no
checking for flock ... no
checking for isnan... (cached) yes
checking for finite... (cached) yes
checking for isinf... (cached) yes
checking for hypot... no
checking for acosh... no
checking for erf... no
checking for tgamma... no
checking for lgamma_r... no
checking for cbrt... no
checking for  ... no
checking for strlcpy... no
checking for strlcat... no
checking for ffs... no
checking for setproctitle... no
checking for signbit... no
checking for fmod... no
checking for killpg... no
checking for wait4... no
checking for waitpid... (cached) yes
checking for fork... no
checking for spawnv... no
checking for syscall... no
checking for __syscall... no
checking for chroot... no
checking for getcwd... no
checking for eaccess... no
checking for truncate... no
checking for ftruncate... no
checking for ftello... no
checking for chsize... no
checking for times... (cached) yes
checking for utimes... no
checking for utimensat... no
checking for fcntl... (cached) yes
checking for lockf... no
checking for lstat... no
checking for truncate64... no
checking for ftruncate64... no
checking for ftello64... no
checking for fseeko... (cached) yes
checking for fseeko64... no
checking for link... (cached) yes
checking for symlink... no
checking for readlink... no
checking for readdir_r... no
checking for fsync... (cached) yes
checking for fdatasync... no
checking for fchown... no
checking for posix_fadvise... no
checking for setitimer... no
checking for setruid... no
checking for seteuid... no
checking for setreuid... no
checking for setresuid... no
checking for socketpair... no
checking for setrgid... no
checking for setegid... no
checking for setregid... no
checking for setresgid... no
checking for issetugid... no
checking for pause... no
checking for lchown... no
checking for lchmod... no
checking for getpgrp... no
checking for setpgrp... no
checking for getpgid... no
checking for setpgid... no
checking for initgroups... no
checking for getgroups... no
checking for setgroups... no
checking for getpriority... no
checking for getrlimit... no
checking for setrlimit... no
checking for sysconf... no
checking for close... no
checking for getpwnam_r... no
checking for getgrnam_r... no
checking for dlopen... no
checking for sigprocmask... no
checking for sigaction... no
checking for sigsetjmp... no
checking for _setjmp... no
checking for _longjmp... no
checking for setsid... no
checking for telldir... (cached) yes
checking for seekdir... (cached) yes
checking for fchmod... no
checking for cosh... no
checking for sinh... no
checking for tanh... no
checking for log2... no
checking for round... no
checking for llabs... no
checking for setuid... no
checking for setgid... no
checking for daemon... (cached) no
checking for select_large_fdset... no
checking for setenv... no
checking for unsetenv... no
checking for mktime... no
checking for timegm... no
checking for gmtime_r... (cached) yes
checking for clock_gettime... no
checking for gettimeofday... no
checking for poll... no
checking for ppoll... no
checking for pread... no
checking for sendfile... no
checking for shutdown... no
checking for sigaltstack... no
checking for dl_iterate_phdr... no
checking for dup3... no
checking for pipe2... no
checking for posix_memalign... no
checking for memalign... no
checking for ioctl... no
checking for unsetenv returns a value... no
checking for __builtin_setjmp... no
checking for setjmp type... setjmp
checking whether struct tm is in sys/time.h or time.h... sys/time.h
checking for struct tm.tm_zone... no
checking whether tzname is declared... no
checking for tzname... no
checking for struct tm.tm_gmtoff... no
checking for external int daylight... no
checking for external timezone... no
checking for external altzone... no
checking for timezone... no
checking for negative time_t for gmtime(3)... (cached) no
checking for localtime(3) overflow correctly... no
checking for sigsetmask... no
checking for BSD signal semantics... no
checking whether getpgrp requires zero arguments... (cached) no
checking whether right shift preserve sign bit... no
checking read count field in FILE structures... not found (OK if using GNU libc)
checking read buffer ptr field in FILE structures... not found
checking size of struct stat.st_ino... 0
checking whether struct dirent.d_name is too small... no
checking stack growing direction on i386... -1
checking for backtrace... no
checking valgrind/memcheck.h usability... no
checking valgrind/memcheck.h presence... no
checking for valgrind/memcheck.h... no
checking whether ELF binaries are produced... (cached) no
checking whether OS depend dynamic link works... yes
checking for strip... strip
checking whether -Wl,--no-undefined is accepted as LDFLAGS... no
checking for prefix of external symbols... NONE
checking for nroff... no
checking for awf... no
.ext/include/i386-mingw32/ruby/config.h updated
verconf.h unchanged
ruby library version = 2.0.0
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating Makefile
config.status: creating ruby-2.0.pc
---> Compiling
        CC = gcc
        LD = ld
        LDSHARED = gcc -shared -s
        CFLAGS = -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno
-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declara
tion-after-statement -Werror=implicit-function-declaration
        XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fvisibility=h
idden -DRUBY_EXPORT
        CPPFLAGS = -DFD_SETSIZE=32767 -D_WIN32_WINNT=0x0501   -I. -I.ext/include/i386-mingw32 -I./include -I.
        DLDFLAGS = -Wl,--enable-auto-image-base,--enable-auto-import -Wl,--out-implib=libmsvcrt-ruby200.dll.a msvcrt-rub
y200.def -Wl,--stack,0x00200000,--enable-auto-import
        SOLIBS = msvcrt-ruby200.res.o -lshell32 -lws2_32 -limagehlp
compiling main.c
In file included from <command-line>:0:0:
.ext/include/i386-mingw32/ruby/config.h:127:9: error: macro names must be identifiers
.ext/include/i386-mingw32/ruby/config.h:129:9: error: macro names must be identifiers
.ext/include/i386-mingw32/ruby/config.h:131:9: error: macro names must be identifiers
.ext/include/i386-mingw32/ruby/config.h:133:9: error: macro names must be identifiers
In file included from <command-line>:0:0:
./include/ruby/missing.h:214:17: error: expected identifier or '(' before 'sizeof'
In file included from ./include/ruby.h:32:0,
                 from main.c:13:
./include/ruby/ruby.h:107:14: error: size of array 'ruby_check_sizeof_int' is negative
make: *** [main.o] Error 1
---> Something went wrong :-(

--
You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyinstaller/-/Savy3v0Ike4J.
To post to this group, send email to rubyin...@googlegroups.com.
To unsubscribe from this group, send email to rubyinstalle...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyinstaller?hl=en.

Luis Lavena

unread,
Jun 26, 2012, 10:10:09 AM6/26/12
to rubyin...@googlegroups.com, Ruby Talk, theco...@googlegroups.com
On Tue, Jun 26, 2012 at 10:51 AM, lizzy leiz <liz...@gmail.com> wrote:
> El martes, 26 de junio de 2012 03:21:26 UTC-3, Luis Lavena escribió:
>>
>> Please tell us which revision you have cloned and if you have any existing
>> instalation of ruby, gcc or something like that.
>
> I cloned trunk from github.com/ruby/ruby, commit
> 9ac51c29930fa92a32186e7c217fa219915487c6. I go back in history about 10
> commits but it's the same.
>

I just tried the same commit and worked.

However, I took the output from your first message (the configure output)

And compared against my local build. Here is the diff:

https://gist.github.com/074f5fd3a4934161e575

You will notice that is failing to obtain the size of int, functions
like memmove and others.

This might indicate that there is something else interfering with the
configure process, which is resulting in broken information.

Do you have cygwin or another MinGW installation that is always in the PATH?

Do you have something like ANSICON installed in the AutoRun section?
(if you used ansicon -i)

Can you check the config.log for the first lines, when it check for
size of int, what is the command output?

If you can attach config.log (and not paste since is too big) will be great.

Thank you.

lizzy leiz

unread,
Jun 26, 2012, 7:59:29 PM6/26/12
to rubyin...@googlegroups.com, Ruby Talk, theco...@googlegroups.com


El martes, 26 de junio de 2012 11:10:09 UTC-3, Luis Lavena escribió:
On Tue, Jun 26, 2012 at 10:51 AM, lizzy leiz <liz...@gmail.com> wrote:
> El martes, 26 de junio de 2012 03:21:26 UTC-3, Luis Lavena escribió:
>>
>> Please tell us which revision you have cloned and if you have any existing
>> instalation of ruby, gcc or something like that.
>
> I cloned trunk from github.com/ruby/ruby, commit
> 9ac51c29930fa92a32186e7c217fa219915487c6. I go back in history about 10
> commits but it's the same.
>

I just tried the same commit and worked.

However, I took the output from your first message (the configure output)

And compared against my local build. Here is the diff:

https://gist.github.com/074f5fd3a4934161e575

You will notice that is failing to obtain the size of int, functions
like memmove and others.

This might indicate that there is something else interfering with the
configure process, which is resulting in broken information.

Do you have cygwin or another MinGW installation that is always in the PATH?

I see MinGW in the PATH only when I'm in the console provided in the challenge package.

When I search for it, I find files with "MinGW" in the name, under directories like Ruby192, RubyChallenge, Octave, HacketyHack and Arduino, but not in other place. Git bash doesn't use it?
 

Do you have something like ANSICON installed in the AutoRun section?
(if you used ansicon -i)

I didn't see it in my AutoRun, and "ansicon" command in command line fails.
 

Can you check the config.log for the first lines, when it check for
size of int, what is the command output?

If you can attach config.log (and not paste since is too big) will be great.

attached
 
config.log

Luis Lavena

unread,
Jul 13, 2012, 2:50:58 PM7/13/12
to rubyin...@googlegroups.com, theco...@googlegroups.com, Ruby Talk
On Fri, Jul 13, 2012 at 2:37 PM, Oleg Sukhodolsky <os9...@gmail.com> wrote:
> Hi,
>
> I have tried to build ruby with the package and build fails rather early
> with the following error:
Hello,

I believe I mentioned this error before:

https://groups.google.com/d/msg/rubyinstaller/A92K_EYJX2A/AufN8RzlGAYJ

>
> 131 line of the problematic file is:
> | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
>
> This doesn't looks like a good macro ;)
>
> Is this a known problem? How I can workaround it?
>

See link provided above, I got no answer from poster, so will be great
get your feedback :)

> I use Windows7 64bits, ruby's revision is
> d57103b9a2a62a67eb09fc9fb7c2828b53d1a590
>

I tested that version last night, and it worked.

Can you tell me if other looks like FRAPPS, ANSICON, existing
MinGW/Cygwin/MSYS installations around that could be affecting?

What "gcc --version" says after you open the command prompt shortcut?

Can gcc compile a simple program, like hello world?

hello.c:

#include <stdio.h>

int main(void)
{
puts("Hello world");

return 0;
}

And compile with "gcc hello.c -o hello.exe"

That should work, and if not, then try with "-v" option so we get debug output.

Please use pastie.org or gist.github.com if the output you provide is
long so we keep readability :)

Thank you.

Oleg Sukhodolsky

unread,
Jul 13, 2012, 3:38:26 PM7/13/12
to rubyin...@googlegroups.com
Hi Luis,
not exactly, the problem described in the message was caused by the
fact that configure was unable to
get size of int. In my case it calculate the size correctly, but
fails to check memmove.

>>
>> 131 line of the problematic file is:
>> | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
>>
>> This doesn't looks like a good macro ;)
>>
>> Is this a known problem? How I can workaround it?
>>
>
> See link provided above, I got no answer from poster, so will be great
> get your feedback :)
>
>> I use Windows7 64bits, ruby's revision is
>> d57103b9a2a62a67eb09fc9fb7c2828b53d1a590
>>
>
> I tested that version last night, and it worked.
>
> Can you tell me if other looks like FRAPPS, ANSICON, existing
> MinGW/Cygwin/MSYS installations around that could be affecting?

not sure what FRAPPS and ANSICON is and how to check if I have them.
At least command prompt doesn't know such commands.
I do no MinGW/Cygwin/MSYS in paths.

>
> What "gcc --version" says after you open the command prompt shortcut?

C:\Users\son\work\RubyChallenge>gcc --version
gcc (tdm-1) 4.6.1
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

> Can gcc compile a simple program, like hello world?

gcc compiles the problem and the problem works fine.

Here is a complete config.log -
https://raw.github.com/gist/3106890/544a674e69b9cb34274d72b81f6d5ffeaf640580/config.log

Thanks in advance, Oleg.

Luis Lavena

unread,
Jul 13, 2012, 3:56:26 PM7/13/12
to rubyin...@googlegroups.com
On Fri, Jul 13, 2012 at 4:38 PM, Oleg Sukhodolsky <os9...@gmail.com> wrote:
> Hi Luis,
>
> On Fri, Jul 13, 2012 at 10:50 PM, Luis Lavena <luisl...@gmail.com> wrote:
>>
>> Hello,
>>
>> I believe I mentioned this error before:
>>
>> https://groups.google.com/d/msg/rubyinstaller/A92K_EYJX2A/AufN8RzlGAYJ
>
> not exactly, the problem described in the message was caused by the
> fact that configure was unable to
> get size of int. In my case it calculate the size correctly, but
> fails to check memmove.
>

int is just one example, if you take a look to the diff I mentioned in
that message, lot of things were missing:

https://gist.github.com/074f5fd3a4934161e575

All marked with red (-) were missing in the user build.

> not sure what FRAPPS and ANSICON is and how to check if I have them.

Sorry, an extra P was in the name...
FRAPS:

http://www.fraps.com/

ANSICON:

https://github.com/adoxa/ansicon/

> At least command prompt doesn't know such commands.

Good :)

>
> gcc compiles the problem and the problem works fine.
>
> Here is a complete config.log -
> https://raw.github.com/gist/3106890/544a674e69b9cb34274d72b81f6d5ffeaf640580/config.log
>

Ok, I believe I found the culprit, and is caused by the way git
default clone on Windows.

It is required that you clone Ruby repository using LF line endings,
for which I recommend you do:

git config --global core.autocrlf false

Then you will need to reset your clone (git reset --hard), change
branches so it resets or will need to clone it again.

Please try and let us know.
--
Luis Lavena
AREA 17

Oleg Sukhodolsky

unread,
Jul 13, 2012, 4:53:57 PM7/13/12
to rubyin...@googlegroups.com
Yes, it was the case. I've updated repository and was able to build it.
I think it is worth to add this hint to README.

Thanks you for your help.

Oleg.

Luis Lavena

unread,
Jul 13, 2012, 4:57:04 PM7/13/12
to rubyin...@googlegroups.com
I can't re-upload the package without altering the MD5 of it, so I
think will send a note stating this change.

> Thanks you for your help.
>

Thanks to you for helping my spot the issue!

--
Luis Lavena
AREA 17
Reply all
Reply to author
Forward
0 new messages