[vtk-developers] Mac OS X Build failure

Goodwin Lawlor goodwin.lawlor.lists at gmail.com
Tue Feb 26 16:53:43 EST 2013


Tk8.6

Here's the error message when "-framework Carbon" is omitted. Strange for a
couple of reasons - I set VTK_USE_COCOA and at least the symbol
AEProcessAppleEvent seems to be from the CoreServices framework.

Undefined symbols for architecture x86_64:

  "_AEProcessAppleEvent", referenced from:

      _TkMacOSXDoHLEvent in libtk8.6.a(tkMacOSXHLEvents.o)

  "_GetCurrentButtonState", referenced from:

      _TkpWarpPointer in libtk8.6.a(tkMacOSXMouseEvent.o)

      _TkMacOSXButtonKeyState in libtk8.6.a(tkMacOSXMouseEvent.o)

  "_GetCurrentEvent", referenced from:

      _TkMacOSXModifierState in libtk8.6.a(tkMacOSXMouseEvent.o)

      _TkpWarpPointer in libtk8.6.a(tkMacOSXMouseEvent.o)

      _TkMacOSXButtonKeyState in libtk8.6.a(tkMacOSXMouseEvent.o)

  "_GetCurrentEventButtonState", referenced from:

      _TkpWarpPointer in libtk8.6.a(tkMacOSXMouseEvent.o)

      _TkMacOSXButtonKeyState in libtk8.6.a(tkMacOSXMouseEvent.o)

  "_GetCurrentEventKeyModifiers", referenced from:

      _TkMacOSXModifierState in libtk8.6.a(tkMacOSXMouseEvent.o)

      _TkMacOSXButtonKeyState in libtk8.6.a(tkMacOSXMouseEvent.o)

      -[TKApplication(TKMenus) orderFrontStandardAboutPanel:] in
libtk8.6.a(tkMacOSXMenus.o)

  "_GetCurrentKeyModifiers", referenced from:

      _TkMacOSXModifierState in libtk8.6.a(tkMacOSXMouseEvent.o)

      _TkMacOSXButtonKeyState in libtk8.6.a(tkMacOSXMouseEvent.o)

  "_GetEventParameter", referenced from:

      -[TKApplication(TKMouseEvent) tkProcessMouseEvent:] in
libtk8.6.a(tkMacOSXMouseEvent.o)

  "_GetMainEventQueue", referenced from:

      _Tk_MacOSXSetupTkNotifier in libtk8.6.a(tkMacOSXNotify.o)

      _TkMacOSXNotifyExitHandler in libtk8.6.a(tkMacOSXNotify.o)

  "_GetThemeMenuItemExtra", referenced from:

      _TkpMenuInit in libtk8.6.a(tkMacOSXMenu.o)

  "_GetThemeMenuSeparatorHeight", referenced from:

      _TkpMenuInit in libtk8.6.a(tkMacOSXMenu.o)

  "_GetThemeMetric", referenced from:

      _TkpMenuInit in libtk8.6.a(tkMacOSXMenu.o)

      _UpdateScrollbarMetrics in libtk8.6.a(tkMacOSXScrlbr.o)

      _ButtonElementSize in libtk8.6.a(ttkMacOSXTheme.o)

      _SpinButtonElementSize in libtk8.6.a(ttkMacOSXTheme.o)

      _DisclosureElementSize in libtk8.6.a(ttkMacOSXTheme.o)

      _ButtonElementSizeNoPadding in libtk8.6.a(ttkMacOSXTheme.o)

      _TrackElementSize in libtk8.6.a(ttkMacOSXTheme.o)

      ...

  "_HIThemeApplyBackground", referenced from:

      _TkMacOSXSetColorInContext in libtk8.6.a(tkMacOSXColor.o)

  "_HIThemeBrushCreateCGColor", referenced from:

      _GetThemeColor in libtk8.6.a(tkMacOSXColor.o)

  "_HIThemeDrawButton", referenced from:

      _TkpDrawSpinboxButtons in libtk8.6.a(tkMacOSXEntry.o)

      _ButtonElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

      _SpinButtonElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

      _ComboboxElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

      _DisclosureElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

      _TreeHeaderElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeDrawFrame", referenced from:

      _TkpDrawEntryBorderAndFocus in libtk8.6.a(tkMacOSXEntry.o)

      _EntryElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeDrawGroupBox", referenced from:

      _GroupElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeDrawGrowBox", referenced from:

      _SizegripElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeDrawSeparator", referenced from:

      _SeparatorElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeDrawTab", referenced from:

      _TabElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeDrawTabPane", referenced from:

      _PaneElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeDrawTrack", referenced from:

      _TrackElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

      _PbarElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeGetButtonContentBounds", referenced from:

      _ButtonElementSize in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeGetGrowBoxBounds", referenced from:

      _SizegripElementSize in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeGetTrackDragRect", referenced from:

      _UpdateScrollbarMetrics in libtk8.6.a(tkMacOSXScrlbr.o)

  "_HIThemeGetUIFontType", referenced from:

      _TkpFontPkgInit in libtk8.6.a(tkMacOSXFont.o)

      _TkpGetNativeFont in libtk8.6.a(tkMacOSXFont.o)

  "_HIThemeSetFill", referenced from:

      _TkMacOSXSetColorInContext in libtk8.6.a(tkMacOSXColor.o)

      _FillElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

      _ToolbarBackgroundElementDraw in libtk8.6.a(ttkMacOSXTheme.o)

  "_HIThemeSetStroke", referenced from:

      _TkMacOSXSetColorInContext in libtk8.6.a(tkMacOSXColor.o)

  "_HIThemeSetTextFill", referenced from:

      _TkMacOSXSetColorInContext in libtk8.6.a(tkMacOSXColor.o)

  "_LMGetKbdType", referenced from:

      _XKeycodeToKeysym in libtk8.6.a(tkMacOSXKeyboard.o)

  "_TISCopyCurrentKeyboardLayoutInputSource", referenced from:

      _XKeycodeToKeysym in libtk8.6.a(tkMacOSXKeyboard.o)

  "_TISGetInputSourceProperty", referenced from:

      _XKeycodeToKeysym in libtk8.6.a(tkMacOSXKeyboard.o)

  "_kTISPropertyUnicodeKeyLayoutData", referenced from:

      _XKeycodeToKeysym in libtk8.6.a(tkMacOSXKeyboard.o)

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see
invocation)


