rxvt-unicode failed to build with clang++
Emanuele Giaquinta
emanuele.giaquinta at gmail.com
Sun Mar 27 10:13:06 CEST 2011
On Sat, Mar 26, 2011 at 07:30:30PM +0200, Alexander Kolesen wrote:
> Hello.
> I've tried to build rxvt-unicode from CVS with a clang++ and got
> the following error:
>
>
> /usr/bin/clang++ -I.. -I. -I. -I./../libev -DHAVE_CONFIG_H -I/usr/include/freetype2 -g -O3 -fno-rtti -fvisibility-inlines-hidden -fno-threadsafe-statics -fno-enforce-eh-specs -w -c logging.C
> clang: warning: argument unused during compilation: '-fno-enforce-eh-specs'
> In file included from logging.C:40:
> ./ptytty.h:36:4: error: #error cannot build with utmp support - no utmp or utmpx struct found
> # error cannot build with utmp support - no utmp or utmpx struct found
> ^
> logging.C:219:14: error: use of undeclared identifier 'ut_id'
> strncpy (ut_id, pty + 3, sizeof (ut_id));
> ^
> logging.C:221:14: error: use of undeclared identifier 'ut_id'
> sprintf (ut_id, "vt%02x", (i & 0xff)); /* sysv naming */
> ^
> 3 errors generated.
>
>
> This was because when configure script tested headers presence, it generates
> C++ code with error. The main() function declared without type specifier, what is correct for C,
> but wrong for C++:
>
>
> configure:7009: /usr/bin/clang++ -o conftest -g -O3 -fno-rtti -fvisibility-inlines-hidden -fno-threadsafe-statics -fno-enforce-eh-specs -w conftest.cpp -lsupc++ >&5
> conftest.cpp:69:1: error: C++ requires a type specifier for all declarations
> main()
> ^
> 1 error generated.
>
>
> Attached patch fixes the problem.
Thanks, I fixed it in libptytty some time ago but I didn't sync the file
in rxvt-unicode. Should be ok now.
Emanuele
More information about the rxvt-unicode
mailing list