cmake iconv test problem with doxygen 1.8.13+ on redhat 6.3.1-1 with gcc 6.3.1
"Bonn, John" <[email protected]> Mon, 22 May 2017 09:29:44 -0700
| Newsgroups | gmane.text.doxygen.devel |
|---|---|
| Message-ID | <CAMzC_kKNhqGPSUTQhzL0nnfc=R_AJ6DiQWh416cajrWG2AncGQ@mail.gmail.com> |
--===============2774655890536982439==
Content-Type: multipart/alternative; boundary="001a1134fe6afdfc0205501f60b7"
--001a1134fe6afdfc0205501f60b7
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
In cmake/FindIconv.cmake the fix is:
change
iconv(iconv_t(-1), 0, 0, 0, 0);
to
iconv((iconv_t)-1, 0, 0, 0, 0);
in 3 places
++++++++++++++++++++++++++++
bash-4.3$ cat test.c
#include <iconv.h>
int main() {
iconv(iconv_t(-1), 0, 0, 0, 0);
}
bash-4.3$ gcc test.c
In file included from test.c:1:0:
test.c: In function =E2=80=98main=E2=80=99:
test.c:3:15: error: expected expression before =E2=80=98libiconv_t=E2=80=99
iconv(iconv_t(-1), 0, 0, 0, 0);
^
In file included from test.c:1:0:
test.c:3:9: error: too few arguments to function =E2=80=98libiconv=E2=80=99
iconv(iconv_t(-1), 0, 0, 0, 0);
^
/usr/local/include/iconv.h:82:15: note: declared here
extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft,
char* * outbuf, size_t *outbytesleft);
^
bash-4.3$ gcc --version
gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
bash-4.3$ vi test.c
bash-4.3$ cat test.c
#include <iconv.h>
int main() {
iconv((iconv_t)-1, 0, 0, 0, 0);
}
bash-4.3$ gcc test.c
/tmp/ccsr6URT.o: In function `main':
test.c:(.text+0x21): undefined reference to `libiconv'
collect2: error: ld returned 1 exit status
bash-4.3$
--001a1134fe6afdfc0205501f60b7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><div>In cmake/FindIconv.cmake the fix is:<br></div>ch=
ange<br>=C2=A0=C2=A0 iconv(iconv_t(-1), 0, 0, 0, 0);<br>to<br>=C2=A0=C2=A0 =
iconv((iconv_t)-1, 0, 0, 0, 0);<br></div>in 3 places<br><div><div><br>+++++=
+++++++++++++++++++++++<br><br>bash-4.3$ cat test.c<br>#include <iconv.h=
><br>=C2=A0=C2=A0=C2=A0=C2=A0 int main() {<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 iconv(iconv_t(-1), 0, 0, 0, 0);<br>=C2=A0=C2=A0=C2=A0=C2=
=A0 }<br><br>bash-4.3$ gcc test.c<br>In file included from test.c:1:0:<br>t=
est.c: In function =E2=80=98main=E2=80=99:<br>test.c:3:15: error: expected =
expression before =E2=80=98libiconv_t=E2=80=99<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 iconv(iconv_t(-1), 0, 0, 0, 0);<br>=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^<br>=
In file included from test.c:1:0:<br>test.c:3:9: error: too few arguments t=
o function =E2=80=98libiconv=E2=80=99<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 iconv(iconv_t(-1), 0, 0, 0, 0);<br>=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 ^<br>/usr/local/include/iconv.h:82:<wbr>15: note: =
declared here<br>=C2=A0extern size_t iconv (iconv_t cd,=C2=A0 char* * inbuf=
, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);<br>=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
^<br>bash-4.3$ gcc --version<br>gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)=
<br>Copyright (C) 2016 Free Software Foundation, Inc.<br>This is free softw=
are; see the source for copying conditions.=C2=A0 There is NO<br>warranty; =
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br><br>ba=
sh-4.3$ vi test.c<br>bash-4.3$ cat test.c<br>#include <iconv.h><br>=
=C2=A0=C2=A0=C2=A0=C2=A0 int main() {<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 iconv((iconv_t)-1, 0, 0, 0, 0);<br>=C2=A0=C2=A0=C2=A0=C2=A0 }<br>=
<br>bash-4.3$ gcc test.c<br>/tmp/ccsr6URT.o: In function `main':<br>tes=
t.c:(.text+0x21): undefined reference to `libiconv'<br>collect2: error:=
ld returned 1 exit status<br>bash-4.3$ <br><br></div></div></div>
--001a1134fe6afdfc0205501f60b7--
--===============2774655890536982439==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--===============2774655890536982439==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Doxygen-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-develop
--===============2774655890536982439==--