Loading ...
Sorry, an error occurred while loading the content.

Re: trouble compiling x11/motif vim72b on macosx

Expand Messages
  • Ben Schmidt
    ... Try editing vim.h as follows (your line numbers seem different to mine, but it s at about line 174). #ifdef NO_X11_INCLUDES /* In os_mac_conv.c
    Message 1 of 3 , Jul 31, 2008
    • 0 Attachment
      raf wrote:
      > hi,
      >
      > i've had vim-6.3 on my mac for a long time and i
      > decided it's time to upgrade.
      >
      > i tried the following configure command (worked with 6.3):
      >
      > $ ./configure --with-x --enable-gui=motif --enable-multibyte
      >
      > but had compile errors (see below). the compile errors were
      > because selecting --with-x --enable-gui=motif didn't
      > automatically cause --disable-darwin to be assumed. i'd
      > written a patch to make this happen ages ago and it was
      > supposed to be included as of vim-7.0 but it seems not to
      > have been.
      >
      > so then i added --disable-darwin which changed the compile
      > errors into link errors (see below).
      >
      > then i tried athena, vim-6.4, 7.0 and 7.1 and they
      > all had the same link errors.
      >
      > i'm sure it's not a vim issue but rather an environment
      > issue on my mac. i recently upgraded from xcode-2.0 to
      > xcode-2.5. i found a reference to a similar-looking problem
      > here:
      >
      > http://lists.apple.com/archives/Xcode-users/2005/Jul/msg00563.html
      >
      > which said that including libSystemStubs.a fixed the link
      > errors.
      >
      > so then i tried LIBS="-lSystemStubs" before the configure
      > command but it had no effect on the link errors. not all of
      > the link errors seemed to be libSystem-related but even the
      > ones that were weren't resolved.
      >
      > i tried --disable-acl and that got rid of the acl-related
      > link errors but that's all.
      >
      > does anyone have any ideas on what i could try next?

      Try editing vim.h as follows (your line numbers seem different to mine,
      but it's at about line 174).

      #ifdef NO_X11_INCLUDES
      /* In os_mac_conv.c NO_X11_INCLUDES is defined to avoid X11 headers.
      * Disable all X11 related things to avoid conflicts. */
      +# ifdef FEAT_GUI_X11
      +# undef FEAT_GUI_X11
      +# endif
      # ifdef FEAT_X11
      # undef FEAT_X11
      # endif

      i.e. add those three lines with the + signs (without actually including
      the + signs).

      Without using --disable-darwin, see if that gets you any further...It
      baffles me, though, why it would cause you problems with Motif and not
      cause me problems with GTK2+.

      By the way, how do you install Motif? I might try it out myself, for
      interest, as well as perhaps to help fix these building problems.

      Ben.



      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • raf
      ... hi ben, that change (without --disable-darwin) gets os_mac_conv.c to compile but the link errors are impressive: $ ./configure --with-x --enable-gui=motif
      Message 2 of 3 , Aug 8, 2008
      • 0 Attachment
        Ben Schmidt wrote:

        > raf wrote:
        > > hi,
        > >
        > > i've had vim-6.3 on my mac for a long time and i
        > > decided it's time to upgrade.
        > >
        > > i tried the following configure command (worked with 6.3):
        > >
        > > $ ./configure --with-x --enable-gui=motif --enable-multibyte
        > >
        > > but had compile errors (see below). the compile errors were
        > > because selecting --with-x --enable-gui=motif didn't
        > > automatically cause --disable-darwin to be assumed. i'd
        > > written a patch to make this happen ages ago and it was
        > > supposed to be included as of vim-7.0 but it seems not to
        > > have been.
        > >
        > > so then i added --disable-darwin which changed the compile
        > > errors into link errors (see below).
        > >
        > > then i tried athena, vim-6.4, 7.0 and 7.1 and they
        > > all had the same link errors.
        > >
        > > i'm sure it's not a vim issue but rather an environment
        > > issue on my mac. i recently upgraded from xcode-2.0 to
        > > xcode-2.5. i found a reference to a similar-looking problem
        > > here:
        > >
        > > http://lists.apple.com/archives/Xcode-users/2005/Jul/msg00563.html
        > >
        > > which said that including libSystemStubs.a fixed the link
        > > errors.
        > >
        > > so then i tried LIBS="-lSystemStubs" before the configure
        > > command but it had no effect on the link errors. not all of
        > > the link errors seemed to be libSystem-related but even the
        > > ones that were weren't resolved.
        > >
        > > i tried --disable-acl and that got rid of the acl-related
        > > link errors but that's all.
        > >
        > > does anyone have any ideas on what i could try next?
        >
        > Try editing vim.h as follows (your line numbers seem different to mine,
        > but it's at about line 174).
        >
        > #ifdef NO_X11_INCLUDES
        > /* In os_mac_conv.c NO_X11_INCLUDES is defined to avoid X11 headers.
        > * Disable all X11 related things to avoid conflicts. */
        > +# ifdef FEAT_GUI_X11
        > +# undef FEAT_GUI_X11
        > +# endif
        > # ifdef FEAT_X11
        > # undef FEAT_X11
        > # endif
        >
        > i.e. add those three lines with the + signs (without actually including
        > the + signs).
        >
        > Without using --disable-darwin, see if that gets you any further...It
        > baffles me, though, why it would cause you problems with Motif and not
        > cause me problems with GTK2+.

        hi ben,

        that change (without --disable-darwin) gets os_mac_conv.c to compile but
        the link errors are impressive:

        $ ./configure --with-x --enable-gui=motif --enable-multibyte
        ...
        $make
        ...
        gcc -L/usr/local/lib -L/usr/X11R6/lib -L/usr/local/lib -o vim
        objects/buffer.o objects/charset.o objects/diff.o objects/digraph.o
        objects/edit.o objects/eval.o objects/ex_cmds.o objects/ex_cmds2.o
        objects/ex_docmd.o objects/ex_eval.o objects/ex_getln.o objects/fileio.o
        objects/fold.o objects/getchar.o objects/hardcopy.o objects/hashtab.o
        objects/if_cscope.o objects/if_xcmdsrv.o objects/main.o objects/mark.o
        objects/memfile.o objects/memline.o objects/menu.o objects/message.o
        objects/misc1.o objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o
        objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o
        objects/popupmnu.o objects/quickfix.o objects/regexp.o objects/screen.o
        objects/search.o objects/spell.o objects/syntax.o objects/tag.o objects/term.o
        objects/ui.o objects/undo.o objects/window.o objects/gui.o objects/gui_motif.o
        objects/gui_x11.o objects/pty.o objects/gui_beval.o objects/gui_xmdlg.o
        objects/gui_xmebw.o objects/os_macosx.o objects/os_mac_conv.o
        objects/netbeans.o objects/version.o -lXext -lXm -lXt -lSM -lICE -lXpm -lXt
        -lX11 -lSM -lICE -ldl -lm -lncurses -liconv -framework Carbon
        /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
        _acl_free
        _acl_get_file
        _acl_set_file
        _sigset
        _XmCreateNotebook
        _XmNotebookGetPageInfo
        __XEditResCheckMessages
        _fprintf$LDBL128 referenced from libX11 expected to be defined in libSystem
        _sprintf$LDBL128 referenced from libX11 expected to be defined in libSystem
        ___stdoutp referenced from libncurses expected to be defined in libSystem
        _snprintf$LDBL128 referenced from libXpm expected to be defined in libSystem
        _OSAtomicAdd32 referenced from CoreFoundation expected to be defined in libSystem
        _OSAtomicCompareAndSwap32 referenced from CoreFoundation expected to be defined in libSystem
        _OSMemoryBarrier referenced from CoreFoundation expected to be defined in libSystem
        _OSSpinLockLock referenced from CoreFoundation expected to be defined in libSystem
        _OSSpinLockUnlock referenced from CoreFoundation expected to be defined in libSystem
        _fprintf_l referenced from CoreFoundation expected to be defined in libSystem
        _snprintf_l referenced from CoreFoundation expected to be defined in libSystem
        _strtod_l referenced from CoreFoundation expected to be defined in libSystem
        _uuid_generate_random referenced from CoreFoundation expected to be defined in libSystem
        _OSAtomicAdd32Barrier referenced from CarbonCore expected to be defined in libSystem
        _OSAtomicCompareAndSwap32Barrier referenced from CarbonCore expected to be defined in libSystem
        _accessx_np referenced from CarbonCore expected to be defined in libSystem
        _acl_add_perm referenced from CarbonCore expected to be defined in libSystem
        _acl_copy_entry referenced from CarbonCore expected to be defined in libSystem
        _acl_copy_ext referenced from CarbonCore expected to be defined in libSystem
        _acl_copy_int referenced from CarbonCore expected to be defined in libSystem
        _acl_create_entry referenced from CarbonCore expected to be defined in libSystem
        _acl_create_entry_np referenced from CarbonCore expected to be defined in libSystem
        _acl_delete_entry referenced from CarbonCore expected to be defined in libSystem
        _acl_delete_perm referenced from CarbonCore expected to be defined in libSystem
        _acl_free referenced from CarbonCore expected to be defined in libSystem
        _acl_get_entry referenced from CarbonCore expected to be defined in libSystem
        _acl_get_flag_np referenced from CarbonCore expected to be defined in libSystem
        _acl_get_flagset_np referenced from CarbonCore expected to be defined in libSystem
        _acl_get_link_np referenced from CarbonCore expected to be defined in libSystem
        _acl_get_perm_np referenced from CarbonCore expected to be defined in libSystem
        _acl_get_permset referenced from CarbonCore expected to be defined in libSystem
        _acl_get_qualifier referenced from CarbonCore expected to be defined in libSystem
        _acl_get_tag_type referenced from CarbonCore expected to be defined in libSystem
        _acl_init referenced from CarbonCore expected to be defined in libSystem
        _acl_set_file referenced from CarbonCore expected to be defined in libSystem
        _acl_set_link_np referenced from CarbonCore expected to be defined in libSystem
        _acl_set_permset referenced from CarbonCore expected to be defined in libSystem
        _acl_set_qualifier referenced from CarbonCore expected to be defined in libSystem
        _acl_set_tag_type referenced from CarbonCore expected to be defined in libSystem
        _acl_size referenced from CarbonCore expected to be defined in libSystem
        _chmodx_np referenced from CarbonCore expected to be defined in libSystem
        _fgetxattr referenced from CarbonCore expected to be defined in libSystem
        _filesec_dup referenced from CarbonCore expected to be defined in libSystem
        _filesec_free referenced from CarbonCore expected to be defined in libSystem
        _filesec_get_property referenced from CarbonCore expected to be defined in libSystem
        _filesec_init referenced from CarbonCore expected to be defined in libSystem
        _filesec_set_property referenced from CarbonCore expected to be defined in libSystem
        _flistxattr referenced from CarbonCore expected to be defined in libSystem
        _fremovexattr referenced from CarbonCore expected to be defined in libSystem
        _fsetxattr referenced from CarbonCore expected to be defined in libSystem
        _getxattr referenced from CarbonCore expected to be defined in libSystem
        _listxattr referenced from CarbonCore expected to be defined in libSystem
        _lstatx_np referenced from CarbonCore expected to be defined in libSystem
        _mbr_uid_to_uuid referenced from CarbonCore expected to be defined in libSystem
        _mkdirx_np referenced from CarbonCore expected to be defined in libSystem
        _openx_np referenced from CarbonCore expected to be defined in libSystem
        _removexattr referenced from CarbonCore expected to be defined in libSystem
        _setxattr referenced from CarbonCore expected to be defined in libSystem
        _uuid_is_null referenced from CarbonCore expected to be defined in libSystem
        ___stderrp referenced from libncurses expected to be defined in libSystem
        _nanosleep$UNIX2003 referenced from libncurses expected to be defined in libSystem
        _sscanf$LDBL128 referenced from libX11 expected to be defined in libSystem
        collect2: ld returned 1 exit status
        make[1]: *** [vim] Error 1
        make: *** [first] Error 2

        with --disable-darwin i still get the original linker errors:

        gcc -L/usr/local/lib -L/usr/X11R6/lib -L/usr/local/lib -o vim
        objects/buffer.o objects/charset.o objects/diff.o objects/digraph.o
        objects/edit.o objects/eval.o objects/ex_cmds.o objects/ex_cmds2.o
        objects/ex_docmd.o objects/ex_eval.o objects/ex_getln.o objects/fileio.o
        objects/fold.o objects/getchar.o objects/hardcopy.o objects/hashtab.o
        objects/if_cscope.o objects/if_xcmdsrv.o objects/main.o objects/mark.o
        objects/memfile.o objects/memline.o objects/menu.o objects/message.o
        objects/misc1.o objects/misc2.o objects/move.o objects/mbyte.o objects/normal.o
        objects/ops.o objects/option.o objects/os_unix.o objects/pathdef.o
        objects/popupmnu.o objects/quickfix.o objects/regexp.o objects/screen.o
        objects/search.o objects/spell.o objects/syntax.o objects/tag.o objects/term.o
        objects/ui.o objects/undo.o objects/window.o objects/gui.o objects/gui_motif.o
        objects/gui_x11.o objects/pty.o objects/gui_beval.o objects/gui_xmdlg.o
        objects/gui_xmebw.o objects/netbeans.o objects/version.o -lXext -lXm
        -lXt -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE -ldl -lm -lncurses -liconv
        /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: Undefined symbols:
        _acl_free
        _acl_get_file
        _acl_set_file
        _sigset
        _XmCreateNotebook
        _XmNotebookGetPageInfo
        __XEditResCheckMessages
        _fprintf$LDBL128 referenced from libX11 expected to be defined in libSystem
        _sprintf$LDBL128 referenced from libX11 expected to be defined in libSystem
        ___stdoutp referenced from libncurses expected to be defined in libSystem
        _snprintf$LDBL128 referenced from libXpm expected to be defined in libSystem
        ___stderrp referenced from libncurses expected to be defined in libSystem
        _nanosleep$UNIX2003 referenced from libncurses expected to be defined in libSystem
        _sscanf$LDBL128 referenced from libX11 expected to be defined in libSystem
        collect2: ld returned 1 exit status
        make[1]: *** [vim] Error 1
        make: *** [first] Error 2

        >
        > By the way, how do you install Motif? I might try it out myself, for
        > interest, as well as perhaps to help fix these building problems.

        i have an old version of the lesstif library (0.93.94) from lesstif.org.
        the latest version is 0.95.0. another alternative is openmotif.

        http://www.lesstif.org/
        http://www.ist-inc.com/DOWNLOADS/motif_download.html

        i'll try changing my motif library and see if that helps.

        > Ben.

        cheers,
        raf


        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      Your message has been successfully submitted and would be delivered to recipients shortly.