java - How do I install GCJ on OSX

05
2014-06
  • stib

    I've looked at the gcj page and though there's downloads links they're only for downloading gcc, and with the apple version of gcc there is no gcj included:

    $ gcc --version
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
    Target: x86_64-apple-darwin13.1.0
    Thread model: posix
    $ gcj
    zsh: command not found: gcj
    

    or with the homebrew-installed gcc 4.9:

    ➜  ~  gcc-4.9 --version
    gcc-4.9 (GCC) 4.9.0 20140302 (experimental)
    Copyright (C) 2014 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    ➜  ~  gcj
    zsh: command not found: gcj
    

    and searching for it in the gcc help doesn't work:

    ➜  ~  gcc --help|grep -i gcj
    ➜  ~  gcc --help|grep -i java
    ➜  ~  gcc-4.9 --help|grep -i java 
    ➜  ~  gcc-4.9 --help|grep -i gcj
    

    I've seen this post about how to install it on Linux, and I was hoping there'd be a homebrew formula, bit no such luck.

    Any ideas on how to install GCJ on OSX?

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    linux - How to compile Vim 7.3 with +signs on OSX 10.6.6?
  • audio.zoom

    I'm trying to follow this guide http://tech.blog.box.net/2007/06/20/how-to-debug-php-with-vim-and-xdebug-on-linux/ and I need to compile Vim with signs and python options.

    I have:

    • downloaded the latest source with hg clone https://vim.googlecode.com/hg/ vim
    • uncommented the signs feature in src/feature.h
    • ran ./configure --enable-perlinterp --enable-pythoninterp with no errors
    • ran make with this output and errors that I don't understand and can't find on google:
    $ make
    gcc -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -D_FORTIFY_SOURCE=1       -o objects/ex_cmds.o ex_cmds.c
    ex_cmds.c: In function ‘ex_sign’:
    ex_cmds.c:6736: error: ‘gui’ undeclared (first use in this function)
    ex_cmds.c:6736: error: (Each undeclared identifier is reported only once
    ex_cmds.c:6736: error: for each function it appears in.)
    ex_cmds.c:6741: warning: assignment makes pointer from integer without a cast
    ex_cmds.c: In function ‘sign_gui_started’:
    ex_cmds.c:7013: warning: assignment makes pointer from integer without a cast
    make: *** [objects/ex_cmds.o] Error 1
    

    Any daring souls out there that have already been down this path (and/or ones that can tell me where I can move from here) will be greatly appreciated!


  • Related Answers
  • nik

    From the latest comment on your referred page,

    If you get this error:
    
    ex_cmds.c: In function ‘ex_sign’:
    ex_cmds.c:6541: error: ‘gui’ undeclared (first use in this function)
    ex_cmds.c:6541: error: (Each undeclared identifier is reported only once
    ex_cmds.c:6541: error: for each function it appears in.)
    ex_cmds.c:6546: warning: assignment makes pointer from integer without a cast
    ex_cmds.c: In function ‘sign_gui_started’:
    ex_cmds.c:6832: warning: assignment makes pointer from integer without a cast
    make[1]: *** [objects/ex_cmds.o] Error 1
    
    The fix for me was to NOT comment out the if statement for:
    
    define FEAT_SIGN_ICONS
    
    So, that define was not set when compiling.