Project

General

Profile

Bug #5491

build failure on Tru64 UNIX 5.1

Added by twwlogin (The Written Word Inc) about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
UNKNOWN
Backport:
[ruby-core:40432]

Description

Building 1.9.2 with latest svn revision at 33531 produces a build error because defines leave and except:
/* definitions of keywords and intrinsic function names */
#ifndef __cplusplus
#define try __builtin_try
#endif
#define except __builtin_except
#define leave __builtin_leave
#define finally __builtin_finally

cc -ieee -g -I. -I.ext/include/alphaev67-osf5.1 -I./include -I. -DRUBY_EXPORT -o compile.o -c compile.c
cc: Error: compile.c, line 504: In this statement, "YARVINSN_builtin_leave" is not declared. (undeclared)
ADD_INSN(ret, iseq->compile_data->last_line, leave);
--------^
cc: Error: compile.c, line 3584: In this statement, "YARVINSN
builtin_leave" is not declared. (undeclared)
ADD_INSN(ret, nd_line(node), leave);
------------^
cc: Error: compile.c, line 4273: In this statement, "YARVINSN
__builtin_leave" is not declared. (undeclared)
ADD_INSN(ret, nd_line(node), leave);
--------------------^
gmake: *** [compile.o] Error 1


Files

patch (978 Bytes) patch #undef leave and except to undo #define's under Tru64 UNIX twwlogin (The Written Word Inc), 10/27/2011 11:42 AM
#2

Updated by naruse (Yui NARUSE) about 9 years ago

I understand the problem, but the patch is hard to merge.
What header includes c_excpt.h?
I want to undef them just after including a header.

Updated by twwlogin (The Written Word Inc) about 9 years ago

For compile.c, we have:
#include "ruby/ruby.h"
#include "vm_core.h"
#include "thread_pthread.h"
#include
#include
#include

So, if you #undef leave and #undef except after #include in thread_pthread.h, that's a solution as well.

Updated by nobu (Nobuyoshi Nakada) about 9 years ago

=begin
You mean this?

diff --git a/thread_pthread.h b/thread_pthread.h
index f180a79..b3e7c36 100644
--- a/thread_pthread.h
+++ b/thread_pthread.h
@@ -32,6 +32,11 @@ typedef struct native_thread_data_struct {

#include

+#undef except
+#undef try
+#undef leave
+#undef finally
+
typedef struct rb_global_vm_lock_struct {
/* fast path */
unsigned long acquired;
=end

Updated by twwlogin (The Written Word Inc) almost 9 years ago

Yes, that should work.

#6

Updated by nobu (Nobuyoshi Nakada) almost 9 years ago

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

This issue was solved with changeset r33546.
The Written Word, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • thread_pthread.h: no Structured Exception Handling like macros. [ruby-core:40432] [Bug #5491]

Also available in: Atom PDF