Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 680622 - app-arch/lzip-1.21: /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/type_traits:335:39: error: ‘__float128’ was not declared in this scope struct __is_floating_point_helper<__float128>
Summary: app-arch/lzip-1.21: /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g+...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC64 Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-16 16:50 UTC by ernsteiswuerfel
Modified: 2019-03-17 18:33 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (lzip-1.21:20190316-164801.log,4.48 KB, text/x-log)
2019-03-16 16:50 UTC, ernsteiswuerfel
Details
emerge --info (file_680622.txt,5.96 KB, text/plain)
2019-03-16 16:51 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2019-03-16 16:50:51 UTC
Created attachment 569364 [details]
build.log

>>> Compiling source in /var/tmp/portage/app-arch/lzip-1.21/work/lzip-1.21 ...
make -j1 
powerpc64-unknown-linux-gnu-g++  -O2 -mcpu=970 -mtune=970 -pipe -c -o arg_parser.o arg_parser.cc
In file included from /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/bits/move.h:55,
                 from /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/bits/stl_pair.h:59,
                 from /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/bits/stl_algobase.h:64,
                 from /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/bits/char_traits.h:39,
                 from /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/string:40,
                 from arg_parser.cc:21:
/usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/type_traits:335:39: error: ‘__float128’ was not declared in this scope
     struct __is_floating_point_helper<__float128>
                                       ^~~~~~~~~~
/usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/type_traits:335:39: note: suggested alternative: ‘float’
     struct __is_floating_point_helper<__float128>
                                       ^~~~~~~~~~
                                       float
/usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/type_traits:335:49: error: template argument 1 is invalid
     struct __is_floating_point_helper<__float128>
                                                 ^
In file included from /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/cstdlib:77,
                 from /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/ext/string_conversions.h:41,
                 from /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/bits/basic_string.h:6391,
                 from /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/string:52,
                 from arg_parser.cc:21:
/usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/bits/std_abs.h:101:3: error: ‘__float128’ does not name a type; did you mean ‘_Float32x’?
   __float128
   ^~~~~~~~~~
   _Float32x
make: *** [Makefile:50: arg_parser.o] Error 1
Comment 1 ernsteiswuerfel archtester 2019-03-16 16:51:37 UTC
Created attachment 569366 [details]
emerge --info
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-03-16 20:37:35 UTC
This looks like broken stdlibc++ in gcc.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-16 21:51:26 UTC
timberdoodle ppc64be machine compiles lzip just fine.

> /usr/lib/gcc/powerpc64-unknown-linux-gnu/8.2.0/include/g++-v8/bits/std_abs.h:101:3: error: ‘__float128’ does not name a type; did you mean ‘_Float32x’?
>   __float128
>   ^~~~~~~~~~
>   _Float32x

__float128 support is detected by gcc at build time. It needs some support from glibc.
Sometimes such mismatch happens when gcc is build against old glibc version and then glibc gets upgraded later.

1. Can you post your output of the below?

# g++ -x c++ -dM -E - </dev/null  | fgrep 128
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __DEC128_EPSILON__ 1E-33DL
#define __FLT32_MAX_EXP__ 128
#define __LONGDOUBLE128 1
#define __DEC128_MIN__ 1E-6143DL
#define __DEC128_MIN_EXP__ (-6142)
#define __GLIBCXX_BITSIZE_INT_N_0 128
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __LONG_DOUBLE_IBM128__ 1
#define __LONG_DOUBLE_128__ 1
#define __FLT_MAX_EXP__ 128
#define __SIZEOF_INT128__ 16
#define __DEC128_MAX_EXP__ 6145
#define __GLIBCXX_TYPE_INT_N_0 __int128
#define __DEC128_MANT_DIG__ 34

2. If you rebuild gcc will it change?
Comment 4 ernsteiswuerfel archtester 2019-03-17 18:33:44 UTC
Thanks Michał & Sergei!

Turned out I had somehow borked my toolchain 1st time I built gcc-8.2.0-r6. After rebuilding toolchain with gcc-7.4.0-r1 and afterwards with gcc-8.2.0-r6 again, lzip-1.21 just builds fine. Out of curiosity I did the rebuild both with -mcpu=power9 and -mcpu=970, worked either way.