[Xcb] [Bug 64807] New: xcb-util-0.3.9 Solaris 10 pre U10 requires <stdio.h> for src/atoms.c
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon May 20 20:25:12 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=64807
Priority: medium
Bug ID: 64807
Assignee: xcb at lists.freedesktop.org
Summary: xcb-util-0.3.9 Solaris 10 pre U10 requires <stdio.h>
for src/atoms.c
QA Contact: xcb at lists.freedesktop.org
Severity: normal
Classification: Unclassified
OS: Solaris
Reporter: mark at ibiblio.org
Hardware: x86 (IA32)
Status: NEW
Version: unspecified
Component: Utils
Product: XCB
/etc/release: Solaris 10 10/09 s10x_u8wos_08a X86
uname -a : SunOS host 5.10 Generic_142901-13 i86pc i386 i86pc
# cc -V
cc: Sun C 5.12 SunOS_i386 2011/11/16
On Solaris 10 before Update 10 release there wasn't a vasprintf(). This invokes
a new code stream in the source.
The src/atoms.c program fails to compile as there's a missing <stdio.h> at the
top.
The recipe:
cd /var/tmp
rm -rf xcb-util-0.3.9
untgz /usr/local/src/x11/xcb-util-0.3.9.tar.gz
cd xcb-util-0.3.9
/bin/perl -pe "s%^LIBTOOL=.*%LIBTOOL='/usr/local/bin/libtool'%" -i
configure
./configure --prefix=/usr/local \
--disable-silent-rules
gmake
Making all in src
gmake[1]: Entering directory `/var/tmp/xcb-util-0.3.9/src'
source='atoms.c' object='atoms.lo' libtool=yes \
DEPDIR=.deps depmode=none /bin/bash ../depcomp \
/usr/local/bin/libtool --tag=CC --mode=compile cc -D_STDC_C99=
-DPACKAGE_NAME=\"xcb-util\" -DPACKAGE_TARNAME=\"xcb-util\"
-DPACKAGE_VERSION=\"0.3.9\" -DPACKAGE_STRING=\"xcb-util\ 0.3.9\"
-DPACKAGE_BUGREPORT=\"xcb at lists.freedesktop.org\" -DPACKAGE_URL=\"\"
-DPACKAGE=\"xcb-util\" -DVERSION=\"0.3.9\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\"
-DPACKAGE_VERSION_MAJOR=0 -DPACKAGE_VERSION_MINOR=3
-DPACKAGE_VERSION_PATCHLEVEL=9 -I. -I/usr/local/include -v
-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED
-errwarn=E_FUNC_HAS_NO_RETURN_STMT -errwarn=E_BAD_PTR_INT_COMBINATION -g -c -o
atoms.lo atoms.c
libtool: compile: cc -D_STDC_C99= -DPACKAGE_NAME=\"xcb-util\"
-DPACKAGE_TARNAME=\"xcb-util\" -DPACKAGE_VERSION=\"0.3.9\"
"-DPACKAGE_STRING=\"xcb-util 0.3.9\""
-DPACKAGE_BUGREPORT=\"xcb at lists.freedesktop.org\" -DPACKAGE_URL=\"\"
-DPACKAGE=\"xcb-util\" -DVERSION=\"0.3.9\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\"
-DPACKAGE_VERSION_MAJOR=0 -DPACKAGE_VERSION_MINOR=3
-DPACKAGE_VERSION_PATCHLEVEL=9 -I. -I/usr/local/include -v
-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED
-errwarn=E_FUNC_HAS_NO_RETURN_STMT -errwarn=E_BAD_PTR_INT_COMBINATION -g -c
atoms.c -KPIC -DPIC -o .libs/atoms.o
"atoms.c", line 30: implicit function declaration: vsnprintf
cc: acomp failed for atoms.c
gmake[1]: *** [atoms.lo] Error 1
gmake[1]: Leaving directory `/var/tmp/xcb-util-0.3.9/src'
gmake: *** [all-recursive] Error 1
# man vsnprintf
SYNOPSIS
#include <stdio.h>
#include <stdarg.h>
int vsnprintf(char *s, size_t n, const char *format, va_list ap);
src/atoms.c includes <stdio.h> if _GNU_SOURCE is defined. This might not be
true for a non gcc compiler.
Simply adding a #include <stdio.h> at the top lets the compile finish. I can't
see why it shouldn't be there by default?
I use this line to insert the include:
/bin/perl -pe '($. == 1) && s%^%#include <stdio.h>\n%' -i src/atoms.c
New recipe:
cd /var/tmp
rm -rf xcb-util-0.3.9
untgz /usr/local/src/x11/xcb-util-0.3.9.tar.gz
cd xcb-util-0.3.9
/bin/perl -pe "s%^LIBTOOL=.*%LIBTOOL='/usr/local/bin/libtool'%" -i
configure
./configure --prefix=/usr/local \
--disable-silent-rules
/bin/perl -pe '($. == 1) && s%^%#include <stdio.h>\n%' -i src/atoms.c
gmake
gmake install
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20130521/b3886342/attachment.html>
More information about the Xcb
mailing list