On Tue, Feb 26, 2013 at 9:41 PM, David Gobbi <david.gobbi at gmail.com> wrote:

> Do you remember what symbols were missing that required
> the "-framework Carbon"?  Was that for tk 8.5 or 8.6?
>
>  - David
>
> On Tue, Feb 26, 2013 at 2:31 PM, Goodwin Lawlor
> <goodwin.lawlor.lists at gmail.com> wrote:
> > Thanks David,
> >
> > I installed my static Tcl/Tk libs and it worked out too... so long as
> you do
> > a "sudo make install_private_headers"
> >
> > I always thought Tk bundled X11 libs solely for win32 benefits but it
> seems
> > Aqua builds require them over the system libs. When you diff the tk
> Xlib.h
> > against the system one they are quite different.
> >
> > Also there was a small link problem too - "-framework Carbon" had to be
> > added to linker.
> >
> > Goodwin
> >
> >
> > On Tue, Feb 26, 2013 at 4:16 AM, David Gobbi <david.gobbi at gmail.com>
> wrote:
> >>
> >> Hi Goodwin,
> >>
> >> For Win32 builds, there is a CMake variable called TK_XLIB_PATH that
> >> is set to the directory where X11/Xlib.h is to be found.  As far as I
> >> understand, that variable is only needed when you are building VTK
> >> against a Tk source directory.  Once Tk is installed, the X11
> >> directory is installed in the Tk include directory and X11/Xlib.h is
> >> found automatically.
> >>
> >> So I'm guessing that the reason the TK_XLIB_PATH variable isn't
> >> present under OS X is that very few people (or maybe no people) have
> >> ever tried building against a Tk source directory on OS X.
> >>
> >> If you're interested you can grep the VTK cmake files for TK_XLIB_PATH
> >> to see how things are done for Windows, and then make things work the
> >> same way for OS X.
> >>
> >>  - David
> >>
> >>
> >> On Mon, Feb 25, 2013 at 7:17 PM, Goodwin Lawlor
> >> <goodwin.lawlor.lists at gmail.com> wrote:
> >> >
> >> > Looking at the Tk Makefile, it seems that when building static libs
> with
> >> > Aqua you have to force the inclusion of Xlib.h from the Tk source
> tree (ie,
> >> > from the tk/xlib directory)
> >> >
> >> > So, adding
> >> >
> >> >     INCLUDE_DIRECTORIES(BEFORE ${TK_INCLUDE_PATH}/../xlib)
> >> >
> >> > to VTK/Rendering/CMakeLists.txt fixed things.
> >> >
> >> > hth someone.
> >> >
> >> > Goodwin
> >> >
> >> > On Mon, Feb 25, 2013 at 10:02 PM, Goodwin Lawlor
> >> > <goodwin.lawlor.lists at gmail.com> wrote:
> >> >>
> >> >> Hi All,
> >> >>
> >> >> I'm building VTK (5.10.1 and Nightly) on Mac OS X 10.7.5
> >> >>
> >> >> I'm building static libs with Tcl wrappers (v8.5.13 and v8.6).
> >> >>
> >> >> The build fails on vtkTkRenderWidget with
> >> >>
> >> >> In file included from
> >> >> /Users/GoodwinLawlor/code/VTK/Rendering/vtkTkRenderWidget.cxx:35:
> >> >> In file included from
> >> >> /Users/GoodwinLawlor/code/tcltk/tk8.6/generic/tkInt.h:19:
> >> >> In file included from
> >> >> /Users/GoodwinLawlor/code/tcltk/tk8.6/generic/tkPort.h:25:
> >> >> In file included from
> >> >> /Users/GoodwinLawlor/code/tcltk/tk8.6/macosx/tkMacOSXPort.h:56:
> >> >>
> /Users/GoodwinLawlor/code/tcltk/tk8.6/generic/tkIntXlibDecls.h:380:16:
> >> >> error: conflicting types for 'XKeycodeToKeysym'
> >> >> EXTERN KeySym           XKeycodeToKeysym(Display *d, KeyCode k, int
> i);
> >> >>                         ^
> >> >> /usr/include/X11/Xlib.h:1694:15: note: previous declaration is here
> >> >> extern KeySym XKeycodeToKeysym(
> >> >>
> >> >> I've got VTK_USE_X = 0 and VTK_USE_COCOA = 1
> >> >>
> >> >> Basically, tkIntXlibDecls.h is declaring the same types as Xlib.h
> >> >>
> >> >> Grateful for any hints before going grepping...
> >> >>
> >> >> Thanks,
> >> >>
> >> >> Goodwin
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130226/922f1fdf/attachment.html>


More information about the vtk-developers mailing list