Compile problems: Joe 3.0 on Mac OSX 10.3.3

Help
2004-04-27
2004-08-09
  • Nobody/Anonymous

    Compiles fine until this. Have the whole output, but is rather long so have only included the relevent bit.
    Any suggestions on how to fix the following errors:

    if gcc -DHAVE_CONFIG_H -I. -I. -I. -DJOERC="\"/usr/local/etc/joe/\""    -g -O2 -MT utf8.o -MD -MP -MF ".deps/utf8.Tpo" \   -c -o utf8.o `test -f 'utf8.c' || echo './'`utf8.c; \ then mv ".deps/utf8.Tpo" ".deps/utf8.Po"; \ else rm -f ".deps/utf8.Tpo"; exit 1; \ fi
    utf8.c: In function `to_utf8':
    utf8.c:227: warning: passing arg 2 of `libiconv' from incompatible pointer type
    utf8.c:227: warning: passing arg 3 of `libiconv' from incompatible pointer type
    utf8.c:227: warning: passing arg 5 of `libiconv' from incompatible pointer type
    utf8.c: In function `from_utf8':
    utf8.c:244: warning: passing arg 2 of `libiconv' from incompatible pointer type
    utf8.c:244: warning: passing arg 3 of `libiconv' from incompatible pointer type
    utf8.c:244: warning: passing arg 5 of `libiconv' from incompatible pointer type
    if gcc -DHAVE_CONFIG_H -I. -I. -I. -DJOERC="\"/usr/local/etc/joe/\""    -g -O2 -MT selinux.o -MD -MP -MF ".deps/selinux.Tpo" \   -c -o selinux.o `test -f 'selinux.c' || echo './'`selinux.c; \ then mv ".deps/selinux.Tpo" ".deps/selinux.Po"; \ else rm -f ".deps/selinux.Tpo"; exit 1; \ fi
    gcc  -g -O2   -o joe  b.o blocks.o bw.o cmd.o hash.o help.o kbd.o macro.o main.o menu.o path.o poshist.o pw.o queue.o qw.o rc.o regex.o scrn.o tab.o termcap.o tty.o tw.o ublock.o uedit.o uerror.o ufile.o uformat.o uisrch.o umath.o undo.o usearch.o ushell.o utag.o va.o vfile.o vs.o w.o utils.o syntax.o wcwidth.o utf8.o selinux.o  -lncurses
    ld: Undefined symbols:
    _libiconv
    _libiconv_open
    make[1]: *** [joe] Error 1
    make: *** [all] Error 2

    Tried to compile with the following libiconv versions:
    libiconv-1.9.1
    libiconv-1.8
    Both versions give the same errors.

     
    • C. Posey

      C. Posey - 2004-04-27

      Same setup, same problem here. Tried with several libiconv versions also.

       
    • Nobody/Anonymous

      Here's a temporary solution to get it to compile ... works for me on 10.3.3:

      After you run ./configure, edit autoconf.h and comment out line 85 (it should say '#define HAVE_SETLOCALE 1' before you comment it out).

      Then make and make install, and you should be good to go. It appears that commenting this out will keep the compiler from using libiconv, but I'm not up to speed on C, so I'm not completely sure if that's true. I also don't know what kind of effects this will have on trying to use UTF-8 text, so use at your own risk.

       
    • jpl

      jpl - 2004-04-27

      I think this is due to iconv being part of libc on linux where as on osx it is in it's own library.

      I compiled and linked against iconv by, after running configure, by replacing the line "LIBS = -lncurses" (around line 66) with "LIBS = -lncurses -liconv"

       
      • Nobody/Anonymous

        Thanks that did the trick.

         
    • OpenMacNews

      OpenMacNews - 2004-04-30

      the following works for me without a hitch:

      cd /usr/ports

      curl -O http://\(wherever).sourceforge.net/sourceforge/joe-editor/joe-3.0.tar.gz

      gnutar zxf joe-3.0.tar.gz

      cd /usr/ports/joe-3.0

      unsetenv CFLAGS CPPFLAGS CXX CXXFLAGS LDFLAGS LDDLFLAGS LD_PREBIND LC_ALL LANG LINGUAS

      setenv CFLAGS "-no-cpp-precomp -I/usr/include"
      setenv LDFLAGS "-L/usr/lib -ldl -liconv"
      setenv LC_ALL C
      setenv LANG en_US
      setenv LINGUAS "en_US en"

      ./configure --prefix=/usr
      make
      make install

       
    • Joe Allen

      Joe Allen - 2004-05-02

      I've modified configure.ac and Makefile.am to automatically detect when to add -liconv.  Can one
      of you mac owners checkout the latest version from CVS and try it?

       
    • Nobody/Anonymous

      FYI, I tried the latest version (3.1) and it configures and compiles clean on the mac, no more liconv issue.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks