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.
--- rxvt-unicode/configure 2011-02-20 08:05:51.000000000 +0200
+++ ../rxvt-unicode/configure 2011-03-26 19:06:33.000000000 +0200
@@ -6983,6 +6983,7 @@
#include <sys/types.h>
#include <utmp.h>
#include <errno.h>
+int
main()
{
char **u, *utmplist[] = {
@@ -7045,6 +7046,7 @@
#include <utmp.h>
#endif
#include <errno.h>
+int
main()
{
char **w, *wtmplist[] = {
@@ -7105,6 +7107,7 @@
#include <utmpx.h>
#endif
#include <errno.h>
+int
main()
{
char **w, *wtmplist[] = {
@@ -7171,6 +7174,7 @@
#include <lastlog.h>
#endif
#include <errno.h>
+int
main()
{
char **w, *lastloglist[] = { "/var/log/lastlog", NULL };
@@ -7230,6 +7234,7 @@
#include <utmpx.h>
#endif
#include <errno.h>
+int
main()
{
char **w, *wtmplist[] = { "/var/log/lastlogx", "/var/adm/lastlogx", NULL };
@@ -7713,7 +7718,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <grp.h>
-
+int
main()
{
struct stat st;
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode