Project

General

Profile

Building Audacious on OpenIndiana yield iconv error

Added by Will B about 7 years ago

Greetings!

I'm attempting to build Audacious on OpenIndiana / Hipster (x86) and I'm running into this error:

Entering directory src.
Entering directory dbus.
Leaving directory dbus.
Entering directory audtool.
Leaving directory audtool.
Entering directory libguess.
Leaving directory libguess.
Entering directory libaudcore.
charset.cc:56:18: error: no matching function for call to 'iconv'
    size_t ret = iconv (conv, & in, & inbytesleft, & out, & outbytesleft);
                 ^~~~~
/usr/include/iconv.h:47:15: note: candidate function not viable: no known conversion from 'char **' to 'const char **' for 2nd argument
extern size_t   iconv(iconv_t, const char **_RESTRICT_KYWD,
                ^
1 error generated.
Failed to compile charset.cc (lib)!
gmake[5]: *** [../../buildsys.mk:407: charset.lib.o] Error 1
gmake[4]: *** [../../buildsys.mk:118: all] Error 2
gmake[3]: *** [../buildsys.mk:123: libaudcore] Error 2
gmake[2]: *** [../buildsys.mk:116: all] Error 2
gmake[1]: *** [buildsys.mk:123: src] Error 2
gmake: *** [buildsys.mk:116: all] Error 2

The definition for the iconv function is in /usr/include/iconv.h:

#ifdef _XPG6
extern size_t    iconv(iconv_t, char **_RESTRICT_KYWD,
        size_t *_RESTRICT_KYWD, char **_RESTRICT_KYWD,
        size_t *_RESTRICT_KYWD);
#else
extern size_t    iconv(iconv_t, const char **_RESTRICT_KYWD,
        size_t *_RESTRICT_KYWD, char **_RESTRICT_KYWD,
        size_t *_RESTRICT_KYWD);
#endif

Just for giggles, when I do define _XPG6 before the #include <inconv.h> line, it still will not build and gives the same error.

Is there anything I can try to remedy this? I do program infrequently in C, C++, Python and others, but don't deal with iconv at all. From past experience I wish could do without iconv as it causes a lot of build failures with other projects.

Thank you kindly! :-)

Will B


Replies (2)

RE: Building Audacious on OpenIndiana yield iconv error - Added by Will B about 7 years ago

In the interest of having a working program, I went ahead and modified the in variable on line 52 of src/libaudcore/charset.cc:

    // ICONV_CONST char * in = (ICONV_CONST char *) str;   // <----- line that caused error
    const char * in = (ICONV_CONST char *) str;

It then built properly. It appears ICONV_CONST is supposed to be assigned during configuration, and being the lazy lad that I am, I didn't feel like going down that rabbit hole. ;-)

RE: Building Audacious on OpenIndiana yield iconv error - Added by John Lindgren about 7 years ago

autoconf is supposed to define ICONV_CONST1. Evidently it is not set up right on OpenIndiana.

1 https://www.gnu.org/software/gettext/manual/html_node/AM_005fICONV.html

    (1-2/2)