[MacPorts] #20762: libofx 0.9.1 fails to compile with "invalid conversion from 'char**' to 'const char**'"

MacPorts noreply at macports.org
Sun Aug 23 23:15:45 PDT 2009


#20762: libofx 0.9.1 fails to compile with "invalid conversion from 'char**' to
'const char**'"
------------------------------------+---------------------------------------
 Reporter:  trinidude4@…            |       Owner:  ryandesign@…           
     Type:  defect                  |      Status:  assigned               
 Priority:  Normal                  |   Milestone:                         
Component:  ports                   |     Version:  1.7.1                  
 Keywords:                          |        Port:  libofx                 
------------------------------------+---------------------------------------
Changes (by ryandesign@…):

  * owner:  macports-tickets@… => ryandesign@…
  * status:  new => assigned


Old description:

> I get the following error when upgrading libofx:
>
> ofx_preproc.cpp: In function 'int ofx_proc_file(void*, const char*)':
> ofx_preproc.cpp:196: error: invalid conversion from 'char**' to 'const
> char**'
> ofx_preproc.cpp:196: error:   initializing argument 2 of 'size_t
> libiconv(void*, const char**, size_t*, char**, size_t*)'
>
> If you go down to line 191 of ofx_preproc.cpp and change "char * inchar =
> (char *)s_buffer.c_str();" to "'''const''' char * inchar = (char
> *)s_buffer.c_str();", it compiles, but I don't know how that affects
> anything.

New description:

 I get the following error when upgrading libofx:

 {{{
 ofx_preproc.cpp: In function 'int ofx_proc_file(void*, const char*)':
 ofx_preproc.cpp:196: error: invalid conversion from 'char**' to 'const
 char**'
 ofx_preproc.cpp:196: error:   initializing argument 2 of 'size_t
 libiconv(void*, const char**, size_t*, char**, size_t*)'
 }}}

 If you go down to line 191 of ofx_preproc.cpp and change "char * inchar =
 (char *)s_buffer.c_str();" to "'''const''' char * inchar = (char
 *)s_buffer.c_str();", it compiles, but I don't know how that affects
 anything.

--

Comment:

 I assume you are using Tiger, because AFAIK this problem only shows on
 Tiger, not Leopard. I
 [https://sourceforge.net/tracker/index.php?func=detail&aid=1959437&group_id=61170&atid=496353
 reported this problem] to the developers in May 2008. They did not
 respond.

 The definition of the iconv function differs by OS and OS version and
 sometimes even depending on how you compile libiconv (e.g. if you use the
 +universal variant and whether you select 64-bit architectures or not).

 If you make the proposed change, it will work for you, but start breaking
 for others. Software that uses iconv must detect the correct way to call
 the iconv function on the current OS. We could make a patch and apply it
 on platform darwin 8 only....

-- 
Ticket URL: <http://trac.macports.org/ticket/20762#comment:1>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list