Closed4
TensorFlow build issue on Fedora 35
Build fails with GCC 11.2.1 20211203
GCC Version
gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20211203/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20211203 (Red Hat 11.2.1-7) (GCC)
CUDA + CUDNN
- CUDA 11.5 + cuDNN v8.3.1
TensorFlow build from source and build error.
./configure
You have bazel 4.2.1 installed.
Please specify the location of python. [Default is /home/xxxxx/.virtualenvs/tf2.7/bin/python3]:
Found possible Python library paths:
/home/xxxxx/.virtualenvs/tf2.7/lib/python3.10/site-packages
/home/xxxxx/.virtualenvs/tf2.7/lib64/python3.10/site-packages
Please input the desired Python library path to use. Default is [/home/xxxxx/.virtualenvs/tf2.7/lib/python3.10/site-packages]
Do you wish to build TensorFlow with ROCm support? [y/N]:
No ROCm support will be enabled for TensorFlow.
Do you wish to build TensorFlow with CUDA support? [y/N]: y
CUDA support will be enabled for TensorFlow.
Do you wish to build TensorFlow with TensorRT support? [y/N]:
No TensorRT support will be enabled for TensorFlow.
Found CUDA 11.5 in:
/usr/local/cuda-11.5/targets/x86_64-linux/lib
/usr/local/cuda-11.5/targets/x86_64-linux/include
Found cuDNN 8 in:
/usr/local/cuda-11.5/targets/x86_64-linux/lib
/usr/local/cuda-11.5/targets/x86_64-linux/include
Please specify a list of comma-separated CUDA compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. Each capability can be specified as "x.y" or "compute_xy" to include both virtual and binary GPU code, or as "sm_xy" to only include the binary code.
Please note that each additional compute capability significantly increases your build time and binary size, and that TensorFlow only supports compute capabilities >= 3.5 [Default is: 6.1]:
Do you want to use clang as CUDA compiler? [y/N]:
nvcc will be used as CUDA compiler.
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/lib64/ccache/gcc]: /usr/bin/gcc
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]:
Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]:
Not configuring the WORKSPACE for Android builds.
Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
--config=mkl # Build with MKL support.
--config=mkl_aarch64 # Build with oneDNN and Compute Library for the Arm Architecture (ACL).
--config=monolithic # Config for mostly static monolithic build.
--config=numa # Build with NUMA support.
--config=dynamic_kernels # (Experimental) Build kernels into separate shared objects.
--config=v1 # Build with TensorFlow 1 API instead of TF 2 API.
Preconfigured Bazel build configs to DISABLE default on features:
--config=nogcp # Disable GCP support.
--config=nonccl # Disable NVIDIA NCCL support.
Configuration finished
(tf2.7) [xxxxx@fedora tensorflow]$ bazel build --config=cuda --config=v2 --config=nonccl --config=opt //tensorflow/tools/pip_package:build_pip_package --verbose_failures
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
WARNING: The following configs were expanded more than once: [cuda, v2]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=221
INFO: Reading rc options for 'build' from /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc:
Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc:
'build' options: --define framework_shared_object=true --java_toolchain=@tf_toolchains//toolchains/java:tf_java_toolchain --host_java_toolchain=@tf_toolchains//toolchains/java:tf_java_toolchain --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library
INFO: Reading rc options for 'build' from /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.tf_configure.bazelrc:
'build' options: --action_env PYTHON_BIN_PATH=/home/xxxxx/.virtualenvs/tf2.7/bin/python3 --action_env PYTHON_LIB_PATH=/home/xxxxx/.virtualenvs/tf2.7/lib/python3.10/site-packages --python_path=/home/xxxxx/.virtualenvs/tf2.7/bin/python3 --action_env CUDA_TOOLKIT_PATH=/usr/local/cuda-11.5 --action_env TF_CUDA_COMPUTE_CAPABILITIES=6.1 --action_env GCC_HOST_COMPILER_PATH=/usr/bin/gcc --config=cuda
INFO: Reading rc options for 'build' from /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc:
'build' options: --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/common,tensorflow/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/cpp_tests/core_runtime,tensorflow/core/tfrt/fallback,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils
INFO: Found applicable config definition build:short_logs in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:cuda in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --repo_env TF_NEED_CUDA=1 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda
INFO: Found applicable config definition build:cuda in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --repo_env TF_NEED_CUDA=1 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda
INFO: Found applicable config definition build:v2 in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:nonccl in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --define=no_nccl_support=true
INFO: Found applicable config definition build:opt in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.tf_configure.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare
INFO: Found applicable config definition build:linux in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --copt=-w --host_copt=-w --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 --config=dynamic_kernels --distinct_host_configuration=false --experimental_guard_against_concurrent_changes
INFO: Found applicable config definition build:dynamic_kernels in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/tensorflow/runtime/archive/c3e082762b7664bbc7ffd2c39e86464928e27c0c.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/c6a8bec4c578a7c12e4458b161fce7b1704804a2.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/apple_support/releases/download/0.10.0/apple_support.0.10.0.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/rules_swift/releases/download/0.21.0/rules_swift.0.21.0.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/rules_apple/releases/download/0.31.3/rules_apple.0.31.3.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
DEBUG: /home/xxxxx/.cache/bazel/_bazel_xxxxx/b6a29691a381a921398d95f0198cd2fd/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:118:10:
Auto-Configuration Warning: 'TMP' environment variable is not set, using 'C:\Windows\Temp' as default
DEBUG: Rule 'io_bazel_rules_docker' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1596824487 -0400"
DEBUG: Repository io_bazel_rules_docker instantiated at:
/home/xxxxx/WorkSpace/tensorflow/test/tensorflow/WORKSPACE:23:14: in <toplevel>
/home/xxxxx/WorkSpace/tensorflow/test/tensorflow/tensorflow/workspace0.bzl:108:34: in workspace
/home/xxxxx/.cache/bazel/_bazel_xxxxx/b6a29691a381a921398d95f0198cd2fd/external/bazel_toolchains/repositories/repositories.bzl:35:23: in repositories
Repository rule git_repository defined at:
/home/xxxxx/.cache/bazel/_bazel_xxxxx/b6a29691a381a921398d95f0198cd2fd/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/XNNPACK/archive/482508b57643e1752b62d9cacf4647b0ea00c321.zip failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (446 packages loaded, 35262 targets configured).
INFO: Found 1 target...
ERROR: /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/tensorflow/core/kernels/BUILD:3404:18: Compiling tensorflow/core/kernels/roll_op_gpu.cu.cc failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command
(cd /home/xxxxx/.cache/bazel/_bazel_xxxxx/b6a29691a381a921398d95f0198cd2fd/execroot/org_tensorflow && \
exec env - \
CUDA_TOOLKIT_PATH=/usr/local/cuda-11.5 \
GCC_HOST_COMPILER_PATH=/usr/bin/gcc \
PATH=/home/xxxxx/.virtualenvs/tf2.7/bin:/home/xxxxx/.local/bin:/home/xxxxx/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/xxxxx/.local/bin \
PWD=/proc/self/cwd \
PYTHON_BIN_PATH=/home/xxxxx/.virtualenvs/tf2.7/bin/python3 \
PYTHON_LIB_PATH=/home/xxxxx/.virtualenvs/tf2.7/lib/python3.10/site-packages \
TF2_BEHAVIOR=1 \
TF_CUDA_COMPUTE_CAPABILITIES=6.1 \
external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -MD -MF bazel-out/k8-opt/bin/tensorflow/core/kernels/_objs/roll_op_gpu/roll_op_gpu.cu.pic.d '-frandom-seed=bazel-out/k8-opt/bin/tensorflow/core/kernels/_objs/roll_op_gpu/roll_op_gpu.cu.pic.o' -DEIGEN_MPL2_ONLY '-DEIGEN_MAX_ALIGN_BYTES=64' -iquote . -iquote bazel-out/k8-opt/bin -iquote external/com_google_absl -iquote bazel-out/k8-opt/bin/external/com_google_absl -iquote external/nsync -iquote bazel-out/k8-opt/bin/external/nsync -iquote external/eigen_archive -iquote bazel-out/k8-opt/bin/external/eigen_archive -iquote external/gif -iquote bazel-out/k8-opt/bin/external/gif -iquote external/libjpeg_turbo -iquote bazel-out/k8-opt/bin/external/libjpeg_turbo -iquote external/com_google_protobuf -iquote bazel-out/k8-opt/bin/external/com_google_protobuf -iquote external/com_googlesource_code_re2 -iquote bazel-out/k8-opt/bin/external/com_googlesource_code_re2 -iquote external/farmhash_archive -iquote bazel-out/k8-opt/bin/external/farmhash_archive -iquote external/fft2d -iquote bazel-out/k8-opt/bin/external/fft2d -iquote external/highwayhash -iquote bazel-out/k8-opt/bin/external/highwayhash -iquote external/zlib -iquote bazel-out/k8-opt/bin/external/zlib -iquote external/local_config_cuda -iquote bazel-out/k8-opt/bin/external/local_config_cuda -iquote external/double_conversion -iquote bazel-out/k8-opt/bin/external/double_conversion -iquote external/local_config_rocm -iquote bazel-out/k8-opt/bin/external/local_config_rocm -iquote external/local_config_tensorrt -iquote bazel-out/k8-opt/bin/external/local_config_tensorrt -Ibazel-out/k8-opt/bin/external/local_config_cuda/cuda/_virtual_includes/cuda_headers_virtual -Ibazel-out/k8-opt/bin/external/local_config_tensorrt/_virtual_includes/tensorrt_headers -isystem external/nsync/public -isystem bazel-out/k8-opt/bin/external/nsync/public -isystem third_party/eigen3/mkl_include -isystem bazel-out/k8-opt/bin/third_party/eigen3/mkl_include -isystem external/eigen_archive -isystem bazel-out/k8-opt/bin/external/eigen_archive -isystem external/gif -isystem bazel-out/k8-opt/bin/external/gif -isystem external/com_google_protobuf/src -isystem bazel-out/k8-opt/bin/external/com_google_protobuf/src -isystem external/farmhash_archive/src -isystem bazel-out/k8-opt/bin/external/farmhash_archive/src -isystem external/zlib -isystem bazel-out/k8-opt/bin/external/zlib -isystem external/local_config_cuda/cuda -isystem bazel-out/k8-opt/bin/external/local_config_cuda/cuda -isystem external/local_config_cuda/cuda/cuda/include -isystem bazel-out/k8-opt/bin/external/local_config_cuda/cuda/cuda/include -isystem external/double_conversion -isystem bazel-out/k8-opt/bin/external/double_conversion -isystem external/local_config_rocm/rocm -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm -isystem external/local_config_rocm/rocm/rocm/include -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm/rocm/include -isystem external/local_config_rocm/rocm/rocm/include/rocrand -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm/rocm/include/rocrand -isystem external/local_config_rocm/rocm/rocm/include/roctracer -isystem bazel-out/k8-opt/bin/external/local_config_rocm/rocm/rocm/include/roctracer -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -fPIC -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -fno-omit-frame-pointer -no-canonical-prefixes -fno-canonical-system-headers -DNDEBUG -g0 -O2 -ffunction-sections -fdata-sections -w -DAUTOLOAD_DYNAMIC_KERNELS -Wno-sign-compare '-std=c++14' -x cuda '-DGOOGLE_CUDA=1' '-Xcuda-fatbinary=--compress-all' '--no-cuda-include-ptx=all' '--cuda-include-ptx=sm_61' '--cuda-gpu-arch=sm_61' -DEIGEN_AVOID_STL_ARRAY -Iexternal/gemmlowp -Wno-sign-compare '-ftemplate-depth=900' -fno-exceptions '-DGOOGLE_CUDA=1' '-DTENSORFLOW_USE_NVCC=1' '-DTENSORFLOW_USE_XLA=1' -DINTEL_MKL -msse3 -pthread '-nvcc_options=relaxed-constexpr' '-nvcc_options=ftz=true' -c tensorflow/core/kernels/roll_op_gpu.cu.cc -o bazel-out/k8-opt/bin/tensorflow/core/kernels/_objs/roll_op_gpu/roll_op_gpu.cu.pic.o)
Execution platform: @local_execution_config_platform//:platform
/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
435 | function(_Functor&& __f)
| ^
/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’
/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
530 | operator=(_Functor&& __f)
| ^
/usr/lib/gcc/x86_64-redhat-linux/11/../../../../include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’
Target //tensorflow/tools/pip_package:build_pip_package failed to build
INFO: Elapsed time: 1785.803s, Critical Path: 205.51s
INFO: 15778 processes: 7804 internal, 7974 local.
FAILED: Build did NOT complete successfully
Downgrade GCC
sudo dnf downgrade gcc
Last metadata expiration check: 4:04:25 ago on Mon Dec 13 03:12:50 2021.
Dependencies resolved.
=============================================================================================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================================================================================
Downgrading:
cpp x86_64 11.2.1-1.fc35 fedora 10 M
gcc x86_64 11.2.1-1.fc35 fedora 31 M
gcc-c++ x86_64 11.2.1-1.fc35 fedora 12 M
gcc-gdb-plugin x86_64 11.2.1-1.fc35 fedora 142 k
gcc-gfortran x86_64 11.2.1-1.fc35 fedora 12 M
libgfortran x86_64 11.2.1-1.fc35 fedora 817 k
libgomp x86_64 11.2.1-1.fc35 fedora 281 k
libquadmath x86_64 11.2.1-1.fc35 fedora 209 k
libquadmath-devel x86_64 11.2.1-1.fc35 fedora 50 k
libstdc++ x86_64 11.2.1-1.fc35 fedora 744 k
libstdc++-devel x86_64 11.2.1-1.fc35 fedora 2.2 M
Transaction Summary
=============================================================================================================================================================================================================================
Downgrade 11 Packages
Total download size: 70 M
Is this ok [y/N]: y
Downloading Packages:
(1/11): gcc-c++-11.2.1-1.fc35.x86_64.rpm 1.3 MB/s | 12 MB 00:09
(2/11): gcc-gdb-plugin-11.2.1-1.fc35.x86_64.rpm 690 kB/s | 142 kB 00:00
(3/11): cpp-11.2.1-1.fc35.x86_64.rpm 850 kB/s | 10 MB 00:12
(4/11): libgfortran-11.2.1-1.fc35.x86_64.rpm 631 kB/s | 817 kB 00:01
(5/11): libgomp-11.2.1-1.fc35.x86_64.rpm 556 kB/s | 281 kB 00:00
(6/11): libquadmath-11.2.1-1.fc35.x86_64.rpm 594 kB/s | 209 kB 00:00
(7/11): libquadmath-devel-11.2.1-1.fc35.x86_64.rpm 259 kB/s | 50 kB 00:00
(8/11): libstdc++-11.2.1-1.fc35.x86_64.rpm 691 kB/s | 744 kB 00:01
(9/11): gcc-gfortran-11.2.1-1.fc35.x86_64.rpm 1.9 MB/s | 12 MB 00:06
(10/11): libstdc++-devel-11.2.1-1.fc35.x86_64.rpm 1.5 MB/s | 2.2 MB 00:01
(11/11): gcc-11.2.1-1.fc35.x86_64.rpm 1.3 MB/s | 31 MB 00:24
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.7 MB/s | 70 MB 00:25
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Downgrading : libstdc++-11.2.1-1.fc35.x86_64 1/22
Downgrading : libquadmath-11.2.1-1.fc35.x86_64 2/22
Downgrading : libgfortran-11.2.1-1.fc35.x86_64 3/22
Downgrading : libstdc++-devel-11.2.1-1.fc35.x86_64 4/22
Downgrading : libgomp-11.2.1-1.fc35.x86_64 5/22
Downgrading : cpp-11.2.1-1.fc35.x86_64 6/22
Downgrading : gcc-11.2.1-1.fc35.x86_64 7/22
Running scriptlet: gcc-11.2.1-1.fc35.x86_64 7/22
Downgrading : libquadmath-devel-11.2.1-1.fc35.x86_64 8/22
Downgrading : gcc-gfortran-11.2.1-1.fc35.x86_64 9/22
Downgrading : gcc-c++-11.2.1-1.fc35.x86_64 10/22
Running scriptlet: gcc-c++-11.2.1-1.fc35.x86_64 10/22
Downgrading : gcc-gdb-plugin-11.2.1-1.fc35.x86_64 11/22
Cleanup : gcc-gdb-plugin-11.2.1-7.fc35.x86_64 12/22
Cleanup : gcc-gfortran-11.2.1-7.fc35.x86_64 13/22
Cleanup : gcc-c++-11.2.1-7.fc35.x86_64 14/22
Running scriptlet: gcc-c++-11.2.1-7.fc35.x86_64 14/22
Cleanup : libquadmath-devel-11.2.1-7.fc35.x86_64 15/22
Cleanup : gcc-11.2.1-7.fc35.x86_64 16/22
Running scriptlet: gcc-11.2.1-7.fc35.x86_64 16/22
Cleanup : libgfortran-11.2.1-7.fc35.x86_64 17/22
Cleanup : libstdc++-devel-11.2.1-7.fc35.x86_64 18/22
Cleanup : libstdc++-11.2.1-7.fc35.x86_64 19/22
Cleanup : libquadmath-11.2.1-7.fc35.x86_64 20/22
Cleanup : cpp-11.2.1-7.fc35.x86_64 21/22
Cleanup : libgomp-11.2.1-7.fc35.x86_64 22/22
Running scriptlet: libgomp-11.2.1-7.fc35.x86_64 22/22
Verifying : cpp-11.2.1-1.fc35.x86_64 1/22
Verifying : cpp-11.2.1-7.fc35.x86_64 2/22
Verifying : gcc-11.2.1-1.fc35.x86_64 3/22
Verifying : gcc-11.2.1-7.fc35.x86_64 4/22
Verifying : gcc-c++-11.2.1-1.fc35.x86_64 5/22
Verifying : gcc-c++-11.2.1-7.fc35.x86_64 6/22
Verifying : gcc-gdb-plugin-11.2.1-1.fc35.x86_64 7/22
Verifying : gcc-gdb-plugin-11.2.1-7.fc35.x86_64 8/22
Verifying : gcc-gfortran-11.2.1-1.fc35.x86_64 9/22
Verifying : gcc-gfortran-11.2.1-7.fc35.x86_64 10/22
Verifying : libgfortran-11.2.1-1.fc35.x86_64 11/22
Verifying : libgfortran-11.2.1-7.fc35.x86_64 12/22
Verifying : libgomp-11.2.1-1.fc35.x86_64 13/22
Verifying : libgomp-11.2.1-7.fc35.x86_64 14/22
Verifying : libquadmath-11.2.1-1.fc35.x86_64 15/22
Verifying : libquadmath-11.2.1-7.fc35.x86_64 16/22
Verifying : libquadmath-devel-11.2.1-1.fc35.x86_64 17/22
Verifying : libquadmath-devel-11.2.1-7.fc35.x86_64 18/22
Verifying : libstdc++-11.2.1-1.fc35.x86_64 19/22
Verifying : libstdc++-11.2.1-7.fc35.x86_64 20/22
Verifying : libstdc++-devel-11.2.1-1.fc35.x86_64 21/22
Verifying : libstdc++-devel-11.2.1-7.fc35.x86_64 22/22
Downgraded:
cpp-11.2.1-1.fc35.x86_64 gcc-11.2.1-1.fc35.x86_64 gcc-c++-11.2.1-1.fc35.x86_64 gcc-gdb-plugin-11.2.1-1.fc35.x86_64 gcc-gfortran-11.2.1-1.fc35.x86_64 libgfortran-11.2.1-1.fc35.x86_64
libgomp-11.2.1-1.fc35.x86_64 libquadmath-11.2.1-1.fc35.x86_64 libquadmath-devel-11.2.1-1.fc35.x86_64 libstdc++-11.2.1-1.fc35.x86_64 libstdc++-devel-11.2.1-1.fc35.x86_64
Complete!
Build successful with GCC 11.2.1 20210728
GCC Version
gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-11.2.1-20210728/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.1 20210728 (Red Hat 11.2.1-1) (GCC)
TensorFlow build from source and build successful !?
./configure
You have bazel 4.2.1 installed.
Please specify the location of python. [Default is /home/xxxxx/.virtualenvs/tf2.7/bin/python3]:
Found possible Python library paths:
/home/xxxxx/.virtualenvs/tf2.7/lib/python3.10/site-packages
/home/xxxxx/.virtualenvs/tf2.7/lib64/python3.10/site-packages
Please input the desired Python library path to use. Default is [/home/xxxxx/.virtualenvs/tf2.7/lib/python3.10/site-packages]
Do you wish to build TensorFlow with ROCm support? [y/N]:
No ROCm support will be enabled for TensorFlow.
Do you wish to build TensorFlow with CUDA support? [y/N]: y
CUDA support will be enabled for TensorFlow.
Do you wish to build TensorFlow with TensorRT support? [y/N]:
No TensorRT support will be enabled for TensorFlow.
Found CUDA 11.5 in:
/usr/local/cuda-11.5/targets/x86_64-linux/lib
/usr/local/cuda-11.5/targets/x86_64-linux/include
Found cuDNN 8 in:
/usr/local/cuda-11.5/targets/x86_64-linux/lib
/usr/local/cuda-11.5/targets/x86_64-linux/include
Please specify a list of comma-separated CUDA compute capabilities you want to build with.
You can find the compute capability of your device at: https://developer.nvidia.com/cuda-gpus. Each capability can be specified as "x.y" or "compute_xy" to include both virtual and binary GPU code, or as "sm_xy" to only include the binary code.
Please note that each additional compute capability significantly increases your build time and binary size, and that TensorFlow only supports compute capabilities >= 3.5 [Default is: 6.1]:
Do you want to use clang as CUDA compiler? [y/N]:
nvcc will be used as CUDA compiler.
Please specify which gcc should be used by nvcc as the host compiler. [Default is /usr/lib64/ccache/gcc]: /usr/bin/gcc
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -Wno-sign-compare]:
Would you like to interactively configure ./WORKSPACE for Android builds? [y/N]:
Not configuring the WORKSPACE for Android builds.
Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.
--config=mkl # Build with MKL support.
--config=mkl_aarch64 # Build with oneDNN and Compute Library for the Arm Architecture (ACL).
--config=monolithic # Config for mostly static monolithic build.
--config=numa # Build with NUMA support.
--config=dynamic_kernels # (Experimental) Build kernels into separate shared objects.
--config=v1 # Build with TensorFlow 1 API instead of TF 2 API.
Preconfigured Bazel build configs to DISABLE default on features:
--config=nogcp # Disable GCP support.
--config=nonccl # Disable NVIDIA NCCL support.
Configuration finished
(tf2.7) [xxxxx@fedora tensorflow]$ bazel build --config=cuda --config=v2 --config=nonccl --config=opt //tensorflow/tools/pip_package:build_pip_package --verbose_failures
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
WARNING: The following configs were expanded more than once: [cuda, v2]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=221
INFO: Reading rc options for 'build' from /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc:
Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc:
'build' options: --define framework_shared_object=true --java_toolchain=@tf_toolchains//toolchains/java:tf_java_toolchain --host_java_toolchain=@tf_toolchains//toolchains/java:tf_java_toolchain --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --define=with_xla_support=true --config=short_logs --config=v2 --define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_library
INFO: Reading rc options for 'build' from /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.tf_configure.bazelrc:
'build' options: --action_env PYTHON_BIN_PATH=/home/xxxxx/.virtualenvs/tf2.7/bin/python3 --action_env PYTHON_LIB_PATH=/home/xxxxx/.virtualenvs/tf2.7/lib/python3.10/site-packages --python_path=/home/xxxxx/.virtualenvs/tf2.7/bin/python3 --action_env CUDA_TOOLKIT_PATH=/usr/local/cuda-11.5 --action_env TF_CUDA_COMPUTE_CAPABILITIES=6.1 --action_env GCC_HOST_COMPILER_PATH=/usr/bin/gcc --config=cuda
INFO: Reading rc options for 'build' from /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc:
'build' options: --deleted_packages=tensorflow/compiler/mlir/tfrt,tensorflow/compiler/mlir/tfrt/benchmarks,tensorflow/compiler/mlir/tfrt/jit/python_binding,tensorflow/compiler/mlir/tfrt/jit/transforms,tensorflow/compiler/mlir/tfrt/python_tests,tensorflow/compiler/mlir/tfrt/tests,tensorflow/compiler/mlir/tfrt/tests/analysis,tensorflow/compiler/mlir/tfrt/tests/jit,tensorflow/compiler/mlir/tfrt/tests/lhlo_to_tfrt,tensorflow/compiler/mlir/tfrt/tests/tf_to_corert,tensorflow/compiler/mlir/tfrt/tests/tf_to_tfrt_data,tensorflow/compiler/mlir/tfrt/tests/saved_model,tensorflow/compiler/mlir/tfrt/transforms/lhlo_gpu_to_tfrt_gpu,tensorflow/core/runtime_fallback,tensorflow/core/runtime_fallback/conversion,tensorflow/core/runtime_fallback/kernel,tensorflow/core/runtime_fallback/opdefs,tensorflow/core/runtime_fallback/runtime,tensorflow/core/runtime_fallback/util,tensorflow/core/tfrt/common,tensorflow/core/tfrt/eager,tensorflow/core/tfrt/eager/backends/cpu,tensorflow/core/tfrt/eager/backends/gpu,tensorflow/core/tfrt/eager/core_runtime,tensorflow/core/tfrt/eager/cpp_tests/core_runtime,tensorflow/core/tfrt/fallback,tensorflow/core/tfrt/gpu,tensorflow/core/tfrt/run_handler_thread_pool,tensorflow/core/tfrt/runtime,tensorflow/core/tfrt/saved_model,tensorflow/core/tfrt/saved_model/tests,tensorflow/core/tfrt/tpu,tensorflow/core/tfrt/utils
INFO: Found applicable config definition build:short_logs in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:cuda in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --repo_env TF_NEED_CUDA=1 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda
INFO: Found applicable config definition build:cuda in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --repo_env TF_NEED_CUDA=1 --crosstool_top=@local_config_cuda//crosstool:toolchain --@local_config_cuda//:enable_cuda
INFO: Found applicable config definition build:v2 in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:nonccl in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --define=no_nccl_support=true
INFO: Found applicable config definition build:opt in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.tf_configure.bazelrc: --copt=-Wno-sign-compare --host_copt=-Wno-sign-compare
INFO: Found applicable config definition build:linux in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --copt=-w --host_copt=-w --define=PREFIX=/usr --define=LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include --cxxopt=-std=c++14 --host_cxxopt=-std=c++14 --config=dynamic_kernels --distinct_host_configuration=false --experimental_guard_against_concurrent_changes
INFO: Found applicable config definition build:dynamic_kernels in file /home/xxxxx/WorkSpace/tensorflow/test/tensorflow/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_KERNELS
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/tensorflow/runtime/archive/c3e082762b7664bbc7ffd2c39e86464928e27c0c.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/c6a8bec4c578a7c12e4458b161fce7b1704804a2.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/apple_support/releases/download/0.10.0/apple_support.0.10.0.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/rules_swift/releases/download/0.21.0/rules_swift.0.21.0.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/bazelbuild/rules_apple/releases/download/0.31.3/rules_apple.0.31.3.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
DEBUG: /home/xxxxx/.cache/bazel/_bazel_xxxxx/b6a29691a381a921398d95f0198cd2fd/external/bazel_tools/tools/cpp/lib_cc_configure.bzl:118:10:
Auto-Configuration Warning: 'TMP' environment variable is not set, using 'C:\Windows\Temp' as default
DEBUG: Rule 'io_bazel_rules_docker' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1596824487 -0400"
DEBUG: Repository io_bazel_rules_docker instantiated at:
/home/xxxxx/WorkSpace/tensorflow/test/tensorflow/WORKSPACE:23:14: in <toplevel>
/home/xxxxx/WorkSpace/tensorflow/test/tensorflow/tensorflow/workspace0.bzl:108:34: in workspace
/home/xxxxx/.cache/bazel/_bazel_xxxxx/b6a29691a381a921398d95f0198cd2fd/external/bazel_toolchains/repositories/repositories.bzl:35:23: in repositories
Repository rule git_repository defined at:
/home/xxxxx/.cache/bazel/_bazel_xxxxx/b6a29691a381a921398d95f0198cd2fd/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/XNNPACK/archive/482508b57643e1752b62d9cacf4647b0ea00c321.zip failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (446 packages loaded, 35262 targets configured).
INFO: Found 1 target...
Target //tensorflow/tools/pip_package:build_pip_package up-to-date:
bazel-bin/tensorflow/tools/pip_package/build_pip_package
INFO: Elapsed time: 7346.845s, Critical Path: 480.65s
INFO: 31389 processes: 10726 internal, 20663 local.
INFO: Build completed successfully, 31389 total actions
Difference between gcc-11.2.1-1 and gcc-11.2.1-7
$ diff ~/WorkSpace/gcc/gcc-11.2.1-1/gcc-11.2.1-20210728/libstdc++-v3/include/bits/std_function.h ~/WorkSpace/gcc/gcc-11.2.1-7/gcc-11.2.1-20211203/libstdc++-v3/include/bits/std_function.h
130c130
< typedef integral_constant<bool, __stored_locally> _Local_storage;
---
> using _Local_storage = integral_constant<bool, __stored_locally>;
145c145,146
< // Clone a location-invariant function object that fits within
---
> private:
> // Construct a location-invariant function object that fits within
147,151c148,153
< static void
< _M_clone(_Any_data& __dest, const _Any_data& __source, true_type)
< {
< ::new (__dest._M_access()) _Functor(__source._M_access<_Functor>());
< }
---
> template<typename _Fn>
> static void
> _M_create(_Any_data& __dest, _Fn&& __f, true_type)
> {
> ::new (__dest._M_access()) _Functor(std::forward<_Fn>(__f));
> }
153,160c155,162
< // Clone a function object that is not location-invariant or
< // that cannot fit into an _Any_data structure.
< static void
< _M_clone(_Any_data& __dest, const _Any_data& __source, false_type)
< {
< __dest._M_access<_Functor*>() =
< new _Functor(*__source._M_access<const _Functor*>());
< }
---
> // Construct a function object on the heap and store a pointer.
> template<typename _Fn>
> static void
> _M_create(_Any_data& __dest, _Fn&& __f, false_type)
> {
> __dest._M_access<_Functor*>()
> = new _Functor(std::forward<_Fn>(__f));
> }
162,163c164
< // Destroying a location-invariant object may still require
< // destruction.
---
> // Destroy an object stored in the internal buffer.
170c171
< // Destroying an object located on the heap.
---
> // Destroy an object located on the heap.
190a192
>
196c198,199
< _M_clone(__dest, __source, _Local_storage());
---
> _M_init_functor(__dest,
> *const_cast<const _Functor*>(_M_get_pointer(__source)));
206,208c209,216
< static void
< _M_init_functor(_Any_data& __functor, _Functor&& __f)
< { _M_init_functor(__functor, std::move(__f), _Local_storage()); }
---
> template<typename _Fn>
> static void
> _M_init_functor(_Any_data& __functor, _Fn&& __f)
> noexcept(__and_<_Local_storage,
> is_nothrow_constructible<_Functor, _Fn>>::value)
> {
> _M_create(__functor, std::forward<_Fn>(__f), _Local_storage());
> }
229,237d236
<
< private:
< static void
< _M_init_functor(_Any_data& __functor, _Functor&& __f, true_type)
< { ::new (__functor._M_access()) _Functor(std::move(__f)); }
<
< static void
< _M_init_functor(_Any_data& __functor, _Functor&& __f, false_type)
< { __functor._M_access<_Functor*>() = new _Functor(std::move(__f)); }
240c239
< _Function_base() : _M_manager(nullptr) { }
---
> _Function_base() = default;
250,251c249,250
< typedef bool (*_Manager_type)(_Any_data&, const _Any_data&,
< _Manager_operation);
---
> using _Manager_type
> = bool (*)(_Any_data&, const _Any_data&, _Manager_operation);
253,254c252,253
< _Any_data _M_functor;
< _Manager_type _M_manager;
---
> _Any_data _M_functor{};
> _Manager_type _M_manager{};
264c263
< typedef _Function_base::_Base_manager<_Functor> _Base;
---
> using _Base = _Function_base::_Base_manager<_Functor>;
293a293,300
>
> template<typename _Fn>
> static constexpr bool
> _S_nothrow_init() noexcept
> {
> return __and_<typename _Base::_Local_storage,
> is_nothrow_constructible<_Functor, _Fn>>::value;
> }
322c329
< * @brief Primary class template for std::function.
---
> * @brief Polymorphic function wrapper.
324,325c331
< *
< * Polymorphic function wrapper.
---
> * @since C++11
331a338,344
> // Equivalent to std::decay_t except that it produces an invalid type
> // if the decayed type is the current specialization of std::function.
> template<typename _Func,
> bool _Self = is_same<__remove_cvref_t<_Func>, function>::value>
> using _Decay_t
> = typename __enable_if_t<!_Self, decay<_Func>>::type;
>
333c346,347
< typename _Res2 = __invoke_result<_Func&, _ArgTypes...>>
---
> typename _DFunc = _Decay_t<_Func>,
> typename _Res2 = __invoke_result<_DFunc&, _ArgTypes...>>
338,341c352,353
< // Used so the return type convertibility checks aren't done when
< // performing overload resolution for copy construction/assignment.
< template<typename _Tp>
< struct _Callable<function, _Tp> : false_type { };
---
> template<typename _Cond, typename _Tp = void>
> using _Requires = __enable_if_t<_Cond::value, _Tp>;
343,344c355,357
< template<typename _Cond, typename _Tp>
< using _Requires = typename enable_if<_Cond::value, _Tp>::type;
---
> template<typename _Functor>
> using _Handler
> = _Function_handler<_Res(_ArgTypes...), __decay_t<_Functor>>;
353c366
< * @post @c !(bool)*this
---
> * @post `!(bool)*this`
368c381
< * @post @c bool(*this) == bool(__x)
---
> * @post `bool(*this) == bool(__x)`
370,371c383,384
< * The newly-created %function contains a copy of the target of @a
< * __x (if it has one).
---
> * The newly-created %function contains a copy of the target of
> * `__x` (if it has one).
388c401
< * The newly-created %function contains the target of @a __x
---
> * The newly-created %function contains the target of `__x`
392,393c405,414
< : _Function_base()
< { __x.swap(*this); }
---
> : _Function_base(), _M_invoker(__x._M_invoker)
> {
> if (static_cast<bool>(__x))
> {
> _M_functor = __x._M_functor;
> _M_manager = __x._M_manager;
> __x._M_manager = nullptr;
> __x._M_invoker = nullptr;
> }
> }
399,400c420
< * type @c T1, @c T2, ..., @c TN and returns a value convertible
< * to @c Res.
---
> * type `ArgTypes...` and returns a value convertible to `Res`.
403,406c423,426
< * @a __f. If @a __f is @c reference_wrapper<F>, then this function
< * object will contain a reference to the function object @c
< * __f.get(). If @a __f is a NULL function pointer or NULL
< * pointer-to-member, the newly-created object will be empty.
---
> * `__f`. If `__f` is `reference_wrapper<F>`, then this function
> * object will contain a reference to the function object `__f.get()`.
> * If `__f` is a null function pointer, null pointer-to-member, or
> * empty `std::function`, the newly-created object will be empty.
408,409c428,429
< * If @a __f is a non-NULL function pointer or an object of type @c
< * reference_wrapper<F>, this function will not throw.
---
> * If `__f` is a non-null function pointer or an object of type
> * `reference_wrapper<F>`, this function will not throw.
410a431,432
> // _GLIBCXX_RESOLVE_LIB_DEFECTS
> // 2774. std::function construction vs assignment
412,414c434,436
< typename = _Requires<__not_<is_same<_Functor, function>>, void>,
< typename = _Requires<_Callable<_Functor>, void>>
< function(_Functor __f)
---
> typename _Constraints = _Requires<_Callable<_Functor>>>
> function(_Functor&& __f)
> noexcept(_Handler<_Functor>::template _S_nothrow_init<_Functor>())
417c439,445
< typedef _Function_handler<_Res(_ArgTypes...), _Functor> _My_handler;
---
> static_assert(is_copy_constructible<__decay_t<_Functor>>::value,
> "std::function target must be copy-constructible");
> static_assert(is_constructible<__decay_t<_Functor>, _Functor>::value,
> "std::function target must be constructible from the "
> "constructor argument");
>
> using _My_handler = _Handler<_Functor>;
421c449,450
< _My_handler::_M_init_functor(_M_functor, std::move(__f));
---
> _My_handler::_M_init_functor(_M_functor,
> std::forward<_Functor>(__f));
500c529
< _Requires<_Callable<typename decay<_Functor>::type>, function&>
---
> _Requires<_Callable<_Functor>, function&>
501a531
> noexcept(_Handler<_Functor>::template _S_nothrow_init<_Functor>())
637,638c667,668
< _Invoker_type _M_invoker;
< };
---
> _Invoker_type _M_invoker = nullptr;
> };
このスクラップは2022/05/06にクローズされました