[MacRuby-devel] [MacRuby] #526: Can't compile r3157 in 10.5 (Leopard)
MacRuby
ruby-noreply at macosforge.org
Mon Dec 28 21:36:05 PST 2009
#526: Can't compile r3157 in 10.5 (Leopard)
------------------------------+---------------------------------------------
Reporter: kouji@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: critical | Milestone: MacRuby 0.5
Component: MacRuby | Keywords:
------------------------------+---------------------------------------------
I can't compile r3157 in Mac OS X 10.5 (Leopard).
The compile error messages are below.
{{{
/usr/bin/g++ -I/usr/local/include -D_DEBUG -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-common
-Woverloaded-virtual -I. -I./include -g -Wall -arch i386 -arch x86_64
-Wno-parentheses -Wno-deprecated-declarations -Werror --param inline-unit-
growth=10000 --param large-function-growth=10000 -x objective-c++ -c
dispatcher.cpp -o dispatcher.o
dispatcher.cpp: In member function ‘bool RoxorCore::respond_to(VALUE,
VALUE, objc_selector*, bool, bool)’:
dispatcher.cpp:1881: error: ‘_objc_msgForward’ was not declared in this
scope
dispatcher.cpp: In member function ‘bool RoxorCore::respond_to(VALUE,
VALUE, objc_selector*, bool, bool)’:
dispatcher.cpp:1881: error: ‘_objc_msgForward’ was not declared in this
scope
lipo: can't figure out the architecture type of: /var/folders/V1
/V1pXiLInG-WGnqamJqeocE+++TI/-Tmp-//ccqTDIjM.out
}}}
Below patch fixes it.
{{{
diff --git a/dispatcher.cpp b/dispatcher.cpp
index bb14faf..bbdbd71 100644
--- a/dispatcher.cpp
+++ b/dispatcher.cpp
@@ -1821,6 +1821,11 @@ rb_vm_get_method(VALUE klass, VALUE obj, ID mid,
int scope)
extern IMP basic_respond_to_imp; // vm_method.c
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+// the function is available on Leopard but it's not declared
+extern "C" id _objc_msgForward(id receiver, SEL sel, ...);
+#endif
+
bool
RoxorCore::respond_to(VALUE obj, VALUE klass, SEL sel, bool priv,
bool check_override)
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/526>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list