Project

General

Profile

Actions

Bug #805

closed

Ruby 1.9.1 preview 2 : build failure on OpenSolaris

Added by daesan (Dae San Hwang) over 15 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Backport:
[ruby-core:20189]

Description

=begin
I got the following error while building 1.9.1 preview 2 on OpenSolaris 5.11 snv_98. (1.9.1 preview 1 was built fine on OpenSolaris.)

It was configured with the following:
./configure --build=x86_64-sun-solaris10 --prefix=/usr/local CFLAGS="-m64" LDFLAGS="-m64"

--
compiling curses
make[1]: Entering directory /usr/local/src/ruby-1.9.1-preview2/ext/curses' gcc -I. -I../../.ext/include/x86_64-solaris10 -I../.././include -I../.././ext/curses -DRUBY_EXTCONF_H=\"extconf.h\" -fPIC -m64 -O2 -g -Wall -Wno-parentheses -o curses.o -c curses.c curses.c:419:18: macro "ISPRINT" requires 2 arguments, but only 1 given curses.c: In function curses_getch':
curses.c:419: error: ISPRINT' undeclared (first use in this function) curses.c:419: error: (Each undeclared identifier is reported only once curses.c:419: error: for each function it appears in.) curses.c:1113:18: macro "ISPRINT" requires 2 arguments, but only 1 given curses.c: In function window_getch':
curses.c:1113: error: ISPRINT' undeclared (first use in this function) make[1]: *** [curses.o] Error 1 make[1]: Leaving directory /usr/local/src/ruby-1.9.1-preview2/ext/curses'
make: *** [exts] Error 1
=end


Files

output.txt (41.1 KB) output.txt build output daesan (Dae San Hwang), 12/02/2008 01:55 AM
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 15 years ago

=begin
Hi,

At Tue, 2 Dec 2008 01:50:41 +0900,
Dae San Hwang wrote in [ruby-core:20189]:

compiling curses
make[1]: Entering directory `/usr/local/src/ruby-1.9.1-preview2/ext/curses'
gcc -I. -I../../.ext/include/x86_64-solaris10 -I../.././include -I../.././ext/curses -DRUBY_EXTCONF_H="extconf.h" -fPIC -m64 -O2 -g -Wall -Wno-parentheses -o curses.o -c curses.c
curses.c:419:18: macro "ISPRINT" requires 2 arguments, but only 1 given

Is ISPRINT macro defined anywhere on OpenSolaris?

--
Nobu Nakada

=end

Actions #2

Updated by daesan (Dae San Hwang) over 15 years ago

=begin
I've checked system header files and found following macro definitions
of ISPRINT.

/* in "/usr/include/readline/chardefs.h" */

#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))

/* in "/usr/include/sys/euc.h" */

#define ISPRINT(c, wp) (wp._multibyte && !ISASCII(c) || isprint(c))

I guess the second definition of ISPRINT macro clashes with ruby?

daesan

On Dec 2, 2008, at 4:42 PM, Nobuyoshi Nakada wrote:

Hi,

At Tue, 2 Dec 2008 01:50:41 +0900,
Dae San Hwang wrote in [ruby-core:20189]:

compiling curses
make[1]: Entering directory `/usr/local/src/ruby-1.9.1-preview2/ext/
curses'
gcc -I. -I../../.ext/include/x86_64-solaris10 -I../.././include -
I../.././ext/curses -DRUBY_EXTCONF_H="extconf.h" -fPIC -m64 -
O2 -g -Wall -Wno-parentheses -o curses.o -c curses.c
curses.c:419:18: macro "ISPRINT" requires 2 arguments, but only 1
given

Is ISPRINT macro defined anywhere on OpenSolaris?

--
Nobu Nakada

=end

Actions #3

Updated by nobu (Nobuyoshi Nakada) over 15 years ago

=begin
Hi,

At Thu, 4 Dec 2008 12:15:03 +0900,
Dae San Hwang wrote in [ruby-core:20284]:

I've checked system header files and found following macro definitions
of ISPRINT.

/* in "/usr/include/readline/chardefs.h" */

#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))

/* in "/usr/include/sys/euc.h" */

#define ISPRINT(c, wp) (wp._multibyte && !ISASCII(c) || isprint(c))

Hmmm, they obviously conflict.

I guess the second definition of ISPRINT macro clashes with ruby?

I guess so. Could you tell how/from where those headers are
included?

--
Nobu Nakada

=end

Actions #4

Updated by daesan (Dae San Hwang) over 15 years ago

=begin
I traced back header inclusions:

"ruby-trunk/ext/curses/curses.c" conditionally includes "<curses.h>"

"/usr/include/curses.h" includes "<widec.h>"

"/usr/include/widec.h" includes "<euc.h>"

"/usr/include/euc.h" includes "<sys/euc.h>"

"/usr/include/sys/euc.h" defines "#define ISPRINT(c, wp)
(wp._multibyte && !ISASCII(c) || isprint(c))"

Then "ruby-trunk/ext/curses/curses.c" defines function "curses_getch"
which uses ISPRINT macro. (In Ruby 1.9.1 Preview 1, "curses_getch"
didn't use ISPRINT macro.)

On Dec 4, 2008, at 12:39 PM, Nobuyoshi Nakada wrote:

Hi,

At Thu, 4 Dec 2008 12:15:03 +0900,
Dae San Hwang wrote in [ruby-core:20284]:

I've checked system header files and found following macro
definitions
of ISPRINT.

/* in "/usr/include/readline/chardefs.h" */

#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))

/* in "/usr/include/sys/euc.h" */

#define ISPRINT(c, wp) (wp._multibyte && !ISASCII(c) || isprint(c))

Hmmm, they obviously conflict.

I guess the second definition of ISPRINT macro clashes with ruby?

I guess so. Could you tell how/from where those headers are
included?

--
Nobu Nakada

=end

Actions #5

Updated by matz (Yukihiro Matsumoto) over 15 years ago

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

=begin
Applied in changeset r20482.
=end

Actions #6

Updated by daesan (Dae San Hwang) over 15 years ago

=begin
Thanks Matz!

There is another occurrence of ISPRINT in function "window_getch" in
"ext/curses/curses.c" on line 1134 though. Could you please patch it
as well?

thanks,

daesan

On Dec 4, 2008, at 2:01 PM, Yukihiro Matsumoto wrote:

Issue #805 has been updated by Yukihiro Matsumoto.

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

Applied in changeset r20482.

http://redmine.ruby-lang.org/issues/show/805


http://redmine.ruby-lang.org

=end

Actions #7

Updated by matz (Yukihiro Matsumoto) over 15 years ago

=begin
Hi,

In message "Re: [ruby-core:20294] Re: Bug #805 Ruby 1.9.1 preview 2 : build failure on OpenSolaris"
on Thu, 4 Dec 2008 14:34:43 +0900, Dae San Hwang writes:

|There is another occurrence of ISPRINT in function "window_getch" in
|"ext/curses/curses.c" on line 1134 though. Could you please patch it
|as well?

Oops, sorry. I just checked in.

						matz.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0