Subject: | mac osx intsall problem |
Date: | Sun, 04 Jan 2015 21:42:16 -0500 |
To: | bug-Audio-TagLib [...] rt.cpan.org |
From: | Simeon Warner <simeon.warner [...] cornell.edu> |
I had problems installing Audio::TagLib 1.64 from cpan due to an error
compiling at include/iconv_wrap.h. The issue seems to be to do with
versions of iconv.h for the mac osx 10.9 xcode. I was able to get it
working by doing the following.
1. downloaded 1.65_1 in the hope that issue might magically be resolved,
got same error:
Show quoted text
> perl Makefile.PL
> ...
> make
> ...
> In file included from TagLib.xs:18:
> ./include/iconv_wrap.h:19:9: error: no matching function for call to 'iconv'
> return iconv(cd,
> ^~~~~
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/iconv.h:69:8: note:
> candidate function not viable: no known conversion from 'const char **' to
> 'char **' for 2nd argument
> size_t iconv (iconv_t /*cd*/,
> ^
2. tweaked the iconv.h wrapper to remove the cast:
Show quoted text> simeon@Cider Audio-TagLib-1.65_1>diff -c include/iconv_wrap.h~ include/iconv_wrap.h
> *** include/iconv_wrap.h~ 2014-07-15 17:48:27.000000000 -0400
> --- include/iconv_wrap.h 2015-01-04 21:22:12.000000000 -0500
> ***************
> *** 15,23 ****
> size_t *outbytesleft)
> {
> char *in = *inbuf;
> ! const char *in_c = const_cast<const char*>(in);
> return iconv(cd,
> ! &in_c,
> inbytesleft,
> outbuf,
> outbytesleft);
> --- 15,23 ----
> size_t *outbytesleft)
> {
> char *in = *inbuf;
> ! //const char *in_c = const_cast<const char*>(in);
> return iconv(cd,
> ! &in,
> inbytesleft,
> outbuf,
> outbytesleft);
3. compiles and installs OK, seems to work in my application.
Hope this is useful, many thanks for providing Audio::TagLib.
Cheers,
Simeon