zhmz90 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Vim 7.4.465 does not compile on AIX 6.1 #265

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create make file
   ./configure --with-features=huge --enable-gui=no
2.
   Execute make command

It compile, and stop with two error, the text output for the first error, 
commented line error:
--->    mkdir objects
        CC="cc -qlanglvl=extc89 -Iproto -DHAVE_CONFIG_H        " srcdir=. sh ./osdef.sh
        cc -qlanglvl=extc89 -c -I. -Iproto -DHAVE_CONFIG_H     -g       -o objects/buffer.o buffer.c
        cc -qlanglvl=extc89 -c -I. -Iproto -DHAVE_CONFIG_H     -g       -o objects/blowfish.o blowfish.c
...
        cc -qlanglvl=extc89 -c -I. -Iproto -DHAVE_CONFIG_H     -g       -o objects/quickfix.o quickfix.c
        cc -qlanglvl=extc89 -c -I. -Iproto -DHAVE_CONFIG_H     -g       -o objects/regexp.o regexp.c
"regexp_nfa.c", line 4410.1: 1506-046 (S) Syntax error.
make: The error code from the last command is 1.

  I modified the commented line 4410 :
   //       nfa_match = TRUE;
  like this :
   /*       nfa_match = TRUE; */
and after modification the make works.
2b. The second error, Link phase:
--->
  cc -qlanglvl=extc89     -o vim objects/buffer.o  objects/blowfish.o  objects/charset.o  objects/crypt.o  objects/crypt_zip.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/mark.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/sha256.o  objects/spell.o  objects/syntax.o    objects/tag.o  objects/term.o  objects/ui.o  objects/undo.o  objects/version.o  objects/window.o                      objects/netbeans.o    objects/main.o  objects/memfile.o       -lSM -lICE -lXpm  -lXt -lX11      -lm -lcurses -lnsl  -liconv
ld: 0711-317 ERROR: Undefined symbol: .Xutf8SetWMProperties
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: The error code from the last command is 8.

Second error is the like the issue 187 :
https://code.google.com/p/vim/issues/detail?id=187  

Following up, changing the line with:
 #  define USE_UTF8_STRING 
to 
 #  undef USE_UTF8_STRING 

in vim74/src/os_unix.c completely solved the problem.

What is the expected output? 
The make command compile the sources, the text output:
##
    mkdir objects
        CC="cc -qlanglvl=extc89 -Iproto -DHAVE_CONFIG_H        " srcdir=. sh ./osdef.sh
        cc -qlanglvl=extc89 -c -I. -Iproto -DHAVE_CONFIG_H     -g       -o objects/buffer.o buffer.c
...
        cc -qlanglvl=extc89 -c -I. -Iproto -DHAVE_CONFIG_H     -g       -o objects/os_unix.o os_unix.c
        cc -qlanglvl=extc89 -c -I. -Iproto -DHAVE_CONFIG_H     -g       version.c -o objects/version.o
  cc -qlanglvl=extc89     -o vim objects/buffer.o  objects/blowfish.o  objects/charset.o  objects/crypt.o  objects/crypt_zip.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/mark.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/sha256.o  objects/spell.o  objects/syntax.o    objects/tag.o  objects/term.o  objects/ui.o  objects/undo.o  objects/version.o  objects/window.o                      objects/netbeans.o    objects/main.o  objects/memfile.o       -lSM -lICE -lXpm  -lXt -lX11      -lm -lcurses -lnsl  -liconv                  
link.sh: OK, linking works, let's try omitting a few libraries.
link.sh: See auto/link.log for details.
link.sh: Trying to omit the SM library...
link.sh: Vim DOES need the SM library.
link.sh: Trying to omit the ICE library...
link.sh: Vim DOES need the ICE library.
link.sh: Trying to omit the nsl library...
link.sh: Vim doesn't need the nsl library!
link.sh: Trying to omit the iconv library...
link.sh: Vim DOES need the iconv library.
link.sh: Trying to omit the Xt library...
link.sh: Vim DOES need the Xt library.
link.sh: Trying to omit the Xpm library...
link.sh: Vim doesn't need the Xpm library!
link.sh: Trying to omit the X11 library...
link.sh: Vim DOES need the X11 library.
creating auto/pathdef.c
        cc -qlanglvl=extc89 -c -I. -Iproto -DHAVE_CONFIG_H     -g       -o objects/pathdef.o auto/pathdef.c
link.sh: Using auto/link.sed file to omit a few libraries
  cc -qlanglvl=extc89     -o vim objects/buffer.o  objects/blowfish.o  objects/charset.o  objects/crypt.o  objects/crypt_zip.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/mark.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/sha256.o  objects/spell.o  objects/syntax.o    objects/tag.o  objects/term.o  objects/ui.o  objects/undo.o  objects/version.o  objects/window.o                      objects/netbeans.o    objects/main.o  objects/memfile.o       -lSM -lICE -lXt -lX11      -lm -lcurses -liconv
