Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 450714

Summary: sys-libs/glibc-2.16.0: /usr/include/bits/stdlib-ldbl.h:35:1: error: 'qecvt' undeclared here (not in a function)
Product: Gentoo Linux Reporter: Dennis Schridde <dschridde+gentoobugs>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: cluster, polidevk.polidevk
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://sourceware.org/bugzilla/show_bug.cgi?id=15007
See Also: http://sourceware.org/bugzilla/show_bug.cgi?id=15007
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 424737    
Attachments: build.log
emerge --info
glibc-2.16.0-stdlib-ldbl-qecvt.patch
glibc-2.17-stdlib-ldbl-qecvt.patch

Description Dennis Schridde 2013-01-07 11:26:10 UTC
Created attachment 334724 [details]
build.log

libtool: compile:  powerpc64-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../include -I../include/opensm -I./../include -Wall -g -D_XOPEN_SOURCE=6
00 -D_BSD_SOURCE=1 -pipe -O2 -mcpu=cell -mabi=altivec -mgen-cell-microcode -c cl_dispatcher.c  -fPIC -DPIC -o .libs/libosmcomp_la-cl_dispatcher.o
In file included from /usr/include/stdlib.h:960:0,
                 from cl_dispatcher.c:46:
/usr/include/bits/stdlib-ldbl.h:35:1: error: 'qecvt' undeclared here (not in a function)
/usr/include/bits/stdlib-ldbl.h:36:1: error: 'qfcvt' undeclared here (not in a function)
/usr/include/bits/stdlib-ldbl.h:37:1: error: 'qgcvt' undeclared here (not in a function)
/usr/include/bits/stdlib-ldbl.h:38:1: error: 'qecvt_r' undeclared here (not in a function)
/usr/include/bits/stdlib-ldbl.h:39:1: error: 'qfcvt_r' undeclared here (not in a function)
Comment 1 Dennis Schridde 2013-01-07 11:26:32 UTC
Created attachment 334726 [details]
emerge --info
Comment 2 Dennis Schridde 2013-01-09 13:33:55 UTC
Created attachment 334944 [details, diff]
glibc-2.16.0-stdlib-ldbl-qecvt.patch

The problem was caused by mismatching #ifdef guards: The usage in stdlib-ldbl.h was guarded by "defined __USE_SVID || defined __USE_XOPEN_EXTENDED" while stdlib.h guarded the declaration with "(defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) || defined __USE_SVID". Apparently __USE_XOPEN2K is defined in my case.

Attached patch fixes the issue.
Comment 3 Kamen Dokov 2013-01-19 20:11:47 UTC
I can't compile pulseaudio-3.0, is it the same bug?


>>> Compiling source in /var/tmp/portage/media-sound/pulseaudio-3.0/work/pulseaudio-3.0 ...
make -j1 
make  all-recursive
make[1]: Entering directory `/var/tmp/portage/media-sound/pulseaudio-3.0/work/pulseaudio-3.0'
Making all in src
make[2]: Entering directory `/var/tmp/portage/media-sound/pulseaudio-3.0/work/pulseaudio-3.0/src'
  ORCC   pulsecore/svolume-orc-gen.c
  ORCC   pulsecore/svolume-orc-gen.h
make  all-am
make[3]: Entering directory `/var/tmp/portage/media-sound/pulseaudio-3.0/work/pulseaudio-3.0/src'
  CC     libpulse_la-channelmap.lo
In file included from /usr/include/json/features.h:4:0,
                 from /usr/include/stdlib.h:24,
                 from pulse/channelmap.c:27:
/usr/include/json/forwards.h:6:1: error: unknown type name ‘namespace’
/usr/include/json/forwards.h:6:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
In file included from /usr/include/stdlib.h:24:0,
                 from pulse/channelmap.c:27:
/usr/include/json/features.h:6:1: error: unknown type name ‘namespace’
/usr/include/json/features.h:6:16: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
In file included from pulse/channelmap.c:27:0:
/usr/include/stdlib.h:34:1: error: unknown type name ‘__BEGIN_DECLS’
/usr/include/stdlib.h:97:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘typedef’
/usr/include/stdlib.h:139:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
/usr/include/stdlib.h:144:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
/usr/include/stdlib.h: In function ‘atoi’:
/usr/include/stdlib.h:148:6: error: unknown type name ‘__THROW’
/usr/include/stdlib.h:148:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__nonnull’
/usr/include/stdlib.h:151:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__THROW’
/usr/include/stdlib.h:152:1: error: unknown type name ‘__END_NAMESPACE_STD’
/usr/include/stdlib.h:164:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
/usr/include/stdlib.h:167:1: error: unknown type name ‘__END_NAMESPACE_STD’
/usr/include/stdlib.h:183:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘extern’
/usr/include/stdlib.h:189:6: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__THROW’
/usr/include/stdlib.h:190:1: error: unknown type name ‘__END_NAMESPACE_STD’
Comment 4 Dennis Schridde 2013-01-19 23:23:05 UTC
(In reply to comment #3)
> I can't compile pulseaudio-3.0, is it the same bug?
> In file included from /usr/include/json/features.h:4:0,
>                  from /usr/include/stdlib.h:24,
>                  from pulse/channelmap.c:27:
> /usr/include/json/forwards.h:6:1: error: unknown type name ‘namespace’
Probably not. Yours seems like a include path issue, where stdlib.h accidentally includes some json C++ header while compiling a C program.
Comment 5 Kamen Dokov 2013-01-20 01:23:38 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > I can't compile pulseaudio-3.0, is it the same bug?
> > In file included from /usr/include/json/features.h:4:0,
> >                  from /usr/include/stdlib.h:24,
> >                  from pulse/channelmap.c:27:
> > /usr/include/json/forwards.h:6:1: error: unknown type name ‘namespace’
> Probably not. Yours seems like a include path issue, where stdlib.h
> accidentally includes some json C++ header while compiling a C program.

You are correct it's jsoncpp drama, thank you and sorry for the noise ;)
Comment 6 Dennis Schridde 2013-03-30 15:13:51 UTC
Created attachment 343776 [details, diff]
glibc-2.17-stdlib-ldbl-qecvt.patch

Upstream requested that the patch be recreated against 2.17. But it looks exactly the same, so apparently their changes were reverted before the release.
Comment 7 SpanKY gentoo-dev 2013-06-23 05:01:37 UTC
i've applied the fix that upstream merged to glibc 2.16 & 2.17

http://sources.gentoo.org/gentoo/src/patchsets/glibc/2.16.0/0065_all_glibc-2.18-qecvt-guards.patch?rev=1.1