Opened 15 years ago

Closed 15 years ago

#20762 closed defect (fixed)

libofx 0.9.1 fails to compile with "invalid conversion from 'char**' to 'const char**'"

Reported by: trinidude4@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 1.7.1
Keywords: Cc:
Port: libofx

Description (last modified by ryandesign (Ryan Carsten Schmidt))

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.

Change History (2)

comment:1 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Owner: changed from macports-tickets@… to ryandesign@…
Status: newassigned

I assume you are using Tiger, because AFAIK this problem only shows on Tiger, not Leopard. I 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....

comment:2 in reply to:  1 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

Replying to ryandesign@…:

We could make a patch and apply it on platform darwin 8 only....

Yeah, that's easy enough. Done in r56090, r56091:

Thanks for reminding me of the issue; I had totally forgotten.

Note: See TracTickets for help on using tickets.