link.sh: Linked fine with a few libraries omitted
        cd xxd; CC="cc -qlanglvl=extc89" CFLAGS=" -g" LDFLAGS=""  make -f Makefile
        cc -qlanglvl=extc89  -g  -DUNIX -o xxd xxd.c
Target "first" is up to date.

What do you see instead?
The two error above.

What version of the product are you using? On what operating system?
:ver
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Oct  8 2014 18:41:00)
Included patches: 1-464
Compiled by test_user@Aix6_1server
Huge version without GUI.  Features included (+) or not (-):
+acl             +cscope          +folding         +menu            
+netbeans_intg   -sniff           +virtualedit
+arabic          +cursorbind      -footer          +mksession       +path_extra 
     +startuptime     +visual
+autocmd         +cursorshape     +fork()          +modify_fname    -perl       
     +statusline      +visualextra
-balloon_eval    +dialog_con      -gettext         +mouse           
+persistent_undo -sun_workshop    +viminfo
-browse          +diff            -hangul_input    -mouseshape      +postscript 
     +syntax          +vreplace
++builtin_terms  +digraphs        +iconv           +mouse_dec       +printer    
     +tag_binary      +wildignore
+byte_offset     -dnd             +insert_expand   -mouse_gpm       +profile    
     +tag_old_static  +wildmenu
+cindent         -ebcdic          +jumplist        -mouse_jsbterm   -python     
     -tag_any_white   +windows
+clientserver    +emacs_tags      +keymap          +mouse_netterm   -python3    
     -tcl             +writebackup
+clipboard       +eval            +langmap         +mouse_sgr       +quickfix   
     +terminfo        +X11
+cmdline_compl   +ex_extra        +libcall         -mouse_sysmouse  +reltime    
     +termresponse    +xfontset
+cmdline_hist    +extra_search    +linebreak       +mouse_urxvt     +rightleft  
     +textobjects     -xim
+cmdline_info    +farsi           +lispindent      +mouse_xterm     -ruby       
     +title           +xsmp_interact
+comments        +file_in_path    +listcmds        +multi_byte      +scrollbind 
     -toolbar         +xterm_clipboard
+conceal         +find_in_path    +localmap        +multi_lang      +signs      
     +user_commands   -xterm_save
+cryptv          +float           -lua             -mzscheme        
+smartindent     +vertsplit       -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: cc -qlanglvl=extc89 -c -I. -Iproto -DHAVE_CONFIG_H     -g
Linking: cc -qlanglvl=extc89    -o vim       -lSM -lICE -lXt -lX11      -lm 
-lcurses -liconv

Original issue reported on code.google.com by Zulolox4...@gmail.com on 11 Oct 2014 at 7:44

GoogleCodeExporter commented 9 years ago
Part 1 has just been fixed by Patch 7.4.474

Fort part 2, does this patch fix it for you?
diff --git a/src/os_unix.c b/src/os_unix.c
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1961,7 +1961,8 @@ get_x11_thing(get_title, test_only)
 }

 /* Are Xutf8 functions available?  Avoid error from old compilers. */
-#if defined(X_HAVE_UTF8_STRING) && defined(FEAT_MBYTE)
+/* AIX does not have Xutf8SetWMPropoerties method */
+#if defined(X_HAVE_UTF8_STRING) && defined(FEAT_MBYTE) && !defined(_AIX)
 # if X_HAVE_UTF8_STRING
 #  define USE_UTF8_STRING
 # endif

Original comment by chrisbr...@googlemail.com on 11 Oct 2014 at 11:19

GoogleCodeExporter commented 9 years ago
Thanks !
I use vim console (I don't have X windows). May be adding a directive if 
defined(_AIX) somewhere to solve the problem on the line " #define 
USE_UTF8_STRING ".
To solve the link problem I changed the line :

#  define USE_UTF8_STRING 

to an undefine, like this :

 #  undef USE_UTF8_STRING 

in src/os_unix.c file.
But after tomorrow I will test the patch, with the latest source code (474).
Best regards ! 

Original comment by Zulolox4...@gmail.com on 11 Oct 2014 at 12:18

GoogleCodeExporter commented 9 years ago
The // comment line should not be there.  I tried running the tests but forgot 
to remove the line.  Fixed in patch 7.4.474.

To detect whether Xutf8SetWMProperties() actually is implemented requires a 
configure check.  Added by 7.4.475

Original comment by brammool...@gmail.com on 11 Oct 2014 at 1:01

GoogleCodeExporter commented 9 years ago
Thanks a lot !

Original comment by Zulolox4...@gmail.com on 11 Oct 2014 at 4:48