Coder Social home page Coder Social logo

Build failure on MacOS X about ui HOT 5 CLOSED

andlabs avatar andlabs commented on June 26, 2024
Build failure on MacOS X

from ui.

Comments (5)

andlabs avatar andlabs commented on June 26, 2024

I think I know what's going on here, but to be sure: what version of Mac OS X and what version of Xcode are you using? Thanks.

from ui.

tompao avatar tompao commented on June 26, 2024

MacOS X 10.7.5
XCode 4.1
SDKs for MacOS 10.6 and 10.7

Thanks

from ui.

andlabs avatar andlabs commented on June 26, 2024

Can't check it myself right now (on Xcode 5) but does this patch fix it?

diff --git a/objc_darwin.h b/objc_darwin.h
index 1208e0e..e2d9d92 100644
--- a/objc_darwin.h
+++ b/objc_darwin.h
@@ -26,7 +26,7 @@ extern Class NilClass;
 /* for listbox_darwin.go */
 extern id *_NSObservedObjectKey;

-inline id objc_msgSend_noargs(id obj, SEL sel)
+static inline id objc_msgSend_noargs(id obj, SEL sel)
 {
    return objc_msgSend(obj, sel);
 }
@@ -52,25 +52,25 @@ extern uintptr_t objc_msgSend_uintret_noargs(id objc, SEL sel);
 extern intptr_t objc_msgSend_intret_noargs(id obj, SEL sel);

 #define m1(name, type1) \
-   inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a) \
+   static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a) \
    { \
        return objc_msgSend(obj, sel, a); \
    }

 #define m2(name, type1, type2) \
-   inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b) \
+   static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b) \
    { \
        return objc_msgSend(obj, sel, a, b); \
    }

 #define m3(name, type1, type2, type3) \
-   inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c) \
+   static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c) \
    { \
        return objc_msgSend(obj, sel, a, b, c); \
    }

 #define m4(name, type1, type2, type3, type4) \
-   inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c, type4 d) \
+   static inline id objc_msgSend_ ## name (id obj, SEL sel, type1 a, type2 b, type3 c, type4 d) \
    { \
        return objc_msgSend(obj, sel, a, b, c, d); \
    }

from ui.

tompao avatar tompao commented on June 26, 2024

Hi Pietro,

Thanks, the fix works and compilation goes past that point.
With go 1.2.1, linkage fails with undefined symbols, so I realized only go tip (future 1.3) is supported... doh!

My suggestion is to add a note in the documentation, this limitation was not clear.

For reference, the error with go 1.2.1 is:

Undefined symbols for architecture x86_64:
  "_NilClass", referenced from:
      __cgohack_NilClass in _cgo_main.o
     (maybe you meant: __cgohack_NilClass)
  "__NSObservedObjectKey", referenced from:
      __cgohack__NSObservedObjectKey in _cgo_main.o
     (maybe you meant: __cgohack__NSObservedObjectKey)
  "_objc_msgSend_stret_rect_noargs", referenced from:
      __cgo_778eeb4287e1_Cfunc_objc_msgSend_stret_rect_noargs in delegate_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_stret_rect_noargs)
  "_objc_msgSend_uintret_noargs", referenced from:
      __cgo_778eeb4287e1_Cfunc_objc_msgSend_uintret_noargs in listbox_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_uintret_noargs)
  "_objc_msgSend_id_uint", referenced from:
      __cgo_778eeb4287e1_Cfunc_objc_msgSend_id_uint in listbox_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_id_uint)
  "_NSIndexSetEntries", referenced from:
      __cgo_778eeb4287e1_Cfunc_NSIndexSetEntries in listbox_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc_NSIndexSetEntries)
  "__objc_msgSend_rect", referenced from:
      __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect in objc_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect, __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_bool , __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_uint_uint_bool )
  "__objc_msgSend_uint", referenced from:
      __cgo_778eeb4287e1_Cfunc__objc_msgSend_uint in objc_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc__objc_msgSend_uint)
  "__objc_msgSend_rect_uint_uint_bool", referenced from:
      __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_uint_uint_bool in objc_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_uint_uint_bool)
  "__objc_msgSend_rect_bool", referenced from:
      __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_bool in objc_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc__objc_msgSend_rect_bool)
  "_objc_msgSend_intret_noargs", referenced from:
      __cgo_778eeb4287e1_Cfunc_objc_msgSend_intret_noargs in sysdata_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_intret_noargs)
  "_objc_msgSend_int", referenced from:
      __cgo_778eeb4287e1_Cfunc_objc_msgSend_int in sysdata_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_int, __cgo_778eeb4287e1_Cfunc_objc_msgSend_intret_noargs )
  "_objc_msgSend_id_int", referenced from:
      __cgo_778eeb4287e1_Cfunc_objc_msgSend_id_int in sysdata_darwin.cgo2.o
     (maybe you meant: __cgo_778eeb4287e1_Cfunc_objc_msgSend_id_int)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

from ui.

andlabs avatar andlabs commented on June 26, 2024

Fixed by 7866d3e
Also added a Go 1.3 note: ebd15cc
(I didn't specify the fixes line in the commit message properly.)
Thanks again!

from ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.