simde: clang 12 + ppc64le: ninja build error: __float128 is not supported on this target
On the latest master commit: a558d6d321a1f2b97bc8519f2f5e07a6c02fb29c with clang 12 + ppc64le, Fedora rawhide (=35),
I think the situation is moved forward by #716. Thanks! I see the new errors. Could you take a look at it? Thanks.
/usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/ext/numeric_traits.h:222:38: error: __float128 is not supported on this target
/usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/ext/numeric_traits.h:230:29: error: __float128 is not supported on this target
/usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/ext/numeric_traits.h:231:40: error: __float128 is not supported on this target
+ CC=clang
+ CXX=clang++
+ meson setup build/clang
The Meson build system
Version: 0.57.1
Source dir: /builddir/build/BUILD/simde-a558d6d321a1f2b97bc8519f2f5e07a6c02fb29c
Build dir: /builddir/build/BUILD/simde-a558d6d321a1f2b97bc8519f2f5e07a6c02fb29c/build/clang
Build type: native build
Project name: SIMDe
Project version: 0.7.3
C compiler for the host machine: clang (clang 12.0.0 "clang version 12.0.0 (Fedora 12.0.0-0.7.rc3.fc35)")
C linker for the host machine: clang ld.bfd 2.36.1-7
C++ compiler for the host machine: clang++ (clang 12.0.0 "clang version 12.0.0 (Fedora 12.0.0-0.7.rc3.fc35)")
C++ linker for the host machine: clang++ ld.bfd 2.36.1-7
Host machine cpu family: ppc64
Host machine cpu: ppc64le
Library m found: YES
Compiler for C supports arguments -fopenmp-simd: YES-
Compiler for C++ supports arguments -fopenmp-simd: YES-
Compiler for C supports arguments -Wpsabi: YES-
Compiler for C++ supports arguments -Wpsabi: YES-
Library m found: YES
Build targets in project: 1082
Found ninja-1.10.2 at /usr/bin/ninja
+ ninja -C build/clang -j 4
...
[727/2164] Compiling C++ object test/x86/svml-emul-cpp.p/meson-generated_.._svml.cpp.o
FAILED: test/x86/svml-emul-cpp.p/meson-generated_.._svml.cpp.o-
clang++ -Itest/x86/svml-emul-cpp.p -Itest/x86 -I../../test/x86 -I. -I../.. -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -g -fopenmp-simd -DSIMDE_ENABLE_OPENMP -Wno-psabi -DSIMDE_TEST_BARE -DSIMDE_NO_NATIVE -MD -MQ test/x86/svml-emul-cpp.p/meson-generated_.._svml.cpp.o -MF test/x86/svml-emul-cpp.p/meson-generated_.._svml.cpp.o.d -o test/x86/svml-emul-cpp.p/meson-generated_.._svml.cpp.o -c test/x86/svml.cpp
In file included from test/x86/svml.cpp:27:
In file included from ../../simde/x86/svml.h:50:
In file included from ../../test/x86/../../simde/x86/../simde-complex.h:120:
In file included from /usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/complex:45:
In file included from /usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/sstream:38:
In file included from /usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/istream:38:
In file included from /usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/ios:40:
In file included from /usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/bits/char_traits.h:39:
In file included from /usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/bits/stl_algobase.h:63:
/usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/ext/numeric_traits.h:222:38: error: __float128 is not supported on this target
struct __numeric_traits_floating<__ieee128>
^
/usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/ext/numeric_traits.h:230:29: error: __float128 is not supported on this target
struct __numeric_traits<__ieee128>
^
/usr/lib/gcc/ppc64le-redhat-linux/11/../../../../include/c++/11/ext/numeric_traits.h:231:40: error: __float128 is not supported on this target
: public __numeric_traits_floating<__ieee128>
^
3 errors generated.
...
ninja: build stopped: subcommand failed.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (6 by maintainers)
Awesome, thanks! I was actually able to skip most of this since I could use ppc64le hardware; just had to use
registry.fedoraproject.org/fedora:35-ppc64leinstead offedora:35. I was able to confirm that it’s a libc++ issue:Debian has binfmt, but I haven’t figured out how to get it working from inside a Docker container 😦. I’ll have to try it with Fedora.
Anyways, I use Fedora for my desktop, so I’ll definitely keep this bookmarked 😃
Ah okay.
I can see the
/usr/include/complex.hfile comes from theglibc-headersRPM sub package in theglibcRPM package [1], and the othercomlex.hfiles come fromlibstdc++-develsub package in thegccRPM package [3] on my Fedora 33.So, maybe I will try to report it with a small reproducer to the Fedora glibc issue ticket [1] or the GNU libc upstream project [2] at first. If it is not proper, maybe ask it on Fedora gcc [3] or the gcc upstream project [4].
[1] https://src.fedoraproject.org/rpms/glibc/ [2] http://www.gnu.org/software/libc/
[3] https://src.fedoraproject.org/rpms/gcc/ [4] http://gcc.gnu.org
Unfortunately the s/390x VM is temporary; it’s a free trial.
I think the problem is the GNU C++ Library (which I believe is in the GCC source tree); the work-around would be to use LLVM’s C++ library instead.
Ooohh, I’ll have to try that. Thanks for sharing!
This also showed me how I can get recent gcc/clang versions installed on s/390x (the VM I have access to is running RHEL 8), so I should be able to start working on #733 right away ☺
No, sorry but I don’t think there is anything I can do. AFAIK there is nothing we can do to work around <complex> in C++ (we can, and do, avoid <complex.h> in C, but the same tricks don’t work in C++). If you (or anyone else) wants to try, the revelant code is in simde/simde-complex.h. I’d be really happy to accept a patch which allows us to avoid <complex>, even if only on some compilers.
You could use LLVM’s libc++ (add
-stdlib=libc++to CXXFLAGS), I think that would do the trick. You may also want to report the issue upstream; just including<complex>triggers it so I have a feeling it will get addressed pretty quickly.I don’t mind leaving this open to track any upstream issues.
Ah I think if you have ppc64le hardware, you can just run the VM without qemu like this.
or
@nemequ Thanks for the checking!
I was able to use Fedora official container repository’s
registry.fedoraproject.org/fedora:35-ppc64leon QEMU now! Here is the repo: https://registry.fedoraproject.org/repo/fedora/tags/Let me share the steps.
First you need to have a Linux host. Maybe you have it.
If you have the Fedora, CentOS (maybe >= 7) or RHEL (>= 7), and you can install the
qemu-user-staticRPM, the RPM installs/proc/sys/fs/binfmt_misc/qemu-ppc64lefile. And confirm the line:flags: Fexists.If you do not have above Linux distro, the easy way to install the above binfmt_misc file is to use this tool: https://github.com/dbhi/qus . I do not know how to install the binfmt_misc file on Debian based distro. If you are using
docker, just replace the following command’spodmanwithdocker. And maybesudois not necessary in case of docker.The above command is only to install the following file.
Then I confirmed that the QEMU emulation works.
Then I could install clang 12.
If you like, I can contribute this case to one of this repo’s CIs.