[vtk-developers] Mac OS X Build failure

David Gobbi david.gobbi at gmail.com
Tue Feb 26 16:41:40 EST 2013


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
>
>



More information about the vtk-developers mailing list