Project

General

Profile

Bug #11065

Ruby 2.2.2 fails to build on Cygwin64: static function, utoa, in ext/-test-/printf/printf.c has different signature in system stdlib.h.

Added by orderthruchaos (Brett DiFrischia) over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

Hello,

While attempting to build Ruby 2.2.2 on Cygwin (x86_64), I got the following error:

make[2]: Entering directory '/home/bnd/ext/cc/build/cygwin64/ruby-2.2.2/ext/-test-/printf'
compiling printf.c
printf.c:23:1: error: conflicting types for 'utoa'
 utoa(char *p, char *e, unsigned int x)
 ^
In file included from /usr/include/stdio.h:29:0,
                 from ../../.././include/ruby/defines.h:26,
                 from ../../.././include/ruby/ruby.h:29,
                 from ../../.././include/ruby.h:33,
                 from printf.c:1:
/usr/include/stdlib.h:184:8: note: previous declaration of 'utoa' was here
 char * _EXFUN(utoa,(unsigned, char *, int));
        ^
Makefile:241: recipe for target 'printf.o' failed
make[2]: *** [printf.o] Error 1
make[2]: Leaving directory '/home/bnd/ext/cc/build/cygwin64/ruby-2.2.2/ext/-test-/printf'
exts.mk:118: recipe for target 'ext/-test-/printf/all' failed
make[1]: *** [ext/-test-/printf/all] Error 2
make[1]: Leaving directory '/home/bnd/ext/cc/build/cygwin64/ruby-2.2.2'
uncommon.mk:189: recipe for target 'build-ext' failed
make: *** [build-ext] Error 2

I was able to overcome this error by renaming the function to utoa2, though you may wish to use something more appropriate.

Thank you,
Brett

Associated revisions

Revision 50305
Added by nobu (Nobuyoshi Nakada) over 2 years ago

printf.c: uint_to_str

  • ext/-test-/printf/printf.c (uint_to_str): renamed to get rid of conflict on cygwin. [Bug #11065]

Revision 50305
Added by nobu (Nobuyoshi Nakada) over 2 years ago

printf.c: uint_to_str

  • ext/-test-/printf/printf.c (uint_to_str): renamed to get rid of conflict on cygwin. [Bug #11065]

Revision 50305
Added by nobu (Nobuyoshi Nakada) over 2 years ago

printf.c: uint_to_str

  • ext/-test-/printf/printf.c (uint_to_str): renamed to get rid of conflict on cygwin. [Bug #11065]

Revision 50577
Added by usa (Usaku NAKAMURA) over 2 years ago

merge revision(s) 50305: [Backport #11065]

* ext/-test-/printf/printf.c (uint_to_str): renamed to get rid of
  conflict on cygwin.   [Bug #11065]

Revision 50625
Added by nagachika (Tomoyuki Chikanaga) over 2 years ago

merge revision(s) 50305: [Backport #11065]

* ext/-test-/printf/printf.c (uint_to_str): renamed to get rid of
  conflict on cygwin.   [Bug #11065]

History

#1 Updated by nobu (Nobuyoshi Nakada) over 2 years ago

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

Applied in changeset r50305.


printf.c: uint_to_str

  • ext/-test-/printf/printf.c (uint_to_str): renamed to get rid of conflict on cygwin. [Bug #11065]

#2 Updated by nagachika (Tomoyuki Chikanaga) over 2 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED

#3 Updated by usa (Usaku NAKAMURA) over 2 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: REQUIRED to 2.0.0: WONTFIX, 2.1: REQUIRED, 2.2: REQUIRED

#4 Updated by usa (Usaku NAKAMURA) over 2 years ago

  • Backport changed from 2.0.0: WONTFIX, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED

ruby_2_1 r50577 merged revision(s) 50305.

#5 [ruby-core:69332] Updated by nagachika (Tomoyuki Chikanaga) over 2 years ago

  • Backport changed from 2.0.0: WONTFIX, 2.1: DONE, 2.2: REQUIRED to 2.0.0: WONTFIX, 2.1: DONE, 2.2: DONE

Backported into ruby_2_2 at r50625.

Also available in: Atom PDF