[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#667984: libgtop2: FTBFS(kfreebsd): __printflike undefined



Package: src:libgtop2
Version: 2.28.4-2
Severity: serious
Tags: sid wheezy
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-bsd@lists.debian.org
Justification: fails to build from source (but built successfully in the
past)

Hi,

This looks to be a kfreebsd headers issue in either libbsd or eglibc but
I'm not sure yet, so filing this FTBFS against src:libgtop2 for now.

/usr/include/bsd/sys/cdefs.h is being included but not used due to ifdef
statements.  There is no corresponding __printflike definition in
/usr/include/i386-kfreebsd-gnu/sys/cdefs.h

The modification in the attached diff allowed me to build this package
on kfreebsd-i386.

> steven@kfreebsd-i386:~/libgtop2-2.28.4/sysdeps/freebsd$ gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../sysdeps/freebsd -I../../include -I/usr/include/glib-2.0 -I/usr/li
> b/i386-kfreebsd-gnu/glib-2.0/include -D_FORTIFY_SOURCE=2 -Winline -Wall -std=gnu89 -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith
>  -Wcast-align -Wsign-compare -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -c procmap.c  -fPIC -DPIC -o .libs/procm
> ap.o 
> In file included from ./glibtop_machine.h:26:0,
>                  from ../../glibtop.h:58,
>                  from procmap.c:23:
> /usr/include/nlist.h:33:2: warning: #warning "Deprecated header, use <bsd/nlist.h> or libbsd-overlay.pc instead." [-Wcpp]
> In file included from procmap.c:43:0:
> /usr/include/sys/conf.h: In function ‘make_dev_alias’:
> /usr/include/sys/conf.h:281:3: error: expected declaration specifiers before ‘__printflike’
> /usr/include/sys/conf.h:299:16: error: storage class specified for parameter ‘cdevpriv_dtr_t’
> /usr/include/sys/conf.h:301:36: error: expected declaration specifiers or ‘...’ before ‘cdevpriv_dtr_t’
> /usr/include/sys/conf.h:322:16: error: storage class specified for parameter ‘dev_clone_fn’
> /usr/include/sys/conf.h:326:1: error: expected specifier-qualifier-list before ‘dev_clone_fn’
> /usr/include/sys/conf.h:343:12: error: storage class specified for parameter ‘dumping’

Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org
--- /usr/include/i386-kfreebsd-gnu/sys/cdefs.h.orig	2012-04-05 02:45:57.000000000 +0100
+++ /usr/include/i386-kfreebsd-gnu/sys/cdefs.h	2012-04-07 20:57:58.000000000 +0100
@@ -259,6 +259,14 @@
 # define __attribute_format_strfmon__(a,b) /* Ignore */
 #endif
 
+#ifndef __printflike
+# if __GNUC_PREREQ (3,0)
+#  define __printflike(x, y) __attribute((format(printf, (x), (y))))
+# else
+#  define __printflike(x, y)
+# endif
+#endif
+
 /* The nonull function attribute allows to mark pointer parameters which
    must not be NULL.  */
 #if __GNUC_PREREQ (3,3)

Reply to: