O.T. Can I use my Mac Ports install to build odt2txt?

Ryan Schmidt ryandesign at macports.org
Wed Sep 2 02:12:51 PDT 2009


On Aug 31, 2009, at 22:50, Peter B. West wrote:

> I'm trying to build odt2txt, which, unfortunately, is not in Mac  
> Ports.

It is now. :)


> When I try to make it, I get:
>
> lydia-2:odt2txt-0.4 pbw$ make
> cc -O2   -c -o odt2txt.o odt2txt.c
> cc -O2   -c -o regex.o regex.c
> cc -O2   -c -o mem.o mem.c
> cc -O2   -c -o strbuf.o strbuf.c
> cc -O2   -c -o kunzip/fileio.o kunzip/fileio.c
> cc -O2   -c -o kunzip/zipfile.o kunzip/zipfile.c
> cc -o odt2txt  odt2txt.o regex.o mem.o strbuf.o kunzip/fileio.o  
> kunzip/zipfile.o -lz
> Undefined symbols:
>  "_iconv_open", referenced from:
>      _main in odt2txt.o
>      _main in odt2txt.o
>  "_iconv", referenced from:
>      _main in odt2txt.o
>      _main in odt2txt.o
>  "_iconv_close", referenced from:
>      _main in odt2txt.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
> make: *** [odt2txt] Error 1
>
> So, iconv is causing problems. I see that various iconv bits and  
> pieces seem to be available in Mac Ports. Can anyone suggest things  
> I might try to get this to build?

The problem was "-L/opt/local/lib" was not present (which tells it to  
look for libraries in /opt/local/lib) and "-liconv" was not present  
(which tells it to look for symbols in the libiconv.dylib library).

But now that there's a port, you don't need to know that :) -- just  
"sudo port install odt2txt" once the index catches up (in an hour or  
so).






More information about the macports-users mailing list